Interface ProcessingElement


public interface ProcessingElement
Information about an Operator's processing element.
  • Field Details

  • 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

      void setLoggerAspects(String loggerName, 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

      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 -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

      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

      InetAddress getConfiguredHost() throws 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:
      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

      void setTagData(String tagName, Map<String,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
    • getApplicationConfiguration

      Map<String,String> getApplicationConfiguration(String name)
      Get the application configuration specified by name. 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

      File getToolkitDirectory(String toolkitName)
      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 (sab file).

      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: