Class OzoneConfigUtil

java.lang.Object
org.apache.hadoop.ozone.om.OzoneConfigUtil

public final class OzoneConfigUtil extends Object
Utility class for ozone configurations.
  • Method Summary

    Modifier and Type
    Method
    Description
    static long
    limitValue(long clientConfValue, String clientConfName, String serverConfName, long serverConfValue)
    Limits or cap the client config value to server supported config value, if client config value crosses the server supported config value.
    static org.apache.hadoop.hdds.client.ReplicationConfig
    resolveReplicationConfigPreference(org.apache.hadoop.hdds.protocol.proto.HddsProtos.ReplicationType clientType, org.apache.hadoop.hdds.protocol.proto.HddsProtos.ReplicationFactor clientFactor, org.apache.hadoop.hdds.protocol.proto.HddsProtos.ECReplicationConfig clientECReplicationConfig, org.apache.hadoop.hdds.client.DefaultReplicationConfig bucketDefaultReplicationConfig, OzoneManager ozoneManager)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • resolveReplicationConfigPreference

      public static org.apache.hadoop.hdds.client.ReplicationConfig resolveReplicationConfigPreference(org.apache.hadoop.hdds.protocol.proto.HddsProtos.ReplicationType clientType, org.apache.hadoop.hdds.protocol.proto.HddsProtos.ReplicationFactor clientFactor, org.apache.hadoop.hdds.protocol.proto.HddsProtos.ECReplicationConfig clientECReplicationConfig, org.apache.hadoop.hdds.client.DefaultReplicationConfig bucketDefaultReplicationConfig, OzoneManager ozoneManager) throws org.apache.hadoop.ozone.om.exceptions.OMException
      Throws:
      org.apache.hadoop.ozone.om.exceptions.OMException
    • limitValue

      public static long limitValue(long clientConfValue, String clientConfName, String serverConfName, long serverConfValue)
      Limits or cap the client config value to server supported config value, if client config value crosses the server supported config value.
      Parameters:
      clientConfValue - - the client config value to be capped
      clientConfName - - the client config name
      serverConfName - - the server config name
      serverConfValue - - the server config value
      Returns:
      the capped config value