com.ibm.streams.operator

Interface ProcessingElement



  • public interface ProcessingElement
    Information about an Operator's processing element.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.io.File getApplicationDirectory()
      Return the application directory for the SPL application.
      java.lang.String getApplicationName()
      Return the name of the SPL application.
      java.lang.String getApplicationScope()
      Return the application scope for the job the PE is running in.
      java.net.InetAddress getConfiguredHost()
      Get the host this PE is executing on.
      java.io.File getDataDirectory()
      Return the data directory for the SPL application.
      java.lang.String getDomainId()
      Return the Streams domain identifier for this PE.
      java.lang.String getInstanceId()
      Return the Streams instance identifier for this PE.
      java.lang.String getJobGroup()
      Return the name of the job group for the job the PE is running in.
      java.math.BigInteger getJobId()
      Get the runtime identifier for job containing this processing element.
      java.lang.String getJobName()
      Return the name of the job the PE is running in.
      PEMetrics getMetrics()
      Get the metrics information for this processing element.
      int getNumberOfInputPorts()
      Get the number of input ports for this processing element.
      int getNumberOfOutputPorts()
      Get the number of output ports for this processing element.
      java.io.File getOutputDirectory()
      Return the output directory for the compiled SPL application.
      java.math.BigInteger getPEId()
      Get the runtime identifier for this processing element.
      int getRelaunchCount()
      Return the number of times this PE has been relaunched.
      boolean hasDataDirectory()
      Does this job have a data directory.
      boolean isDebugging()
      Return if the PE is running under debug mode.
      boolean isOptimized()
      Return if the PE is running under optimized mode.
      boolean isProfilingOn()
      Return if the PE has profiling turned on.
      boolean isStandalone()
      Return true if this processing element is running in standalone mode.
      void setLoggerAspects(java.lang.String loggerName, java.lang.String... aspects)
      Set the aspects associated with a named Logger.
      void setTagData(java.lang.String tagName, java.util.Map<java.lang.String,java.lang.String> tagValues)
      Set tag data for the PE.
    • Method Detail

      • getOutputDirectory

        java.io.File getOutputDirectory()
        Return the output directory for the compiled SPL application.
        Returns:
        Output directory of the application.
      • getDataDirectory

        java.io.File getDataDirectory()
        Return the data directory for the SPL application.
        Returns:
        Data directory of the application.
        Throws:
        java.lang.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

        java.lang.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

        java.math.BigInteger getJobId()
        Get the runtime identifier for job containing this processing element.
        Returns:
        The job identifier for the current application.
      • getJobName

        java.lang.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

        java.math.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

        void setLoggerAspects(java.lang.String loggerName,
                            java.lang.String... aspects)
        Set the aspects associated with a named Logger. The aspects replace any existing aspects associated with any Logger of 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 name
        aspects - Aspects to associate with named logger.
        Since:
        InfoSphere® Streams Version 3.0
      • getApplicationDirectory

        java.io.File getApplicationDirectory()
        Return the application directory for the SPL application.
        Returns:
        application directory for the SPL application.
        Since:
        InfoSphere® Streams Version 3.0
      • getApplicationName

        java.lang.String getApplicationName()
        Return the name of the SPL application.
        Returns:
        name of the SPL application
        Since:
        InfoSphere® Streams Version 4.1
      • getApplicationScope

        java.lang.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 -a or --optimized-code-generation flag 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

        java.lang.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 -g or --debug flag 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 -P or --profile-all-operators flag to the SPL compiler (sc).
        Returns:
        True if the PE is running with profiling on, false otherwise.
        Since:
        InfoSphere Streams 3.1
      • getConfiguredHost

        java.net.InetAddress getConfiguredHost()
                                               throws java.net.UnknownHostException
        Get the host this PE is executing on.

        When running in distributed mode this returns the InetAddress for the interface configured for application use by the Streams instance. This may differ from from java.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:
        java.net.UnknownHostException
        Since:
        InfoSphere® Streams Version 4.0
      • getDomainId

        java.lang.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

        void setTagData(java.lang.String tagName,
                      java.util.Map<java.lang.String,java.lang.String> tagValues)
        Set tag data for the PE. If this value is Operator.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