本文整理匯總了Java中org.pentaho.di.trans.step.StepInterface.getLinesUpdated方法的典型用法代碼示例。如果您正苦於以下問題:Java StepInterface.getLinesUpdated方法的具體用法?Java StepInterface.getLinesUpdated怎麽用?Java StepInterface.getLinesUpdated使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.pentaho.di.trans.step.StepInterface
的用法示例。
在下文中一共展示了StepInterface.getLinesUpdated方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getProcessCount
import org.pentaho.di.trans.step.StepInterface; //導入方法依賴的package包/類
public static double getProcessCount(Context actualContext, Scriptable actualObject, Object[] ArgList, Function FunctionContext){
if(ArgList.length==1){
try{
Object scmO = actualObject.get("_step_", actualObject);
StepInterface scm = (StepInterface)Context.jsToJava(scmO, StepInterface.class);
String strType = Context.toString(ArgList[0]).toLowerCase();
if(strType.equals("i")) return (double)scm.getLinesInput();
else if(strType.equals("o")) return (double)scm.getLinesOutput();
else if(strType.equals("r")) return (double)scm.getLinesRead();
else if(strType.equals("u")) return (double)scm.getLinesUpdated();
else if(strType.equals("w")) return (double)scm.getLinesWritten();
else if(strType.equals("e")) return (double)scm.getLinesRejected();
else return 0;
}catch(Exception e){
//throw Context.reportRuntimeError(e.toString());
return 0;
}
}else{
throw Context.reportRuntimeError("The function call getProcessCount requires 1 argument.");
}
}
示例2: 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);
}
}
}
示例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();
}
}