Package org.apache.hadoop.fs

Examples of org.apache.hadoop.fs.FsStatus


  /**
   * @see ClientProtocol#getStats()
   */
  public FsStatus getDiskStatus() throws IOException {
    long rawNums[] = namenode.getStats();
    return new FsStatus(rawNums[0], rawNums[1], rawNums[2]);
  }
View Full Code Here


   * Gives a report on how the FileSystem is doing.
   * @exception IOException if the filesystem does not exist.
   */
  public void report() throws IOException {
      DistributedFileSystem dfs = getDFS();
      FsStatus ds = dfs.getStatus();
      long capacity = ds.getCapacity();
      long used = ds.getUsed();
      long remaining = ds.getRemaining();
      long presentCapacity = used + remaining;
      boolean mode = dfs.setSafeMode(HdfsConstants.SafeModeAction.SAFEMODE_GET);
      UpgradeStatusReport status =
                      dfs.distributedUpgradeProgress(UpgradeAction.GET_STATUS);

View Full Code Here

  }
 
  @Override
  public FsStatus getFsStatus() throws AccessControlException,
      FileNotFoundException, IOException {
    return new FsStatus(0, 0, 0);
  }
View Full Code Here

      return result;
    }
   
    @Override
    public FsStatus getFsStatus() {
      return new FsStatus(0, 0, 0);
    }
View Full Code Here

  @Override
  public FsStatus getStatus(Path p) throws IOException {
    CephStatVFS stat = new CephStatVFS();
    ceph.statfs(p, stat);

    FsStatus status = new FsStatus(stat.bsize * stat.blocks,
          stat.bsize * (stat.blocks - stat.bavail),
          stat.bsize * stat.bavail);
    return status;
  }
View Full Code Here

   * @exception IOException if the filesystem does not exist.
   */
  public void report() throws IOException {
    if (fs instanceof DistributedFileSystem) {
      DistributedFileSystem dfs = (DistributedFileSystem) fs;
      FsStatus ds = dfs.getStatus();
      long capacity = ds.getCapacity();
      long used = ds.getUsed();
      long remaining = ds.getRemaining();
      long presentCapacity = used + remaining;
      boolean mode = dfs.setSafeMode(FSConstants.SafeModeAction.SAFEMODE_GET);
      UpgradeStatusReport status =
                      dfs.distributedUpgradeProgress(UpgradeAction.GET_STATUS);

View Full Code Here

  /**
   * @see ClientProtocol#getStats()
   */
  public FsStatus getDiskStatus() throws IOException {
    long rawNums[] = namenode.getStats();
    return new FsStatus(rawNums[0], rawNums[1], rawNums[2]);
  }
View Full Code Here

   * Gives a report on how the FileSystem is doing.
   * @exception IOException if the filesystem does not exist.
   */
  public void report() throws IOException {
      DistributedFileSystem dfs = getDFS();
      FsStatus ds = dfs.getStatus();
      long capacity = ds.getCapacity();
      long used = ds.getUsed();
      long remaining = ds.getRemaining();
      long presentCapacity = used + remaining;
      boolean mode = dfs.setSafeMode(HdfsConstants.SafeModeAction.SAFEMODE_GET);
      UpgradeStatusReport status =
                      dfs.distributedUpgradeProgress(UpgradeAction.GET_STATUS);

View Full Code Here

          totalUsed += summary.getSpaceConsumed();
          totalFiles += summary.getFileCount();
          totalDirectories += summary.getDirectoryCount();
        }

        FsStatus hdfsStatus = hdfs.getStatus();
        long storageCapacity = hdfsStatus.getCapacity();
        long storageAvailable = hdfsStatus.getRemaining();

        MetricsCollector collector = getCollector(CLUSTER_METRICS_CONTEXT);
        // TODO: metrics should support longs
        LOG.trace("total cluster storage = " + storageCapacity + " total used = " + totalUsed);
        collector.increment("resources.total.storage", (int) (storageCapacity / 1024 / 1024));
View Full Code Here

      }
    }

    @Override
    protected void processPath(PathData item) throws IOException {
      FsStatus fsStats = item.fs.getStatus(item.path);
      long size = fsStats.getCapacity();
      long used = fsStats.getUsed();
      long free = fsStats.getRemaining();

      usagesTable.addRow(
          item.fs.getUri(),
          formatSize(size),
          formatSize(used),
View Full Code Here

TOP

Related Classes of org.apache.hadoop.fs.FsStatus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.