本文整理匯總了Java中org.pentaho.di.trans.step.StepInterface.getErrors方法的典型用法代碼示例。如果您正苦於以下問題:Java StepInterface.getErrors方法的具體用法?Java StepInterface.getErrors怎麽用?Java StepInterface.getErrors使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.pentaho.di.trans.step.StepInterface
的用法示例。
在下文中一共展示了StepInterface.getErrors方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: addStepPerformanceSnapShot
import org.pentaho.di.trans.step.StepInterface; //導入方法依賴的package包/類
protected void addStepPerformanceSnapShot() {
if (transMeta.isCapturingStepPerformanceSnapShots())
{
// get the statistics from the steps and keep them...
//
for (int i=0;i<steps.size();i++)
{
StepMeta stepMeta = steps.get(i).stepMeta;
StepInterface step = steps.get(i).step;
BaseStep baseStep = (BaseStep)step;
StepPerformanceSnapShot snapShot = new StepPerformanceSnapShot(
new Date(),
stepMeta.getName(),
step.getCopy(),
step.getLinesRead(),
step.getLinesWritten(),
step.getLinesInput(),
step.getLinesOutput(),
step.getLinesUpdated(),
step.getLinesRejected(),
step.getErrors()
);
List<StepPerformanceSnapShot> snapShotList = stepPerformanceSnapShots.get(step.toString());
StepPerformanceSnapShot previous;
if (snapShotList==null) {
snapShotList = new ArrayList<StepPerformanceSnapShot>();
stepPerformanceSnapShots.put(step.toString(), snapShotList);
previous = null;
}
else {
previous = snapShotList.get(snapShotList.size()-1); // the last one...
}
// Make the difference...
//
snapShot.diff(previous, baseStep.rowsetInputSize(), baseStep.rowsetOutputSize());
snapShotList.add(snapShot);
}
}
}
示例2: printStats
import org.pentaho.di.trans.step.StepInterface; //導入方法依賴的package包/類
public void printStats(int seconds)
{
log.logBasic(" "); //$NON-NLS-1$
if (steps==null) return;
for (int i=0;i<steps.size();i++)
{
StepMetaDataCombi sid = steps.get(i);
StepInterface step = sid.step;
long proc = step.getProcessed();
if (seconds!=0)
{
if (step.getErrors()==0)
{
log.logBasic(BaseMessages.getString(PKG, "Trans.Log.ProcessSuccessfullyInfo",step.getStepname(),"."+step.getCopy(),String.valueOf(proc),String.valueOf((proc/seconds)))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
}
else
{
log.logError(BaseMessages.getString(PKG, "Trans.Log.ProcessErrorInfo",step.getStepname(),"."+step.getCopy(),String.valueOf(step.getErrors()),String.valueOf(proc),String.valueOf(proc/seconds))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
}
}
else
{
if (step.getErrors()==0)
{
log.logBasic(BaseMessages.getString(PKG, "Trans.Log.ProcessSuccessfullyInfo",step.getStepname(),"."+step.getCopy(),String.valueOf(proc),seconds!=0 ? String.valueOf((proc/seconds)) : "-")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
}
else
{
log.logError(BaseMessages.getString(PKG, "Trans.Log.ProcessErrorInfo2",step.getStepname(),"."+step.getCopy(),String.valueOf(step.getErrors()),String.valueOf(proc),String.valueOf(seconds))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
}
}
}
}
示例3: addStepPerformanceSnapShot
import org.pentaho.di.trans.step.StepInterface; //導入方法依賴的package包/類
protected void addStepPerformanceSnapShot() {
if (stepPerformanceSnapShots==null) return; // Race condition somewhere?
boolean pausedAndNotEmpty = isPaused() && !stepPerformanceSnapShots.isEmpty();
boolean stoppedAndNotEmpty = isStopped() && !stepPerformanceSnapShots.isEmpty();
if (transMeta.isCapturingStepPerformanceSnapShots() && !pausedAndNotEmpty && !stoppedAndNotEmpty)
{
// get the statistics from the steps and keep them...
//
int seqNr = stepPerformanceSnapshotSeqNr.incrementAndGet();
for (int i=0;i<steps.size();i++)
{
StepMeta stepMeta = steps.get(i).stepMeta;
StepInterface step = steps.get(i).step;
StepPerformanceSnapShot snapShot = new StepPerformanceSnapShot(
seqNr,
getBatchId(),
new Date(),
getName(),
stepMeta.getName(),
step.getCopy(),
step.getLinesRead(),
step.getLinesWritten(),
step.getLinesInput(),
step.getLinesOutput(),
step.getLinesUpdated(),
step.getLinesRejected(),
step.getErrors()
);
List<StepPerformanceSnapShot> snapShotList = stepPerformanceSnapShots.get(step.toString());
StepPerformanceSnapShot previous;
if (snapShotList==null) {
snapShotList = new ArrayList<StepPerformanceSnapShot>();
stepPerformanceSnapShots.put(step.toString(), snapShotList);
previous = null;
}
else {
previous = snapShotList.get(snapShotList.size()-1); // the last one...
}
// Make the difference...
//
snapShot.diff(previous, step.rowsetInputSize(), step.rowsetOutputSize());
synchronized(stepPerformanceSnapShots) {
snapShotList.add(snapShot);
if (stepPerformanceSnapshotSizeLimit>0 && snapShotList.size()>stepPerformanceSnapshotSizeLimit) {
snapShotList.remove(0);
}
}
}
lastStepPerformanceSnapshotSeqNrAdded = stepPerformanceSnapshotSeqNr.get();
}
}