if (cachingStrategy.getReadahead() == null) { this.alwaysReadahead = false; this.readaheadLength = datanode.getDnConf().readaheadLength; } else { this.alwaysReadahead = true; this.readaheadLength = cachingStrategy.getReadahead().longValue();
public Builder setCachingStrategy(CachingStrategy cachingStrategy) { long readahead = cachingStrategy.getReadahead() != null ? cachingStrategy.getReadahead() : DFSConfigKeys.DFS_DATANODE_READAHEAD_BYTES_DEFAULT; this.maxReadahead = (int)Math.min(Integer.MAX_VALUE, readahead); return this; }
public Builder setCachingStrategy(CachingStrategy cachingStrategy) { long readahead = cachingStrategy.getReadahead() != null ? cachingStrategy.getReadahead() : HdfsClientConfigKeys.DFS_DATANODE_READAHEAD_BYTES_DEFAULT; this.maxReadahead = (int)Math.min(Integer.MAX_VALUE, readahead); return this; }
public Builder setCachingStrategy(CachingStrategy cachingStrategy) { long readahead = cachingStrategy.getReadahead() != null ? cachingStrategy.getReadahead() : DFSConfigKeys.DFS_DATANODE_READAHEAD_BYTES_DEFAULT; this.maxReadahead = (int)Math.min(Integer.MAX_VALUE, readahead); return this; }
static private CachingStrategyProto getCachingStrategy(CachingStrategy cachingStrategy) { CachingStrategyProto.Builder builder = CachingStrategyProto.newBuilder(); if (cachingStrategy.getReadahead() != null) { builder.setReadahead(cachingStrategy.getReadahead().longValue()); } if (cachingStrategy.getDropBehind() != null) { builder.setDropBehind(cachingStrategy.getDropBehind().booleanValue()); } return builder.build(); }
static private CachingStrategyProto getCachingStrategy(CachingStrategy cachingStrategy) { CachingStrategyProto.Builder builder = CachingStrategyProto.newBuilder(); if (cachingStrategy.getReadahead() != null) { builder.setReadahead(cachingStrategy.getReadahead().longValue()); } if (cachingStrategy.getDropBehind() != null) { builder.setDropBehind(cachingStrategy.getDropBehind().booleanValue()); } return builder.build(); }
static private CachingStrategyProto getCachingStrategy( CachingStrategy cachingStrategy) { CachingStrategyProto.Builder builder = CachingStrategyProto.newBuilder(); if (cachingStrategy.getReadahead() != null) { builder.setReadahead(cachingStrategy.getReadahead()); } if (cachingStrategy.getDropBehind() != null) { builder.setDropBehind(cachingStrategy.getDropBehind()); } return builder.build(); }
if (cachingStrategy.getReadahead() == null) { this.alwaysReadahead = false; this.readaheadLength = datanode.getDnConf().readaheadLength; } else { this.alwaysReadahead = true; this.readaheadLength = cachingStrategy.getReadahead().longValue();
if (cachingStrategy.getReadahead() == null) { this.alwaysReadahead = false; this.readaheadLength = datanode.getDnConf().readaheadLength; } else { this.alwaysReadahead = true; this.readaheadLength = cachingStrategy.getReadahead().longValue();