Example usage for org.apache.hadoop.fs FileSystem getStatistics

List of usage examples for org.apache.hadoop.fs FileSystem getStatistics

Introduction

In this page you can find the example usage for org.apache.hadoop.fs FileSystem getStatistics.

Prototype

@Deprecated
public static synchronized Statistics getStatistics(final String scheme, Class<? extends FileSystem> cls) 

Source Link

Document

Get the statistics for a particular file system.

Usage

From source file:tachyon.hadoop.TFSStatisticsTest.java

License:Apache License

@BeforeClass
public static void beforeClass() throws Exception {
    Configuration conf = new Configuration();
    conf.set("fs.tachyon.impl", TFS.class.getName());

    // Start local Tachyon cluster
    sLocalTachyonCluster = new LocalTachyonCluster(10000, 1000, BLOCK_SIZE);
    sLocalTachyonCluster.start();/*from  w  ww .j ava  2s .com*/

    TachyonFileSystem tachyonFS = sLocalTachyonCluster.getClient();
    TachyonFSTestUtils.createByteFile(tachyonFS, "/testFile-read", TachyonStorageType.STORE,
            UnderStorageType.PERSIST, FILE_LEN);

    URI uri = URI.create(sLocalTachyonCluster.getMasterUri());
    sTFS = FileSystem.get(uri, conf);
    sStatistics = FileSystem.getStatistics(uri.getScheme(), sTFS.getClass());
}