public abstract class BaseFileInputStep<M extends BaseFileInputMeta<?,?,?>,D extends BaseFileInputStepData> extends BaseStep implements IBaseFileInputStepControl
Modifier and Type | Field and Description |
---|---|
protected D |
data |
protected M |
meta |
deadLockCounter, extensionDataMap, first, linesInput, linesOutput, linesRead, linesRejected, linesSkipped, linesUpdated, linesWritten, log, metaStore, repository, rowListeners, safeStopped, terminator, terminator_rows, variables
Constructor and Description |
---|
BaseFileInputStep(StepMeta stepMeta,
StepDataInterface stepDataInterface,
int copyNr,
TransMeta transMeta,
Trans trans) |
Modifier and Type | Method and Description |
---|---|
boolean |
checkFeedback(long lines)
Check feedback.
|
protected void |
closeLastFile()
Close last opened file/
|
protected abstract IBaseFileInputReader |
createReader(M meta,
D data,
org.apache.commons.vfs2.FileObject file)
Create reader for specific file.
|
void |
dispose(StepMetaInterface smi,
StepDataInterface sdi)
Dispose step.
|
boolean |
failAfterBadFile(String errorMsg) |
protected void |
fillFileAdditionalFields(D data,
org.apache.commons.vfs2.FileObject file)
Prepare file-dependent data for fill additional fields.
|
protected boolean |
handleOpenFileException(Exception e) |
protected abstract boolean |
init()
Content-dependent initialization.
|
boolean |
init(StepMetaInterface smi,
StepDataInterface sdi)
Initialize step before execute.
|
protected boolean |
openNextFile()
Open next VFS file for processing.
|
protected void |
prepareToRowProcessing()
Prepare to process.
|
boolean |
processRow(StepMetaInterface smi,
StepDataInterface sdi)
Process next row.
|
addResultFile, addRowListener, addRowSetToInputRowSets, addRowSetToOutputRowSets, addStepListener, batchComplete, buildLog, canProcessOneRow, cleanup, clearInputRowSets, clearOutputRowSets, closeQuietly, copyVariablesFrom, decrementLinesRead, decrementLinesWritten, dispatch, environmentSubstitute, environmentSubstitute, environmentSubstitute, fieldSubstitute, findInputRowSet, findInputRowSet, findOutputRowSet, findOutputRowSet, getBooleanValueOfVariable, getClusterSize, getContainerObjectId, getCopy, getCurrentInputRowSetNr, getCurrentOutputRowSetNr, getDispatcher, getErrorRowMeta, getErrors, getExtensionDataMap, getFilename, getFirstInputRowSet, getInputRowMeta, getInputRowSets, getLinesInput, getLinesOutput, getLinesRead, getLinesRejected, getLinesSkipped, getLinesUpdated, getLinesWritten, getLogChannel, getLogChannelId, getLogFields, getLogLevel, getMetaStore, getNextClassNr, getObjectCopy, getObjectId, getObjectName, getObjectRevision, getObjectType, getOutputRowSets, getParent, getParentVariableSpace, getPartitionID, getPartitionTargets, getPreviewRowMeta, getProcessed, getRegistrationDate, getRemoteInputSteps, getRemoteOutputSteps, getRepartitioning, getRepository, getRepositoryDirectory, getResultFiles, getRow, getRowFrom, getRowHandler, getRowListeners, getRuntime, getServerSockets, getSlaveNr, getSocketRepository, getStatus, getStatusDescription, getStepDataInterface, getStepID, getStepListeners, getStepMeta, getStepMetaInterface, getStepname, getTrans, getTransMeta, getTypeId, getUniqueStepCountAcrossSlaves, getUniqueStepNrAcrossSlaves, getVariable, getVariable, handleGetRowFrom, handlePutRowTo, identifyErrorOutput, incrementLinesInput, incrementLinesOutput, incrementLinesRead, incrementLinesRejected, incrementLinesSkipped, incrementLinesUpdated, incrementLinesWritten, initBeforeStart, initializeVariablesFrom, injectVariables, isBasic, isDebug, isDetailed, isDistributed, isForcingSeparateLogging, isGatheringMetrics, isInitialising, isMapping, isPartitioned, isPaused, isRowLevel, isRunning, isSafeStopped, isStopped, isUsingThreadPriorityManagment, listVariables, logBasic, logBasic, logDebug, logDebug, logDetailed, logDetailed, logError, logError, logError, logMinimal, logMinimal, logRowlevel, logRowlevel, logSummary, markStart, markStop, openRemoteInputStepSocketsOnce, openRemoteOutputStepSocketsOnce, outputIsDone, pauseRunning, putError, putRow, putRowTo, removeRowListener, resumeRunning, rowsetInputSize, rowsetOutputSize, safeModeChecking, safeModeChecking, setCarteObjectId, setCopy, setCurrentInputRowSetNr, setCurrentOutputRowSetNr, setDistributed, setErrorRowMeta, setErrors, setForcingSeparateLogging, setGatheringMetrics, setInputRowMeta, setInputRowSets, setInternalVariables, setLinesInput, setLinesOutput, setLinesRead, setLinesRejected, setLinesSkipped, setLinesUpdated, setLinesWritten, setLogLevel, setMetaStore, setOutputDone, setOutputRowSets, setParentVariableSpace, setPartitioned, setPartitionID, setPartitionTargets, setPaused, setPaused, setPreviewRowMeta, setRepartitioning, setRepository, setRowHandler, setRunning, setSafeStopped, setServerSockets, setSocketRepository, setStepDataInterface, setStepListeners, setStepMeta, setStepMetaInterface, setStepname, setStopped, setTransMeta, setUsingThreadPriorityManagment, setVariable, shareVariablesWith, stopAll, stopRunning, stopRunning, swapFirstInputRowSetIfExists, toString, verifyInputDeadLock, waitUntilTransformationIsStarted
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getErrors, getLinesInput, getLinesWritten, incrementLinesInput, incrementLinesUpdated, putRow, setErrors, stopAll
subStatuses
protected M extends BaseFileInputMeta<?,?,?> meta
protected D extends BaseFileInputStepData data
public BaseFileInputStep(StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta, Trans trans)
protected abstract boolean init()
protected abstract IBaseFileInputReader createReader(M meta, D data, org.apache.commons.vfs2.FileObject file) throws Exception
Exception
public boolean init(StepMetaInterface smi, StepDataInterface sdi)
init
in interface StepInterface
init
in class BaseStep
smi
- The metadata to work withsdi
- The data to initializeprotected boolean openNextFile()
protected boolean handleOpenFileException(Exception e)
public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException
processRow
in interface StepInterface
processRow
in class BaseStep
smi
- The steps metadata to work withsdi
- The steps temporary working data to work with (database connections, result sets, caches, temporary
variables, etc.)KettleException
protected void prepareToRowProcessing() throws KettleException
KettleException
public boolean checkFeedback(long lines)
BaseStep
checkFeedback
in interface IBaseFileInputStepControl
checkFeedback
in class BaseStep
lines
- the linesprotected void closeLastFile()
public void dispose(StepMetaInterface smi, StepDataInterface sdi)
dispose
in interface StepInterface
dispose
in class BaseStep
smi
- The metadata to work withsdi
- The data to dispose ofpublic boolean failAfterBadFile(String errorMsg)
failAfterBadFile
in interface IBaseFileInputStepControl
errorMsg
- Message to send to rejected row if enabledprotected void fillFileAdditionalFields(D data, org.apache.commons.vfs2.FileObject file) throws org.apache.commons.vfs2.FileSystemException
org.apache.commons.vfs2.FileSystemException
Copyright © 2020 Hitachi Vantara. All rights reserved.