类org.apache.hadoop.fs.DF源码实例Demo

下面列出了怎么用org.apache.hadoop.fs.DF的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: hadoop   文件: FsVolumeImpl.java

FsVolumeImpl(FsDatasetImpl dataset, String storageID, File currentDir,
    Configuration conf, StorageType storageType) throws IOException {
  this.dataset = dataset;
  this.storageID = storageID;
  this.reserved = conf.getLong(
      DFSConfigKeys.DFS_DATANODE_DU_RESERVED_KEY,
      DFSConfigKeys.DFS_DATANODE_DU_RESERVED_DEFAULT);
  this.reservedForRbw = new AtomicLong(0L);
  this.currentDir = currentDir; 
  File parent = currentDir.getParentFile();
  this.usage = new DF(parent, conf);
  this.storageType = storageType;
  this.configuredCapacity = -1;
  cacheExecutor = initializeCacheExecutor(parent);
}
 
源代码2 项目: big-c   文件: FsVolumeImpl.java

FsVolumeImpl(FsDatasetImpl dataset, String storageID, File currentDir,
    Configuration conf, StorageType storageType) throws IOException {
  this.dataset = dataset;
  this.storageID = storageID;
  this.reserved = conf.getLong(
      DFSConfigKeys.DFS_DATANODE_DU_RESERVED_KEY,
      DFSConfigKeys.DFS_DATANODE_DU_RESERVED_DEFAULT);
  this.reservedForRbw = new AtomicLong(0L);
  this.currentDir = currentDir; 
  File parent = currentDir.getParentFile();
  this.usage = new DF(parent, conf);
  this.storageType = storageType;
  this.configuredCapacity = -1;
  cacheExecutor = initializeCacheExecutor(parent);
}
 
源代码3 项目: RDFS   文件: TestNamenodeCapacityReport.java

public void testVolumeSizeWithBytes() throws Exception {
  Configuration conf = new Configuration();
  File data_dir = MiniDFSCluster.getDataDirectory(conf);
  // Need to create data_dir, otherwise DF doesn't work on non-existent dir.
  data_dir.mkdirs();
  DF df = new DF(data_dir, conf);
  long reserved = 10000;
  conf.setLong("dfs.datanode.du.reserved", reserved);
  verifyVolumeSize(conf, reserved, df);
}
 
源代码4 项目: RDFS   文件: TestNamenodeCapacityReport.java

public void testVolumeSizeWithPercent() throws Exception {
  Configuration conf = new Configuration();
  File data_dir = MiniDFSCluster.getDataDirectory(conf);
  // Need to create data_dir, otherwise DF doesn't work on non-existent dir.
  data_dir.mkdirs();
  DF df = new DF(data_dir, conf);
  long reserved = (long) (df.getCapacity() * 0.215);
  conf.setFloat("dfs.datanode.du.reserved.percent", 21.5f);
  verifyVolumeSize(conf, reserved, df);
}
 
源代码5 项目: RDFS   文件: FSDataset.java

FSVolume(FSDataset dataset, File currentDir, Configuration conf) throws IOException {
  this.currentDir = currentDir; 
  File parent = currentDir.getParentFile();
  this.usage = new DF(parent, conf);
  this.reserved = usage.getReserved();
  this.dataset = dataset;
  this.namespaceMap = new NamespaceMap();
  this.dfsUsage = new DU(currentDir, conf);
  this.dfsUsage.start();
}
 
源代码6 项目: hadoop   文件: NameNodeResourceChecker.java

public CheckedVolume(File dirToCheck, boolean required)
    throws IOException {
  df = new DF(dirToCheck, conf);
  this.required = required;
  volume = df.getFilesystem();
}
 
源代码7 项目: big-c   文件: NameNodeResourceChecker.java

public CheckedVolume(File dirToCheck, boolean required)
    throws IOException {
  df = new DF(dirToCheck, conf);
  this.required = required;
  volume = df.getFilesystem();
}
 
 类所在包
 同包方法