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

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

Introduction

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

Prototype

public long getUsed() 

Source Link

Usage

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

License:LGPL

/**
 * Log disk free information.// w  ww .  j  a va 2s.c om
 * @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");

}