use of org.pentaho.di.core.ProgressNullMonitorListener in project pentaho-metaverse by pentaho.
the class MergeJoinStepAnalyzer method getInputFields.
@Override
public Map<String, RowMetaInterface> getInputFields(MergeJoinMeta meta) {
Map<String, RowMetaInterface> rowMeta = null;
try {
validateState(null, meta);
} catch (MetaverseAnalyzerException e) {
// eat it
}
if (parentTransMeta != null) {
rowMeta = new HashMap<>();
try {
StepMeta stepMeta1 = meta.getStepIOMeta().getInfoStreams().get(0).getStepMeta();
ProgressNullMonitorListener progress = new ProgressNullMonitorListener();
leftStepFields = parentTransMeta.getStepFields(stepMeta1, progress);
progress.done();
progress = new ProgressNullMonitorListener();
StepMeta stepMeta2 = meta.getStepIOMeta().getInfoStreams().get(1).getStepMeta();
rightStepFields = parentTransMeta.getStepFields(stepMeta2, progress);
progress.done();
rowMeta.put(stepMeta1.getName(), leftStepFields);
rowMeta.put(stepMeta2.getName(), rightStepFields);
} catch (Throwable t) {
// eat it
}
}
return rowMeta;
}
use of org.pentaho.di.core.ProgressNullMonitorListener in project pentaho-metaverse by pentaho.
the class TransExecutorStepAnalyzer method getOutputRowMetaInterfaces.
@Override
protected Map<String, RowMetaInterface> getOutputRowMetaInterfaces(TransExecutorMeta meta) {
Map<String, RowMetaInterface> outputFields = new HashMap<>();
String[] nextStepNames = parentTransMeta.getNextStepNames(parentStepMeta);
for (int i = 0; i < nextStepNames.length; i++) {
String nextStepName = nextStepNames[i];
StepMeta step = parentTransMeta.findStep(nextStepName);
ProgressNullMonitorListener progressMonitor = new ProgressNullMonitorListener();
try {
RowMetaInterface prevStepFields = parentTransMeta.getPrevStepFields(step, progressMonitor);
outputFields.put(nextStepName, prevStepFields);
progressMonitor.done();
} catch (KettleStepException e) {
log.warn("Could not get step fields for " + nextStepName, e);
}
}
return outputFields;
}
use of org.pentaho.di.core.ProgressNullMonitorListener in project pentaho-metaverse by pentaho.
the class StepAnalyzer method getOutputFields.
@Override
public RowMetaInterface getOutputFields(T meta) {
RowMetaInterface rmi = null;
try {
validateState(null, meta);
} catch (MetaverseAnalyzerException e) {
// eat it
}
if (parentTransMeta != null) {
try {
ProgressNullMonitorListener progressMonitor = new ProgressNullMonitorListener();
rmi = parentTransMeta.getStepFields(parentStepMeta, progressMonitor);
progressMonitor.done();
} catch (KettleStepException e) {
rmi = null;
}
}
return rmi;
}
use of org.pentaho.di.core.ProgressNullMonitorListener in project pentaho-metaverse by pentaho.
the class StepAnalyzer method getInputFields.
@Override
public Map<String, RowMetaInterface> getInputFields(T meta) {
Map<String, RowMetaInterface> rowMeta = null;
try {
validateState(null, meta);
} catch (MetaverseAnalyzerException e) {
// eat it
}
if (parentTransMeta != null) {
try {
rowMeta = new HashMap<String, RowMetaInterface>();
ProgressNullMonitorListener progressMonitor = new ProgressNullMonitorListener();
prevStepNames = parentTransMeta.getPrevStepNames(parentStepMeta);
RowMetaInterface rmi = parentTransMeta.getPrevStepFields(parentStepMeta, progressMonitor);
progressMonitor.done();
if (!ArrayUtils.isEmpty(prevStepNames)) {
rowMeta.put(prevStepNames[0], rmi);
}
} catch (KettleStepException e) {
rowMeta = null;
}
}
return rowMeta;
}
use of org.pentaho.di.core.ProgressNullMonitorListener in project pentaho-metaverse by pentaho.
the class JobExecutorStepAnalyzer method getOutputRowMetaInterfaces.
@Override
protected Map<String, RowMetaInterface> getOutputRowMetaInterfaces(JobExecutorMeta meta) {
Map<String, RowMetaInterface> outputFields = new HashMap<>();
String[] nextStepNames = parentTransMeta.getNextStepNames(parentStepMeta);
for (int i = 0; i < nextStepNames.length; i++) {
String nextStepName = nextStepNames[i];
StepMeta step = parentTransMeta.findStep(nextStepName);
ProgressNullMonitorListener progressMonitor = new ProgressNullMonitorListener();
try {
RowMetaInterface prevStepFields = parentTransMeta.getPrevStepFields(step, progressMonitor);
outputFields.put(nextStepName, prevStepFields);
progressMonitor.done();
} catch (KettleStepException e) {
log.warn("Could not get step fields for " + nextStepName, e);
}
}
return outputFields;
}
Aggregations