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

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

Introduction

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

Prototype

public int getPercentUsed() 

Source Link

Usage

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

License:LGPL

/**
 * Log disk free information.//from  www  . j ava  2s . 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");

}