Interface ProcessingElement
Operator's
processing element.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionGet the application configuration specified byname.Return the application directory for the SPL application.Return the name of the SPL application.Return the application scope for the job the PE is running in.Get the host this PE is executing on.Return the data directory for the SPL application.Return the Streams domain identifier for this PE.Return the Streams instance identifier for this PE.Return the name of the job group for the job the PE is running in.getJobId()Get the runtime identifier for job containing this processing element.Return the name of the job the PE is running in.Get the metrics information for this processing element.intGet the number of input ports for this processing element.intGet the number of output ports for this processing element.Return the output directory for the compiled SPL application.getPEId()Get the runtime identifier for this processing element.intReturn the number of times this PE has been relaunched.getToolkitDirectory(String toolkitName) Get the absolute path of the root directory for the specified toolkit.booleanDoes this job have a data directory.booleanReturn if the PE is running under debug mode.booleanReturn if the PE is running under optimized mode.booleanReturn if the PE has profiling turned on.booleanReturn true if this processing element is running in standalone mode.voidsetLoggerAspects(String loggerName, String... aspects) Set the aspects associated with a namedLogger.voidsetTagData(String tagName, Map<String, String> tagValues) Set tag data for the PE.
-
Field Details
-
IBM_Teracloud_ApS_COPYRIGHT
- See Also:
-
-
Method Details
-
getOutputDirectory
File getOutputDirectory()Return the output directory for the compiled SPL application.- Returns:
- Output directory of the application.
-
getDataDirectory
File getDataDirectory()Return the data directory for the SPL application.- Returns:
- Data directory of the application.
- Throws:
IllegalStateException- No data directory has been specified for the application.
-
hasDataDirectory
boolean hasDataDirectory()Does this job have a data directory.- Returns:
- True if a data directory was specified for this job's execution, false otherwise.
- Since:
- InfoSphere® Streams Version 4.0
-
getJobGroup
String getJobGroup()Return the name of the job group for the job the PE is running in.- Returns:
- name for the job group for the job the PE is running in
- Since:
- InfoSphere® Streams Version 4.1
-
getJobId
BigInteger getJobId()Get the runtime identifier for job containing this processing element.- Returns:
- The job identifier for the current application.
-
getJobName
String getJobName()Return the name of the job the PE is running in.- Returns:
- name for the job the PE is running in
- Since:
- InfoSphere® Streams Version 4.0.1
-
getPEId
BigInteger getPEId()Get the runtime identifier for this processing element.- Returns:
- The identifier for the this PE.
-
getMetrics
PEMetrics getMetrics()Get the metrics information for this processing element.- Returns:
- PEMetrics object.
-
getNumberOfOutputPorts
int getNumberOfOutputPorts()Get the number of output ports for this processing element. -
getNumberOfInputPorts
int getNumberOfInputPorts()Get the number of input ports for this processing element. -
isStandalone
boolean isStandalone()Return true if this processing element is running in standalone mode.- Returns:
- True if this processing element is running in standalone mode, false otherwise.
-
setLoggerAspects
Set the aspects associated with a namedLogger. The aspects replace any existing aspects associated with anyLoggerof the given name. Aspects are not inherited by any child loggers.The aspects are handled to the SPL log or trace facilities for each message logged by the named
Logger. The operator's name is automatically added into the set of aspects by the SPL runtime.
Aspects allow subsets of messages to be extracted from the SPL log or trace.- Parameters:
loggerName- Logger nameaspects- Aspects to associate with named logger.- Since:
- InfoSphere® Streams Version 3.0
-
getApplicationDirectory
File getApplicationDirectory()Return the application directory for the SPL application.- Returns:
- application directory for the SPL application.
- Since:
- InfoSphere® Streams Version 3.0
-
getApplicationName
String getApplicationName()Return the name of the SPL application.- Returns:
- name of the SPL application
- Since:
- InfoSphere® Streams Version 4.1
-
getApplicationScope
String getApplicationScope()Return the application scope for the job the PE is running in.- Returns:
- application scope for the job the PE is running in
- Since:
- InfoSphere® Streams Version 3.0
-
isOptimized
boolean isOptimized()Return if the PE is running under optimized mode. Optimized mode is set by the-aor--optimized-code-generationflag to the SPL compiler (sc).
Operators may choose to reduce runtime checking when in optimized mode.- Returns:
- True if the PE is running under optimized mode, false otherwise.
- Since:
- InfoSphere® Streams Version 3.0
-
getRelaunchCount
int getRelaunchCount()Return the number of times this PE has been relaunched. For the first execution, the value will be 0.- Returns:
- number of times this PE has been relaunched.
- Since:
- InfoSphere® Streams Version 3.0
-
getInstanceId
String getInstanceId()Return the Streams instance identifier for this PE. When in standalone this will be the current operating system user identifier.- Returns:
- Instance identifier for this PE or the user identifier for standalone mode.
- Since:
- InfoSphere® Streams Version 3.0
-
isDebugging
boolean isDebugging()Return if the PE is running under debug mode. Optimized mode is set by the-gor--debugflag to the SPL compiler (sc).- Returns:
- True if the PE is running under debug mode, false otherwise.
- Since:
- InfoSphere Streams 3.1
-
isProfilingOn
boolean isProfilingOn()Return if the PE has profiling turned on. Profiling mode is set by the-Por--profile-all-operatorsflag to the SPL compiler (sc).- Returns:
- True if the PE is running with profiling on, false otherwise.
- Since:
- InfoSphere Streams 3.1
-
getConfiguredHost
Get the host this PE is executing on.When running in distributed mode this returns the
InetAddressfor the interface configured for application use by the Streams instance. This may differ from fromjava.net.InetAddress.getLocalHost()if there are multiple network interfaces on this host.When running in standalone or using the test framework, this returns
java.net.InetAddress.getLocalHost().- Returns:
- Host this PE is executing on
- Throws:
UnknownHostException- Since:
- InfoSphere® Streams Version 4.0
-
getDomainId
String getDomainId()Return the Streams domain identifier for this PE. When in standalone this will be the current operating system user identifier.- Returns:
- Domain identifier for this PE or the user identifier for standalone mode.
- Since:
- InfoSphere® Streams Version 4.0
-
setTagData
Set tag data for the PE. If this value isOperator.TagNames.OperatorIGC, the tags will be registered in the IG catalog. Other tag names may be defined in future releases.- Since:
- InfoSphere® Streams Version 4.1
-
getApplicationConfiguration
Get the application configuration specified byname. This method returns an unmodifiable map which provides users with read-only access. An empty map is returned if the configuration is not found.- Parameters:
name- the configuration name- Returns:
- the configuration
- Since:
- IBM Streams Version 4.2
-
getToolkitDirectory
Get the absolute path of the root directory for the specified toolkit.At SPL compile time this is the location of the toolkit specified to the SPL compiler
sc.
At runtime this is the location of the toolkit in the application landing zone that has been unpacked from the application's bundle (sabfile).Java native functions use this method to retrieve the root directory of their toolkit or of dependent toolkits which have been unpacked from the application's bundle. Code running within the context of a Java operator should use
OperatorContext.getToolkitDirectory()to get their toolkit's root directory.- Parameters:
toolkitName- name of the toolkit- Returns:
- the absolute path of the toolkit root directory
- Since:
- IBM Streams Version 4.2
- See Also:
-