Package com.rpl.rama

Interface RamaModule.Setup

Enclosing interface:
RamaModule

public static interface RamaModule.Setup
Used to define depots, global objects, and module dependencies in a module definition.
  • Method Details

    • declareDepot

      Depot.Declaration declareDepot(String var, com.rpl.rama.impl.NativeDepotPartitioning partitioning)
      Defines a depot with the given partitioning scheme.
      Parameters:
      var - Var to reference the depot in topologies. Also the name of the depot for usage by other modules or clients.
      partitioning - Partitioning scheme for depot appends from clients. Can either be a native scheme from the static methods on Depot or a custom partitioning scheme implementing Depot.Partitioning.
      Returns:
      Builder-style object for setting additional options on the depot
    • declareDepot

      <T extends Depot.Partitioning> Depot.Declaration declareDepot(String var, Class<T> partitioning)
      Defines a depot with the given partitioning scheme.
      Parameters:
      var - Var to reference the depot in topologies. Also the name of the depot for usage by other modules or clients.
      partitioning - Partitioning scheme for depot appends from clients. Can either be a native scheme from the static methods on Depot or a custom partitioning scheme implementing Depot.Partitioning.
      Returns:
      Builder-style object for setting additional options on the depot
    • declareTickDepot

      void declareTickDepot(String var, long frequencyMillis)
      Defines a depot that emits at the given frequency of time. Can be used in any ETL topology and cannot be appended to by clients.
      Parameters:
      var - Var to reference the depot in topologies
      frequencyMillis - Frequency to emit in milliseconds. In microbatch topologies can only emit as fast as the latency of a single microbatch.
      See Also:
    • declareObject

      void declareObject(String var, Object obj)
      Defines an object to be copied to all tasks. If provided object implements TaskGlobalObject, the object will have a specialized instance per task. This can be used to integrate external queues, databases, or other tools with Rama.
      Parameters:
      var - Var to reference the object in topologies
      obj - Value of the object
      See Also:
    • clusterDepot

      void clusterDepot(String var, String moduleName, String depotName)
      Defines a mirror depot that accesses a depot on another module.
      Parameters:
      var - Var to reference this depot in this module
      moduleName - Name of the module where the depot lives
      depotName - Name of the depot in its module
    • clusterPState

      void clusterPState(String pstateVar, String moduleName, String pstateName)
      Defines a mirror PState that accesses a PState on another module.
      Parameters:
      pstateVar - Var to reference this PState in this module
      moduleName - Name of the module where the PState lives
      pstateName - Name of the PState in its module
    • clusterQuery

      void clusterQuery(String var, String moduleName, String queryTopologyName)
      Defines a query topology reference for invoking a query topology on another module. The invokeQuery method is used to perform the invoke in topology code.
      Parameters:
      var - Var to reference this query topology in this module
      moduleName - Name of the module where the query topology lives
      queryTopologyName - Name of the PState in its module
    • setLaunchModuleDynamicOption

      void setLaunchModuleDynamicOption(String opt, Object value)
      Sets the value of a module dynamic option to be used on module launch, unless an explicit override is provided at deploy time.
      Parameters:
      opt - Name of the option to set
      value - Value of the option
    • setLaunchPStateDynamicOption

      void setLaunchPStateDynamicOption(String pstate, String opt, Object value)
      Sets the value of a PState dynamic option to be used on module launch, unless an explicit override is provided at deploy time.
      Parameters:
      pstate - Name of the PState
      opt - Name of the option to set
      value - Value of the option
    • setLaunchDepotDynamicOption

      void setLaunchDepotDynamicOption(String depot, String opt, Object value)
      Sets the value of a depot dynamic option to be used on module launch, unless an explicit override is provided at deploy time.
      Parameters:
      depot - Name of the depot
      opt - Name of the option to set
      value - Value of the option
    • setLaunchTopologyDynamicOption

      void setLaunchTopologyDynamicOption(String topology, String opt, Object value)
      Sets the value of a topology dynamic option to be used on module launch, unless an explicit override is provided at deploy time.
      Parameters:
      topology - Name of the topology
      opt - Name of the option to set
      value - Value of the option