public class ProcessingContainer_Impl extends ProcessingContainer implements RunnableContainer
| Modifier and Type | Field and Description |
|---|---|
ServiceProxyPool |
casProcessorPool
The cas processor pool.
|
LinkedList |
failedCasProcessorList
The failed cas processor list.
|
PARAM_AGGREGATE_SOFA_MAPPINGS, PARAM_CONFIG_MANAGER, PARAM_CONFIG_PARAM_SETTINGS, PARAM_EXTERNAL_OVERRIDE_SETTINGS, PARAM_PERFORMANCE_TUNING_SETTINGS, PARAM_RESOURCE_MANAGER, PARAM_UIMA_CONTEXTDISABLED, INITIALIZED, KILLED, NOTINITIALIZED, RUNNING| Constructor and Description |
|---|
ProcessingContainer_Impl(CasProcessorConfiguration aCasProcessorConfig,
org.apache.uima.resource.metadata.ProcessingResourceMetaData aMetaData,
ServiceProxyPool aCasProcessorPool)
Initialize container with CasProcessor configuration and pool containing instances of
CasProcessor instances.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
abortCPMOnError()
Returns true if maximum threshold for errors has been exceeded and the CasProcessor is
configured to force CPE shutdown.
|
void |
addBytesIn(long aBytesIn)
Aggregate total bytes ingested by the CasProcessor.
|
void |
addBytesOut(long aBytesOut)
Aggregate total bytes processed by this CasProcessor.
|
void |
addStat(String aStatName,
Object aStat)
Add an arbitrary object and bind it to a given name.
|
void |
destroy()
Destroy instances of CasProcessors managed by this container.
|
int |
getAbortCount()
Return the up todate number of aborts recorded by the container.
|
HashMap |
getAllStats()
Returns all stats aggregate during the CPM run.
|
long |
getBytesIn()
Returns total number of bytes ingested so far by all CasProcessor instances managed by this
container.
|
long |
getBytesOut()
Returns total number of bytes processed so far by all CasProcessor instances managed by this
container.
|
org.apache.uima.collection.base_cpm.CasProcessor |
getCasProcessor()
Returns available instance of the CasProcessor from the instance pool.
|
CasProcessorConfiguration |
getCasProcessorConfiguration()
Returns CasProcessor configuration object.
|
Object |
getConfigParameterValue(String aParamName) |
Object |
getConfigParameterValue(String aGroupName,
String aParamName) |
CasProcessorDeployer |
getDeployer()
Returns deployer object used to launch the CasProcessor.
|
long |
getFetchTime()
Gets the fetch time.
|
int |
getFilteredCount()
Returns number of filtered Cas'es.
|
Object |
getLastCas()
Deprecated.
|
String |
getLastProcessedEntityId()
Returns id of the last entity processed by the CasProcessor.
|
org.apache.uima.resource.metadata.ProcessingResourceMetaData |
getMetadata()
Returns component's input/output capabilities.
|
org.apache.uima.resource.metadata.ResourceMetaData |
getMetaData() |
String |
getName()
Returns the name of this container.
|
ServiceProxyPool |
getPool() |
long |
getProcessed()
Returns number of entities processed so far.
|
long |
getRemaining()
Returns number of entities still to be processed by the CasProcessor It is a delta of total
number of entities to be processed by the CPE minus number of entities processed so far.
|
int |
getRestartCount()
Returns total number of all CasProcessor restarts.
|
int |
getRetryCount()
Return the up todate number of retries recorded by the container.
|
Object |
getStat(String aStatName)
Return an abject identified with a given name.
|
int |
getStatus()
Returns the current status of the CasProcessor.
|
long |
getTotalTime()
Returns total time spent in process().
|
void |
incrementAbortCount(int aCount)
Increment number of aborted Cas'es due to inability to process the Cas.
|
void |
incrementCasProcessorErrors(Throwable aThrowable)
This routine determines what to do with an exception thrown during the CasProcessor processing.
|
void |
incrementFilteredCount(int aCount)
Increments number of CAS'es filtered by the CasProcessor.
|
void |
incrementProcessed(int aIncrement)
Increment processed.
|
void |
incrementRestartCount(int aCount)
Increment number of times the casProcessor was restarted due to failures.
|
void |
incrementRetryCount(int aCount)
Increments number of times CasProceesor failed analyzing Cas'es due to timeout or some other
problems.
|
void |
incrementStat(String aStatName,
Integer aStat)
Increment a value of a given stat.
|
void |
incrementTotalTime(long aTime)
Increments total time spend in the process() method of the CasProcessor.
|
boolean |
initialize(org.apache.uima.resource.ResourceSpecifier aSpecifier,
Map aAdditionalParams) |
boolean |
isAbortable()
Determines if instances of CasProcessor managed by this container are abortable.
|
boolean |
isEndOfBatch(org.apache.uima.collection.base_cpm.CasProcessor aCasProcessor,
int aProcessedSize) |
boolean |
isIntegrated()
Deprecated.
|
boolean |
isLocal()
Deprecated.
|
boolean |
isPaused() |
boolean |
isRemote()
Deprecated.
|
boolean |
isSingleFencedService() |
void |
logAbortedCases(Object[] abortedCasList)
Logs Cas'es that could not be processed.
|
void |
pause()
Pauses the container until resumed.
|
boolean |
processCas(Object[] aCasList)
Returns true if the Cas bundles should be processed by the CasProcessor.
|
void |
reconfigure() |
void |
releaseCasProcessor(org.apache.uima.collection.base_cpm.CasProcessor aCasProcessor)
Returns a given casProcessor instance back to the pool.
|
void |
resetRestartCount() |
void |
resume() |
void |
run() |
void |
setCasProcessorDeployer(CasProcessorDeployer aDeployer)
Plug in deployer object used to launch/deploy the CasProcessor instance.
|
void |
setConfigParameterValue(String aParamName,
Object aValue) |
void |
setConfigParameterValue(String aGroupName,
String aParamName,
Object aValue) |
void |
setLastCas(Object aCasObject)
Deprecated.
|
void |
setLastProcessedEntityId(String aEntityId)
Copies id of the last entity processed by the CasProcessor.
|
void |
setMetadata(org.apache.uima.resource.metadata.ProcessingResourceMetaData aMetadata)
Sets component's input/output capabilities.
|
void |
setProcessed(long aProcessedCount)
Used when recovering from checkpoint, sets the total number of entities before CPE stopped.
|
void |
setRemaining(long aRemainingCount)
Copies number of entities the CasProcessor has yet to process.
|
void |
setSingleFencedService(boolean aSingleFencedInstance) |
void |
setStatus(int aStatus)
Changes the status of the CasProcessor as a group.
|
void |
start()
Deprecated.
|
void |
stop()
Deprecated.
|
getCasManager, getLogger, getRelativePathResolver, getResourceManager, getUimaContext, getUimaContextAdmin, loadUserClass, loadUserClassOrThrow, setContextHolder, setContextHolderX, setLogger, setMetaData, withContextHolderpublic ServiceProxyPool casProcessorPool
public LinkedList failedCasProcessorList
public ProcessingContainer_Impl(CasProcessorConfiguration aCasProcessorConfig, org.apache.uima.resource.metadata.ProcessingResourceMetaData aMetaData, ServiceProxyPool aCasProcessorPool) throws org.apache.uima.resource.ResourceConfigurationException
aCasProcessorConfig - -
CasProcessor configuration as defined in cpe descriptoraMetaData - the a meta dataaCasProcessorPool - -
pool of CasProcessor instancesorg.apache.uima.resource.ResourceConfigurationException - the resource configuration exceptionpublic org.apache.uima.resource.metadata.ProcessingResourceMetaData getMetadata()
public void setMetadata(org.apache.uima.resource.metadata.ProcessingResourceMetaData aMetadata)
setMetadata in class ProcessingContaineraMetadata - component capabilitiespublic void setCasProcessorDeployer(CasProcessorDeployer aDeployer)
setCasProcessorDeployer in class ProcessingContaineraDeployer - -
object responsible for deploying/launching CasProcessorpublic CasProcessorDeployer getDeployer()
getDeployer in class ProcessingContainerpublic void logAbortedCases(Object[] abortedCasList)
logAbortedCases in class ProcessingContainerabortedCasList - -
an arrar of Cas'es that could not be processed by this CasProcessorpublic long getBytesIn()
getBytesIn in class ProcessingContainerpublic void addBytesIn(long aBytesIn)
addBytesIn in class ProcessingContaineraBytesIn - - number of ingested bytespublic long getBytesOut()
getBytesOut in class ProcessingContainerpublic void addBytesOut(long aBytesOut)
addBytesOut in class ProcessingContaineraBytesOut - the a bytes outpublic void incrementRestartCount(int aCount)
incrementRestartCount in class ProcessingContaineraCount - - restart countpublic int getRestartCount()
getRestartCount in class ProcessingContainerpublic void incrementRetryCount(int aCount)
incrementRetryCount in class ProcessingContaineraCount - - failure countpublic int getRetryCount()
getRetryCount in class ProcessingContainerpublic void incrementAbortCount(int aCount)
incrementAbortCount in class ProcessingContaineraCount - - number of aborts while processing Cas'espublic int getAbortCount()
getAbortCount in class ProcessingContainerpublic void incrementFilteredCount(int aCount)
incrementFilteredCount in class ProcessingContaineraCount - -
number of filtered Cas'espublic int getFilteredCount()
getFilteredCount in class ProcessingContainerpublic long getRemaining()
getRemaining in class ProcessingContainerpublic void setRemaining(long aRemainingCount)
setRemaining in class ProcessingContaineraRemainingCount - -
number of entities to processpublic void setLastProcessedEntityId(String aEntityId)
setLastProcessedEntityId in class ProcessingContaineraEntityId - - id of the entitypublic String getLastProcessedEntityId()
getLastProcessedEntityId in class ProcessingContainer@Deprecated public void setLastCas(Object aCasObject)
setLastCas in class ProcessingContaineraCasObject - the new last cas@Deprecated public Object getLastCas()
getLastCas in class ProcessingContainerpublic void incrementProcessed(int aIncrement)
aIncrement - the a incrementpublic void setProcessed(long aProcessedCount)
setProcessed in class ProcessingContaineraProcessedCount - - number of entities processed before CPE stoppedpublic long getProcessed()
getProcessed in class ProcessingContainerpublic void resetRestartCount()
resetRestartCount in class ProcessingContainerpublic void incrementTotalTime(long aTime)
incrementTotalTime in class ProcessingContaineraTime - -
total time in process()public long getTotalTime()
getTotalTime in class ProcessingContainerpublic boolean abortCPMOnError()
abortCPMOnError in class ProcessingContainerpublic void incrementCasProcessorErrors(Throwable aThrowable) throws Exception
incrementCasProcessorErrors in class ProcessingContaineraThrowable - - exception to examineException - the exceptionpublic boolean isEndOfBatch(org.apache.uima.collection.base_cpm.CasProcessor aCasProcessor,
int aProcessedSize)
throws org.apache.uima.resource.ResourceProcessException,
IOException
isEndOfBatch in class ProcessingContainerorg.apache.uima.resource.ResourceProcessExceptionIOExceptionpublic boolean processCas(Object[] aCasList)
processCas in class ProcessingContaineraCasList - -
bundle containing instances of CASpublic CasProcessorConfiguration getCasProcessorConfiguration()
getCasProcessorConfiguration in class ProcessingContainerCasProcessorConfiguration instance@Deprecated public void start()
start in interface RunnableContainer@Deprecated public void stop()
stop in interface RunnableContainerpublic org.apache.uima.collection.base_cpm.CasProcessor getCasProcessor()
getCasProcessor in interface CasProcessorControllerpublic void releaseCasProcessor(org.apache.uima.collection.base_cpm.CasProcessor aCasProcessor)
releaseCasProcessor in class ProcessingContaineraCasProcessor - -
an instance of CasProcessor to return back to the poolProcessingContainer.releaseCasProcessor(org.apache.uima.collection.base_cpm.CasProcessor)public int getStatus()
getStatus in interface CasProcessorControllerpublic void setStatus(int aStatus)
setStatus in interface CasProcessorControlleraStatus - -
new status@Deprecated public boolean isLocal()
isLocal in interface CasProcessorController@Deprecated public boolean isRemote()
isRemote in interface CasProcessorController@Deprecated public boolean isIntegrated()
isIntegrated in interface CasProcessorControllerpublic boolean isAbortable()
isAbortable in interface CasProcessorControllerpublic boolean initialize(org.apache.uima.resource.ResourceSpecifier aSpecifier,
Map aAdditionalParams)
throws org.apache.uima.resource.ResourceInitializationException
initialize in interface org.apache.uima.resource.Resourceinitialize in class org.apache.uima.resource.Resource_ImplBaseorg.apache.uima.resource.ResourceInitializationExceptionpublic void destroy()
destroy in interface org.apache.uima.resource.Resourcedestroy in class org.apache.uima.resource.Resource_ImplBasepublic Object getConfigParameterValue(String aParamName)
getConfigParameterValue in interface org.apache.uima.resource.ConfigurableResourcepublic Object getConfigParameterValue(String aGroupName, String aParamName)
getConfigParameterValue in interface org.apache.uima.resource.ConfigurableResourcepublic void setConfigParameterValue(String aParamName, Object aValue)
setConfigParameterValue in interface org.apache.uima.resource.ConfigurableResourcepublic void setConfigParameterValue(String aGroupName, String aParamName, Object aValue)
setConfigParameterValue in interface org.apache.uima.resource.ConfigurableResourcepublic void reconfigure()
throws org.apache.uima.resource.ResourceConfigurationException
reconfigure in interface org.apache.uima.resource.ConfigurableResourceorg.apache.uima.resource.ResourceConfigurationExceptionpublic String getName()
getName in class ProcessingContainerpublic org.apache.uima.resource.metadata.ResourceMetaData getMetaData()
getMetaData in interface org.apache.uima.resource.ResourcegetMetaData in class org.apache.uima.resource.Resource_ImplBasepublic void incrementStat(String aStatName, Integer aStat)
incrementStat in class ProcessingContaineraStatName - the a stat nameaStat - the a statpublic void addStat(String aStatName, Object aStat)
addStat in class ProcessingContaineraStatName - the a stat nameaStat - the a statpublic Object getStat(String aStatName)
getStat in class ProcessingContaineraStatName - the a stat namepublic HashMap getAllStats()
getAllStats in class ProcessingContainerpublic void pause()
pause in class ProcessingContainerpublic void resume()
resume in class ProcessingContainerpublic boolean isPaused()
isPaused in class ProcessingContainerpublic ServiceProxyPool getPool()
getPool in class ProcessingContainerpublic void setSingleFencedService(boolean aSingleFencedInstance)
setSingleFencedService in class ProcessingContainerpublic boolean isSingleFencedService()
isSingleFencedService in class ProcessingContainerpublic long getFetchTime()
Copyright © 2006–2017 The Apache Software Foundation. All rights reserved.