Example usage for org.apache.hadoop.fs FileContext getHomeDirectory

List of usage examples for org.apache.hadoop.fs FileContext getHomeDirectory

Introduction

In this page you can find the example usage for org.apache.hadoop.fs FileContext getHomeDirectory.

Prototype

public Path getHomeDirectory() 

Source Link

Document

Return the current user's home directory in this file system.

Usage

From source file:org.apache.twill.yarn.YarnTwillRunnerService.java

License:Apache License

private static LocationFactory createDefaultLocationFactory(Configuration configuration) {
    try {//from   ww w . j av a2s  . c om
        FileContext fc = FileContext.getFileContext(configuration);
        return new FileContextLocationFactory(configuration, fc, fc.getHomeDirectory().toUri().getPath());
    } catch (IOException e) {
        throw Throwables.propagate(e);
    }
}