Package org.apache.hadoop.ozone.om
Class OzoneConfigUtil
java.lang.Object
org.apache.hadoop.ozone.om.OzoneConfigUtil
Utility class for ozone configurations.
-
Method Summary
Modifier and TypeMethodDescriptionstatic longlimitValue(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.ReplicationConfigresolveReplicationConfigPreference(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)
-
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 cappedclientConfName- - the client config nameserverConfName- - the server config nameserverConfValue- - the server config value- Returns:
- the capped config value
-