Example usage for org.apache.hadoop.fs DF getCapacity

List of usage examples for org.apache.hadoop.fs DF getCapacity

Introduction

In this page you can find the example usage for org.apache.hadoop.fs DF getCapacity.

Prototype

public long getCapacity() 

Source Link

Usage

From source file:fr.ens.biologie.genomique.eoulsan.MainHadoop.java

License:LGPL

/**
 * Log disk free information.//w  w  w.  j a v  a2s  . c  o  m
 * @param f file
 * @param conf Hadoop configuration
 * @throws IOException if an error occurs
 */
private static void df(final File f, final Configuration conf) throws IOException {

    DF df = new DF(f, conf);

    getLogger().info("SYSINFO " + f + " " + StringUtils.sizeToHumanReadable(df.getCapacity()) + " capacity, "
            + StringUtils.sizeToHumanReadable(df.getUsed()) + " used, "
            + StringUtils.sizeToHumanReadable(df.getAvailable()) + " available, " + df.getPercentUsed()
            + "% used");

}

From source file:fr.ens.biologie.genomique.eoulsan.util.hadoop.HadoopInfo.java

License:LGPL

private static void df(final File f, final Configuration conf) throws IOException {

    DF df = new DF(f, conf);

    getLogger().info("SYSINFO " + f + " " + StringUtils.sizeToHumanReadable(df.getCapacity()) + " capacity, "
            + StringUtils.sizeToHumanReadable(df.getUsed()) + " used, "
            + StringUtils.sizeToHumanReadable(df.getAvailable()) + " available, " + df.getPercentUsed()
            + "% used");

}