本文整理汇总了Java中org.pentaho.di.core.Result类的典型用法代码示例。如果您正苦于以下问题:Java Result类的具体用法?Java Result怎么用?Java Result使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Result类属于org.pentaho.di.core包,在下文中一共展示了Result类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: execute
import org.pentaho.di.core.Result; //导入依赖的package包/类
/**
* Execute this job entry and return the result. In this case it means, just
* set the result boolean in the Result class.
*
* @param prev_result
* The result of the previous execution
* @return The Result of the execution.
*/
public Result execute(Result prev_result, int nr) {
boolean result = true;
if(StringUtils.isNotBlank(className)){
try {
//实例化配置的类
JobEntryEasyExpandRunBase kui = (JobEntryEasyExpandRunBase) Class.forName(
environmentSubstitute(className)).newInstance();
kui.setJeku(this);
result = kui.run();
} catch (Exception e) {
prev_result.setNrErrors(1);
result = false;
logError("运行失败,"+className+","+environmentSubstitute(configInfo), e);
}
}
prev_result.setResult(result);
return prev_result;
}
开发者ID:majinju,项目名称:KettleEasyExpand,代码行数:27,代码来源:JobEntryEasyExpand.java
示例2: init
import org.pentaho.di.core.Result; //导入依赖的package包/类
public boolean init(StepMetaInterface smi, StepDataInterface sdi)
{
data = (FilesFromResultData) sdi;
if (super.init(smi, sdi))
{
Result result = getTransMeta().getPreviousResult();
if (result != null)
{
data.resultFilesList = result.getResultFilesList();
} else
{
data.resultFilesList = null;
}
// Add init code here.
return true;
}
return false;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:22,代码来源:FilesFromResult.java
示例3: JobEntryResult
import org.pentaho.di.core.Result; //导入依赖的package包/类
/**
* Creates a new job entry result...
* @param result the result of the job entry
* @param comment an optional comment
* @param jobEntry the job entry for which this is the result.
*/
public JobEntryResult(Result result, String comment, String reason, JobEntryCopy jobEntry)
{
this();
if (result!=null)
{
this.result = (Result) result.clone();
}
else
{
this.result = null;
}
this.comment = comment;
this.reason = reason;
this.jobEntry = jobEntry;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:22,代码来源:JobEntryResult.java
示例4: addFileToResultFilenames
import org.pentaho.di.core.Result; //导入依赖的package包/类
private void addFileToResultFilenames(String fileaddentry,Result result,Job parentJob)
{
try
{
ResultFile resultFile = new ResultFile(ResultFile.FILE_TYPE_GENERAL, KettleVFS.getFileObject(fileaddentry, this), parentJob.getJobname(), toString());
result.getResultFiles().put(resultFile.getFile().toString(), resultFile);
if(log.isDebug())
{
logDebug(" ------ ");
logDebug(BaseMessages.getString(PKG, "JobMoveFiles.Log.FileAddedToResultFilesName",fileaddentry));
}
}catch (Exception e)
{
log.logError(BaseMessages.getString(PKG, "JobMoveFiles.Error.AddingToFilenameResult"),fileaddentry + ""+e.getMessage());
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:20,代码来源:JobEntryMoveFiles.java
示例5: addFileToResultFilenames
import org.pentaho.di.core.Result; //导入依赖的package包/类
private void addFileToResultFilenames(String fileaddentry,LogWriter log,Result result,Job parentJob)
{
try
{
ResultFile resultFile = new ResultFile(ResultFile.FILE_TYPE_GENERAL, KettleVFS.getFileObject(fileaddentry), parentJob.getJobname(), toString());
result.getResultFiles().put(resultFile.getFile().toString(), resultFile);
if(log.isDebug())
{
log.logDebug(toString()," ------ ");
log.logDebug(toString(),Messages.getString("JobMoveFiles.Log.FileAddedToResultFilesName",fileaddentry));
}
}catch (Exception e)
{
log.logError(Messages.getString("JobMoveFiles.Error.AddingToFilenameResult"),fileaddentry + ""+e.getMessage());
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:20,代码来源:JobEntryMoveFiles.java
示例6: evaluate
import org.pentaho.di.core.Result; //导入依赖的package包/类
public boolean evaluate(Result result) {
String Returnmessage = null;
String RealMessageabort = environmentSubstitute(getMessageabort());
try {
// Return False
if (RealMessageabort == null) {
Returnmessage = BaseMessages.getString(PKG, "JobEntryAbort.Meta.CheckResult.Label"); //$NON-NLS-1$
} else {
Returnmessage = RealMessageabort;
}
logError(Returnmessage);
result.setNrErrors(1);
return false;
} catch (Exception e) {
result.setNrErrors(1);
logError(BaseMessages.getString(PKG, "JobEntryAbort.Meta.CheckResult.CouldNotExecute") + e.toString()); //$NON-NLS-1$
return false;
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:22,代码来源:JobEntryAbort.java
示例7: evaluate
import org.pentaho.di.core.Result; //导入依赖的package包/类
public boolean evaluate(Result result) {
LogWriter log = LogWriter.getInstance();
String Returnmessage = null;
String RealMessageabort = environmentSubstitute(getMessageabort());
try {
// Return False
if (RealMessageabort == null) {
Returnmessage = Messages.getString("JobEntryAbort.Meta.CheckResult.Label"); //$NON-NLS-1$
} else {
Returnmessage = RealMessageabort;
}
log.logError(toString(), Returnmessage);
result.setNrErrors(1);
return false;
} catch (Exception e) {
result.setNrErrors(1);
log.logError(toString(), Messages.getString("JobEntryAbort.Meta.CheckResult.CouldNotExecute") + e.toString()); //$NON-NLS-1$
return false;
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:23,代码来源:JobEntryAbort.java
示例8: addFileToResultFilenames
import org.pentaho.di.core.Result; //导入依赖的package包/类
private void addFileToResultFilenames(String fileaddentry,LogWriter log,Result result,Job parentJob)
{
try
{
ResultFile resultFile = new ResultFile(ResultFile.FILE_TYPE_GENERAL, KettleVFS.getFileObject(fileaddentry), parentJob.getName(), toString());
result.getResultFiles().put(resultFile.getFile().toString(), resultFile);
if(log.isDetailed())
{
log.logDetailed(toString(),Messages.getString("JobXMLWellFormed.Log.FileAddedToResultFilesName",fileaddentry));
}
}catch (Exception e)
{
log.logError(toString(),Messages.getString("JobXMLWellFormed.Error.AddingToFilenameResult",fileaddentry,e.getMessage()));
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:19,代码来源:JobEntryXMLWellFormed.java
示例9: stopJob
import org.pentaho.di.core.Result; //导入依赖的package包/类
public synchronized void stopJob() {
try {
if (job != null && running && job.isInitialized()) {
job.stopAll();
job.endProcessing("stop", new Result()); //$NON-NLS-1$
job.waitUntilFinished(5000); // wait until everything is stopped, maximum 5 seconds...
job = null;
running = false;
log.logMinimal(Spoon.APP_NAME, Messages.getString("JobLog.Log.JobWasStopped")); //$NON-NLS-1$
}
} catch (KettleJobException je) {
MessageBox m = new MessageBox(shell, SWT.OK | SWT.ICON_WARNING);
m.setText(Messages.getString("JobLog.Dialog.UnableToSaveStopLineInLoggingTable.Title")); //$NON-NLS-1$
m
.setMessage(Messages.getString("JobLog.Dialog.UnableToSaveStopLineInLoggingTable.Message") + Const.CR + je.toString()); //$NON-NLS-1$
m.open();
} finally {
setControlStates();
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:21,代码来源:JobGraph.java
示例10: JobEntryResult
import org.pentaho.di.core.Result; //导入依赖的package包/类
/**
* Creates a new job entry result...
* @param result the result of the job entry
* @param comment an optional comment
* @param jobEntry the job entry for which this is the result.
*/
public JobEntryResult(Result result, String logChannelId, String comment, String reason, String jobEntryName, int jobEntryNr, String jobEntryFilename)
{
this();
if (result!=null)
{
this.result = (Result) result.clone();
// prevent excessive memory consumption!
// PDI-4721
//
this.result.setLogText(null);
this.result.setRows(null);
}
else
{
this.result = null;
}
this.logChannelId = logChannelId;
this.comment = comment;
this.reason = reason;
this.jobEntryName = jobEntryName;
this.jobEntryNr = jobEntryNr;
this.jobEntryFilename = jobEntryFilename;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:31,代码来源:JobEntryResult.java
示例11: clone
import org.pentaho.di.core.Result; //导入依赖的package包/类
public Object clone()
{
try
{
JobEntryResult jobEntryResult = (JobEntryResult)super.clone();
if (getResult()!=null)
jobEntryResult.setResult((Result)getResult().clone());
return jobEntryResult;
}
catch(CloneNotSupportedException e)
{
return null;
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:17,代码来源:JobEntryResult.java
示例12: copyResult
import org.pentaho.di.core.Result; //导入依赖的package包/类
private void copyResult(Trans trans) {
Result result = trans.getResult();
setLinesInput(result.getNrLinesInput());
setLinesOutput(result.getNrLinesOutput());
setLinesRead(result.getNrLinesRead());
setLinesWritten(result.getNrLinesWritten());
setLinesUpdated(result.getNrLinesUpdated());
setLinesRejected(result.getNrLinesRejected());
setErrors(result.getNrErrors());
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:11,代码来源:MetaInject.java
示例13: getResult
import org.pentaho.di.core.Result; //导入依赖的package包/类
public Result getResult(TransMeta transMeta)
{
Result result = new Result();
for (StepStatus stepStatus : stepStatusList) {
result.setNrErrors(result.getNrErrors()+stepStatus.getErrors()+(result.isStopped()?1:0)); // If the remote trans is stopped, count as an error
if (transMeta.getReadStep() !=null && stepStatus.getStepname().equals(transMeta.getReadStep().getName())) {
result.setNrLinesRead(result.getNrLinesRead()+ stepStatus.getLinesRead());
}
if (transMeta.getInputStep() !=null && stepStatus.getStepname().equals(transMeta.getInputStep().getName())) {
result.setNrLinesInput(result.getNrLinesInput() + stepStatus.getLinesInput());
}
if (transMeta.getWriteStep() !=null && stepStatus.getStepname().equals(transMeta.getWriteStep().getName())) {
result.setNrLinesWritten(result.getNrLinesWritten()+stepStatus.getLinesWritten());
}
if (transMeta.getOutputStep() !=null && stepStatus.getStepname().equals(transMeta.getOutputStep().getName())) {
result.setNrLinesOutput(result.getNrLinesOutput()+stepStatus.getLinesOutput());
}
if (transMeta.getUpdateStep() !=null && stepStatus.getStepname().equals(transMeta.getUpdateStep().getName())) {
result.setNrLinesUpdated(result.getNrLinesUpdated()+stepStatus.getLinesUpdated());
}
if (transMeta.getRejectedStep()!=null && stepStatus.getStepname().equals(transMeta.getRejectedStep().getName())) {
result.setNrLinesRejected(result.getNrLinesRejected()+stepStatus.getLinesRejected());
}
if (stepStatus.isStopped()) {
result.setStopped(true);
result.setResult(false);
}
}
return result;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:36,代码来源:SlaveServerTransStatus.java
示例14: evaluate
import org.pentaho.di.core.Result; //导入依赖的package包/类
/**
* Display the Message Box.
*/
public boolean evaluate(Result result)
{
try
{
// default to ok
// Try to display MSGBOX
boolean response = true;
ThreadDialogs dialogs = GUIFactory.getThreadDialogs();
if( dialogs != null ) {
response = dialogs.threadMessageBox(
getRealBodyMessage()+Const.CR,
getRealTitleMessage(), true, Const.INFO );
}
return response;
}
catch(Exception e)
{
result.setNrErrors(1);
logError("Couldn't display message box: "+e.toString());
return false;
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:32,代码来源:JobEntryMsgBoxInfo.java
示例15: downloadFile
import org.pentaho.di.core.Result; //导入依赖的package包/类
private void downloadFile(FTPClient ftpclient,String filename,String realMoveToFolder, Job parentJob,Result result) throws Exception
{
String localFilename=filename;
targetFilename = returnTargetFilename(localFilename);
if ((!onlyGettingNewFiles) ||
(onlyGettingNewFiles && needsDownload(targetFilename)))
{
if(isDetailed()) logDetailed(BaseMessages.getString(PKG, "JobEntryFTP.GettingFile",filename, environmentSubstitute(targetDirectory))); //$NON-NLS-1$
ftpclient.get(targetFilename, filename);
// Update retrieved files
updateRetrievedFiles();
if(isDetailed()) logDetailed(BaseMessages.getString(PKG, "JobEntryFTP.GotFile", filename)); //$NON-NLS-1$
// Add filename to result filenames
addFilenameToResultFilenames(result, parentJob, targetFilename);
// Delete the file if this is needed!
if (remove) {
ftpclient.delete(filename);
if(isDetailed())
if(isDetailed()) logDetailed(BaseMessages.getString(PKG, "JobEntryFTP.DeletedFile", filename)); //$NON-NLS-1$
}else
{
if(movefiles){
// Try to move file to destination folder ...
ftpclient.rename(filename, realMoveToFolder+FILE_SEPARATOR+filename);
if(isDetailed())
logDetailed(BaseMessages.getString(PKG, "JobEntryFTP.MovedFile",filename,realMoveToFolder));
}
}
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:36,代码来源:JobEntryFTP.java
示例16: addFileToResultFilenames
import org.pentaho.di.core.Result; //导入依赖的package包/类
private void addFileToResultFilenames(String fileaddentry, LogChannelInterface log, Result result, Job parentJob)
{
try
{
ResultFile resultFile = new ResultFile(ResultFile.FILE_TYPE_GENERAL, KettleVFS.getFileObject(fileaddentry, this), parentJob.getJobname(), toString());
result.getResultFiles().put(resultFile.getFile().toString(), resultFile);
if(log.isDebug()) logDebug(BaseMessages.getString(PKG, "JobExportRepository.Log.FileAddedToResultFilesName",fileaddentry));
}catch (Exception e)
{
log.logError(BaseMessages.getString(PKG, "JobExportRepository.Error.AddingToFilenameResult"),fileaddentry + ""+e.getMessage());
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:13,代码来源:JobEntryExportRepository.java
示例17: execute
import org.pentaho.di.core.Result; //导入依赖的package包/类
/**
* Execute a job with previous results passed in.<br>
* <br>
* Execute called by JobEntryJob: don't clear the jobEntryResults.
* @param nr The job entry number
* @param result the result of the previous execution
* @return Result of the job execution
* @throws KettleJobException
*/
public Result execute(int nr, Result result) throws KettleException
{
finished=false;
// Where do we start?
JobEntryCopy startpoint;
// Perhaps there is already a list of input rows available?
if (getSourceRows()!=null)
{
result.setRows(getSourceRows());
}
startpoint = jobMeta.findJobEntry(JobMeta.STRING_SPECIAL_START, 0, false);
if (startpoint == null)
{
throw new KettleJobException(Messages.getString("Job.Log.CounldNotFindStartingPoint"));
}
Result res = execute(nr, result, startpoint, null, Messages.getString("Job.Reason.StartOfJobentry"));
// Tell the world that we've finished processing this job...
//
fireJobListeners();
return res;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:37,代码来源:Job.java
示例18: addFilenameToResultFilenames
import org.pentaho.di.core.Result; //导入依赖的package包/类
private void addFilenameToResultFilenames(Result result, Job parentJob, String newfile) throws Exception
{
if (addfiletoresult)
{
// Add file to result files name
ResultFile resultFile = new ResultFile(ResultFile.FILE_TYPE_GENERAL , KettleVFS.getFileObject(newfile), parentJob.getJobname(), toString());
result.getResultFiles().put(resultFile.getFile().toString(), resultFile);
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:10,代码来源:JobEntryUnZip.java
示例19: execute
import org.pentaho.di.core.Result; //导入依赖的package包/类
/**
* Execute this job entry and return the result.
* In this case it means, just set the result boolean in the Result class.
* @param previousResult The result of the previous execution
* @return The Result of the execution.
*/
public Result execute(Result previousResult, int nr, Repository rep, Job parentJob)
{
Result result = previousResult;
result.setNrErrors(0);
result.setResult(true);
return result;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:15,代码来源:JobEntrySuccess.java
示例20: evaluate
import org.pentaho.di.core.Result; //导入依赖的package包/类
/**
* Display the Message Box.
*/
public boolean evaluate(Result result)
{
LogWriter log = LogWriter.getInstance();
try
{
// default to ok
// Try to display MSGBOX
boolean response = true;
ThreadDialogs dialogs = GUIFactory.getThreadDialogs();
if( dialogs != null ) {
response = dialogs.threadMessageBox(
getRealBodyMessage()+Const.CR,
getRealTitleMessage(), true, Const.INFO );
}
return response;
}
catch(Exception e)
{
result.setNrErrors(1);
log.logError(toString(), "Couldn't display message box: "+e.toString());
return false;
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:35,代码来源:JobEntryMsgBoxInfo.java
注:本文中的org.pentaho.di.core.Result类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论