Example usage for org.apache.hadoop.hdfs DFSConfigKeys DFS_USER_HOME_DIR_PREFIX_DEFAULT

List of usage examples for org.apache.hadoop.hdfs DFSConfigKeys DFS_USER_HOME_DIR_PREFIX_DEFAULT

Introduction

In this page you can find the example usage for org.apache.hadoop.hdfs DFSConfigKeys DFS_USER_HOME_DIR_PREFIX_DEFAULT.

Prototype

String DFS_USER_HOME_DIR_PREFIX_DEFAULT

To view the source code for org.apache.hadoop.hdfs DFSConfigKeys DFS_USER_HOME_DIR_PREFIX_DEFAULT.

Click Source Link

Usage

From source file:com.mellanox.r4h.DistributedFileSystem.java

License:Apache License

@Override
public void initialize(URI uri, Configuration conf) throws IOException {
    super.initialize(uri, conf);
    setConf(conf);//from www  .  ja  v a2  s  .c o m

    String host = uri.getHost();
    if (host == null) {
        throw new IOException("Incomplete HDFS URI, no host: " + uri);
    }
    homeDirPrefix = conf.get(DFSConfigKeys.DFS_USER_HOME_DIR_PREFIX_KEY,
            DFSConfigKeys.DFS_USER_HOME_DIR_PREFIX_DEFAULT);

    this.dfs = new DFSClient(uri, conf, statistics);
    this.uri = URI.create(uri.getScheme() + "://" + uri.getAuthority());
    this.workingDir = getHomeDirectory();
    createShutdownHook();
    LOG.info("Using Mellanox RDMA acceleration");
}