微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

org.apache.hadoop.hdfs.util.ByteArrayManager的实例源码

项目:hadoop    文件ClientContext.java   
private ClientContext(String name,Conf conf) {
  this.name = name;
  this.confString = confAsstring(conf);
  this.shortCircuitCache = new ShortCircuitCache(
      conf.shortCircuitStreamsCacheSize,conf.shortCircuitStreamsCacheExpiryMs,conf.shortCircuitMmapCacheSize,conf.shortCircuitMmapCacheExpiryMs,conf.shortCircuitMmapCacheRetryTimeout,conf.shortCircuitCacheStaleThresholdMs,conf.shortCircuitSharedMemoryWatcherInterruptCheckMs);
  this.peerCache =
        new PeerCache(conf.socketCacheCapacity,conf.socketCacheExpiry);
  this.keyProviderCache = new KeyProviderCache(conf.keyProviderCacheExpiryMs);
  this.useLegacyBlockReaderLocal = conf.useLegacyBlockReaderLocal;
  this.domainSocketFactory = new DomainSocketFactory(conf);

  this.byteArrayManager = ByteArrayManager.newInstance(conf.writeByteArrayManagerConf);
}
项目:aliyun-oss-hadoop-fs    文件ClientContext.java   
private ClientContext(String name,DfsClientConf conf) {
  final ShortCircuitConf scConf = conf.getShortCircuitConf();

  this.name = name;
  this.confString = scConf.confAsstring();
  this.shortCircuitCache = ShortCircuitCache.fromConf(scConf);
  this.peerCache = new PeerCache(scConf.getSocketCacheCapacity(),scConf.getSocketCacheExpiry());
  this.keyProviderCache = new KeyProviderCache(
      scConf.getKeyProviderCacheExpiryMs());
  this.useLegacyBlockReaderLocal = scConf.isUseLegacyBlockReaderLocal();
  this.domainSocketFactory = new DomainSocketFactory(scConf);

  this.byteArrayManager = ByteArrayManager.newInstance(
      conf.getWriteByteArrayManagerConf());
}
项目:aliyun-oss-hadoop-fs    文件DataStreamer.java   
private DataStreamer(HdfsFileStatus stat,ExtendedBlock block,DFSClient dfsClient,String src,Progressable progress,DataChecksum checksum,atomicreference<CachingStrategy> cachingStrategy,ByteArrayManager byteArrayManage,boolean isAppend,String[] favorednodes) {
  this.block = block;
  this.dfsClient = dfsClient;
  this.src = src;
  this.progress = progress;
  this.stat = stat;
  this.checksum4WriteBlock = checksum;
  this.cachingStrategy = cachingStrategy;
  this.byteArrayManager = byteArrayManage;
  this.isLazyPersistFile = isLazyPersist(stat);
  this.isAppend = isAppend;
  this.favorednodes = favorednodes;

  final DfsClientConf conf = dfsClient.getConf();
  this.dfsclientSlowLogThresholdMs = conf.getSlowIoWarningThresholdMs();
  this.excludednodes = initExcludednodes(conf.getExcludednodesCacheExpiry());
  this.errorState = new ErrorState(conf.getDatanodeRestartTimeout());
}
项目:big-c    文件ClientContext.java   
private ClientContext(String name,conf.socketCacheExpiry);
  this.keyProviderCache = new KeyProviderCache(conf.keyProviderCacheExpiryMs);
  this.useLegacyBlockReaderLocal = conf.useLegacyBlockReaderLocal;
  this.domainSocketFactory = new DomainSocketFactory(conf);

  this.byteArrayManager = ByteArrayManager.newInstance(conf.writeByteArrayManagerConf);
}
项目:hadoop-2.6.0-cdh5.4.3    文件ClientContext.java   
private ClientContext(String name,conf.socketCacheExpiry);
  this.keyProviderCache = new KeyProviderCache(conf.keyProviderCacheExpiryMs);
  this.useLegacyBlockReaderLocal = conf.useLegacyBlockReaderLocal;
  this.domainSocketFactory = new DomainSocketFactory(conf);

  this.byteArrayManager = ByteArrayManager.newInstance(conf.writeByteArrayManagerConf);
}
项目:FlexMap    文件ClientContext.java   
private ClientContext(String name,conf.socketCacheExpiry);
  this.useLegacyBlockReaderLocal = conf.useLegacyBlockReaderLocal;
  this.domainSocketFactory = new DomainSocketFactory(conf);

  this.byteArrayManager = ByteArrayManager.newInstance(conf.writeByteArrayManagerConf);
}
项目:aliyun-oss-hadoop-fs    文件DataStreamer.java   
/**
 * release a list of packets to ByteArrayManager
 *
 * @param packets packets to be release
 * @param bam ByteArrayManager
 */
private static void releaseBuffer(List<DFSPacket> packets,ByteArrayManager bam) {
  for(DFSPacket p : packets) {
    p.releaseBuffer(bam);
  }
  packets.clear();
}
项目:aliyun-oss-hadoop-fs    文件DataStreamer.java   
/**
 * construction with tracing info
 */
DataStreamer(HdfsFileStatus stat,String[] favorednodes) {
  this(stat,block,dfsClient,src,progress,checksum,cachingStrategy,byteArrayManage,false,favorednodes);
  stage = BlockConstructionStage.PIPELINE_SETUP_CREATE;
}
项目:aliyun-oss-hadoop-fs    文件DataStreamer.java   
/**
 * Construct a data streamer for appending to the last partial block
 * @param lastBlock last block of the file to be appended
 * @param stat status of the file to be appended
 */
DataStreamer(LocatedBlock lastBlock,HdfsFileStatus stat,ByteArrayManager byteArrayManage) {
  this(stat,lastBlock.getBlock(),true,null);
  stage = BlockConstructionStage.PIPELINE_SETUP_APPEND;
  bytesSent = block.getNumBytes();
  accesstoken = lastBlock.getBlockToken();
}
项目:aliyun-oss-hadoop-fs    文件StripedDataStreamer.java   
StripedDataStreamer(HdfsFileStatus stat,String[] favorednodes,short index,Coordinator coordinator) {
  super(stat,null,favorednodes);
  this.index = index;
  this.coordinator = coordinator;
}
项目:hadoop    文件DFSOutputStream.java   
private static void releaseBuffer(List<DFSPacket> packets,ByteArrayManager bam) {
  for (DFSPacket p : packets) {
    p.releaseBuffer(bam);
  }
  packets.clear();
}
项目:hadoop    文件ClientContext.java   
public ByteArrayManager getByteArrayManager() {
  return byteArrayManager;
}
项目:aliyun-oss-hadoop-fs    文件ClientContext.java   
public ByteArrayManager getByteArrayManager() {
  return byteArrayManager;
}
项目:aliyun-oss-hadoop-fs    文件DfsClientConf.java   
/**
 * @return the writeByteArrayManagerConf
 */
public ByteArrayManager.Conf getWriteByteArrayManagerConf() {
  return writeByteArrayManagerConf;
}
项目:aliyun-oss-hadoop-fs    文件DFSPacket.java   
/**
 * Release the buffer in this packet to ByteArrayManager.
 */
synchronized void releaseBuffer(ByteArrayManager bam) {
  bam.release(buf);
  buf = null;
}
项目:big-c    文件DFSOutputStream.java   
private static void releaseBuffer(List<DFSPacket> packets,ByteArrayManager bam) {
  for (DFSPacket p : packets) {
    p.releaseBuffer(bam);
  }
  packets.clear();
}
项目:big-c    文件ClientContext.java   
public ByteArrayManager getByteArrayManager() {
  return byteArrayManager;
}
项目:hadoop-2.6.0-cdh5.4.3    文件DFSOutputStream.java   
private synchronized void releaseBuffer(ByteArrayManager bam) {
  bam.release(buf);
  buf = null;
}
项目:hadoop-2.6.0-cdh5.4.3    文件DFSOutputStream.java   
private static void releaseBuffer(List<Packet> packets,ByteArrayManager bam) {
  for(Packet p : packets) {
    p.releaseBuffer(bam);
  }
  packets.clear();
}
项目:hadoop-2.6.0-cdh5.4.3    文件ClientContext.java   
public ByteArrayManager getByteArrayManager() {
  return byteArrayManager;
}
项目:FlexMap    文件DFSOutputStream.java   
private void releaseBuffer(ByteArrayManager bam) {
  bam.release(buf);
  buf = null;
}
项目:FlexMap    文件ClientContext.java   
public ByteArrayManager getByteArrayManager() {
  return byteArrayManager;
}
项目:hadoop    文件DFSPacket.java   
/**
 * Release the buffer in this packet to ByteArrayManager.
 *
 * @param bam
 */
synchronized void releaseBuffer(ByteArrayManager bam) {
  bam.release(buf);
  buf = null;
}
项目:big-c    文件DFSPacket.java   
/**
 * Release the buffer in this packet to ByteArrayManager.
 *
 * @param bam
 */
synchronized void releaseBuffer(ByteArrayManager bam) {
  bam.release(buf);
  buf = null;
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。