@Override public float getFloat(String name, float defaultValue) { return encapsulated.getFloat(name, defaultValue); }
@Override public float getFloat(String name, float defaultValue) { return encapsulated.getFloat(name, defaultValue); }
/** * @return the Bloom filter error rate in the given configuration */ public static float getErrorRate(Configuration conf) { return conf.getFloat(IO_STOREFILE_BLOOM_ERROR_RATE, (float) 0.01); }
/** * Retrieve configured size for on heap block cache as percentage of total heap. * @param conf */ public static float getBlockCacheHeapPercent(final Configuration conf) { // L1 block cache is always on heap float l1CachePercent = conf.getFloat(HConstants.HFILE_BLOCK_CACHE_SIZE_KEY, HConstants.HFILE_BLOCK_CACHE_SIZE_DEFAULT); return l1CachePercent; }
@Override protected void setSlop(Configuration conf) { this.slop = conf.getFloat("hbase.regions.slop", 0.001F); }
public ExponentialClientBackoffPolicy(Configuration conf) { this.maxBackoff = conf.getLong(MAX_BACKOFF_KEY, DEFAULT_MAX_BACKOFF); this.heapOccupancyLowWatermark = conf.getFloat(HConstants.HEAP_OCCUPANCY_LOW_WATERMARK_KEY, HConstants.DEFAULT_HEAP_OCCUPANCY_LOW_WATERMARK); this.heapOccupancyHighWatermark = conf.getFloat(HConstants.HEAP_OCCUPANCY_HIGH_WATERMARK_KEY, HConstants.DEFAULT_HEAP_OCCUPANCY_HIGH_WATERMARK); }
InputErrorTracker(Configuration conf) { errorThreshold = conf.getFloat(HCatConstants.HCAT_INPUT_BAD_RECORD_THRESHOLD_KEY, HCatConstants.HCAT_INPUT_BAD_RECORD_THRESHOLD_DEFAULT); minErrors = conf.getLong(HCatConstants.HCAT_INPUT_BAD_RECORD_MIN_KEY, HCatConstants.HCAT_INPUT_BAD_RECORD_MIN_DEFAULT); numRecords = 0; numErrors = 0; }
/** * @param conf used to read config for bucket cache size. (< 1 is treated as % and > is treated as MiB) * @return the number of bytes to use for bucket cache, negative if disabled. */ public static long getBucketCacheSize(final Configuration conf) { // Size configured in MBs float bucketCacheSize = conf.getFloat(HConstants.BUCKET_CACHE_SIZE_KEY, 0F); if (bucketCacheSize < 1) { throw new IllegalArgumentException("Bucket Cache should be minimum 1 MB in size." + "Configure 'hbase.bucketcache.size' with > 1 value"); } return (long) (bucketCacheSize * 1024 * 1024); }
private static float getFloat( Configuration config, String key, float defaultValue, boolean moreThanOne) { float value = config.getFloat(key, defaultValue); if (value < EPSILON) { LOG.warn(String.format( "%s is set to 0 or negative; using default value of %f", key, defaultValue)); value = defaultValue; } else if ((value > 1f) != moreThanOne) { value = 1f / value; } return value; }
MoveCostFunction(Configuration conf) { super(conf); // Move cost multiplier should be the same cost or higher than the rest of the costs to ensure // that large benefits are need to overcome the cost of a move. this.setMultiplier(conf.getFloat(MOVE_COST_KEY, DEFAULT_MOVE_COST)); // What percent of the number of regions a single run of the balancer can move. maxMovesPercent = conf.getFloat(MAX_MOVES_PERCENT_KEY, DEFAULT_MAX_MOVE_PERCENT); }
public RegionReplicaHostCostFunction(Configuration conf) { super(conf); this.setMultiplier(conf.getFloat(REGION_REPLICA_HOST_COST_KEY, DEFAULT_REGION_REPLICA_HOST_COST_KEY)); }
PrimaryRegionCountSkewCostFunction(Configuration conf) { super(conf); // Load multiplier should be the greatest as primary regions serve majority of reads/writes. this.setMultiplier(conf.getFloat(PRIMARY_REGION_COUNT_SKEW_COST_KEY, DEFAULT_PRIMARY_REGION_COUNT_SKEW_COST)); }
LocalityBasedCostFunction(Configuration conf, MasterServices srv, LocalityType type, String localityCostKey, float defaultLocalityCost) { super(conf); this.type = type; this.setMultiplier(conf.getFloat(localityCostKey, defaultLocalityCost)); this.services = srv; this.locality = 0.0; this.bestLocality = 0.0; }
ReadRequestCostFunction(Configuration conf) { super(conf); this.setMultiplier(conf.getFloat(READ_REQUEST_COST_KEY, DEFAULT_READ_REQUEST_COST)); }
RegionCountSkewCostFunction(Configuration conf) { super(conf); // Load multiplier should be the greatest as it is the most general way to balance data. this.setMultiplier(conf.getFloat(REGION_COUNT_SKEW_COST_KEY, DEFAULT_REGION_COUNT_SKEW_COST)); }
public RegionReplicaRackCostFunction(Configuration conf) { super(conf); this.setMultiplier(conf.getFloat(REGION_REPLICA_RACK_COST_KEY, DEFAULT_REGION_REPLICA_RACK_COST_KEY)); }
TableSkewCostFunction(Configuration conf) { super(conf); this.setMultiplier(conf.getFloat(TABLE_SKEW_COST_KEY, DEFAULT_TABLE_SKEW_COST)); }