本文整理了Java中org.apache.hadoop.util.Shell.checkHadoopHomeInner()
方法的一些代码示例,展示了Shell.checkHadoopHomeInner()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Shell.checkHadoopHomeInner()
方法的具体详情如下:
包路径:org.apache.hadoop.util.Shell
类名称:Shell
方法名:checkHadoopHomeInner
[英]Validate the accessibility of the Hadoop home directory.
[中]验证Hadoop主目录的可访问性。
代码示例来源:origin: org.apache.hadoop/hadoop-common
/**
* Centralized logic to discover and validate the sanity of the Hadoop
* home directory.
*
* This does a lot of work so it should only be called
* privately for initialization once per process.
*
* @return A directory that exists and via was specified on the command line
* via <code>-Dhadoop.home.dir</code> or the <code>HADOOP_HOME</code>
* environment variable.
* @throws FileNotFoundException if the properties are absent or the specified
* path is not a reference to a valid directory.
*/
private static File checkHadoopHome() throws FileNotFoundException {
// first check the Dflag hadoop.home.dir with JVM scope
String home = System.getProperty(SYSPROP_HADOOP_HOME_DIR);
// fall back to the system/user-global env variable
if (home == null) {
home = System.getenv(ENV_HADOOP_HOME);
}
return checkHadoopHomeInner(home);
}
代码示例来源:origin: io.hops/hadoop-common
/**
* Centralized logic to discover and validate the sanity of the Hadoop
* home directory.
*
* This does a lot of work so it should only be called
* privately for initialization once per process.
*
* @return A directory that exists and via was specified on the command line
* via <code>-Dhadoop.home.dir</code> or the <code>HADOOP_HOME</code>
* environment variable.
* @throws FileNotFoundException if the properties are absent or the specified
* path is not a reference to a valid directory.
*/
private static File checkHadoopHome() throws FileNotFoundException {
// first check the Dflag hadoop.home.dir with JVM scope
String home = System.getProperty(SYSPROP_HADOOP_HOME_DIR);
// fall back to the system/user-global env variable
if (home == null) {
home = System.getenv(ENV_HADOOP_HOME);
}
return checkHadoopHomeInner(home);
}
内容来源于网络,如有侵权,请联系作者删除!