Class FederatedLookupTable

java.lang.Object
org.apache.sysds.runtime.controlprogram.federated.FederatedLookupTable

public class FederatedLookupTable extends Object
Lookup table mapping from a FedUniqueCoordID (funCID) to an ExecutionContextMap (ECM) so that every coordinator can address federated variables with its own local sequential variable IDs. Therefore, the IDs among different coordinators do not have to be distinct, as every coordinator works with a separate ECM at the FederatedWorker.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    containsFunCID(String host, long pid)
    Check if there is a mapped ExecutionContextMap for the coordinator with the given host and pid.
    getECM(String host, long pid)
    Get the ExecutionContextMap corresponding to the given host and pid of the requesting coordinator from the lookup table.
    void
    removeECM(String host, long pid)
    Remove the ExecutionContextMap corresponding to the given host and pid of the requesting coordinator from the lookup table.
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • FederatedLookupTable

      public FederatedLookupTable()
  • Method Details

    • getECM

      public ExecutionContextMap getECM(String host, long pid)
      Get the ExecutionContextMap corresponding to the given host and pid of the requesting coordinator from the lookup table. Create a new ExecutionContextMap if there is no corresponding entry in the lookup table.
      Parameters:
      host - the host string of the requesting coordinator (usually IP address)
      pid - the process id of the requesting coordinator
      Returns:
      ExecutionContextMap the ECM corresponding to the requesting coordinator
    • removeECM

      public void removeECM(String host, long pid)
      Remove the ExecutionContextMap corresponding to the given host and pid of the requesting coordinator from the lookup table. Do nothing if no entry is associated to the host and pid.
      Parameters:
      host - the host string of the requesting coordinator (usually IP address)
      pid - the process id of the requesting coordinator
    • containsFunCID

      public boolean containsFunCID(String host, long pid)
      Check if there is a mapped ExecutionContextMap for the coordinator with the given host and pid.
      Parameters:
      host - the host string of the requesting coordinator (usually IP address)
      pid - the process id of the requesting coordinator
      Returns:
      boolean true if there is a lookup table entry, otherwise false
    • toString

      public String toString()
      Overrides:
      toString in class Object