java.lang.Object
org.apache.hadoop.hdfs.server.federation.router.RemoteParam

public class RemoteParam extends Object
A dynamically assignable parameter that is location-specific.

There are 2 ways this mapping is determined:

  • Default: Uses the RemoteLocationContext's destination
  • Map: Uses the value of the RemoteLocationContext key provided in the parameter map.
  • Constructor Details

    • RemoteParam

      public RemoteParam()
      Constructs a default remote parameter. Always maps the value to the destination of the provided RemoteLocationContext.
    • RemoteParam

      public RemoteParam(Map<? extends RemoteLocationContext,? extends Object> map)
      Constructs a map based remote parameter. Determines the value using the provided RemoteLocationContext as a key into the map.
      Parameters:
      map - Map with RemoteLocationContext keys.
  • Method Details

    • getParameterForContext

      public Object getParameterForContext(RemoteLocationContext context)
      Determine the appropriate value for this parameter based on the location.
      Parameters:
      context - Context identifying the location.
      Returns:
      A parameter specific to this location.
    • toString

      public String toString()
      Overrides:
      toString in class Object