HDPUtils.addFileToClassPath(HDPUtils.findContainingFile("yarn-site.xml"), conf); CommandLine cmdLine = parser.getCommandLine(); checkInputSetting(conf, cmdLine); checkZkServerSetting(conf, cmdLine);
HDPUtils.addFileToClassPath(HDPUtils.findContainingFile("yarn-site.xml"), conf); CommandLine cmdLine = parser.getCommandLine(); checkInputSetting(conf, cmdLine); checkZkServerSetting(conf, cmdLine);
private static GuaguaOptionsParser parseOpts(String[] args, Configuration conf) throws IOException, ClassNotFoundException { GuaguaOptionsParser parser = new GuaguaOptionsParser(conf, args); // we have use InputSplit while it is in mr jar but mr jar in newest yarn is not in container classpath String mrJar = HDPUtils.findContainingJar(InputSplit.class); conf.set(GuaguaYarnConstants.GUAGUA_YARN_APP_LIB_JAR, conf.get("tmpjars") + "," + mrJar); String jar = findContainingJar(Class.forName(conf.get(GuaguaConstants.MASTER_COMPUTABLE_CLASS, GuaguaYarnClient.class.getName()))); if(jar != null) { conf.set(GuaguaYarnConstants.GUAGUA_YARN_APP_JAR, jar); } // with a bug in hdp 2.2.4, we have to set hdp version String hdpVersion = HDPUtils.getHdpVersionForHDP224(); if(hdpVersion != null && hdpVersion.length() != 0) { conf.set("hdp.version", hdpVersion); } CommandLine cmdLine = parser.getCommandLine(); checkInputSetting(conf, cmdLine); checkZkServerSetting(conf, cmdLine); checkWorkerClassSetting(conf, cmdLine); checkMasterClassName(conf, cmdLine); checkIterationCountSetting(conf, cmdLine); checkResultClassSetting(conf, cmdLine); checkAppName(conf, cmdLine); return parser; }
private static GuaguaOptionsParser parseOpts(String[] args, Configuration conf) throws IOException, ClassNotFoundException { GuaguaOptionsParser parser = new GuaguaOptionsParser(conf, args); // we have use InputSplit while it is in mr jar but mr jar in newest yarn is not in container classpath String mrJar = HDPUtils.findContainingJar(InputSplit.class); conf.set(GuaguaYarnConstants.GUAGUA_YARN_APP_LIB_JAR, conf.get("tmpjars") + "," + mrJar); String jar = findContainingJar(Class.forName(conf.get(GuaguaConstants.MASTER_COMPUTABLE_CLASS, GuaguaYarnClient.class.getName()))); if(jar != null) { conf.set(GuaguaYarnConstants.GUAGUA_YARN_APP_JAR, jar); } // with a bug in hdp 2.2.4, we have to set hdp version String hdpVersion = HDPUtils.getHdpVersionForHDP224(); if(hdpVersion != null && hdpVersion.length() != 0) { conf.set("hdp.version", hdpVersion); } CommandLine cmdLine = parser.getCommandLine(); checkInputSetting(conf, cmdLine); checkZkServerSetting(conf, cmdLine); checkWorkerClassSetting(conf, cmdLine); checkMasterClassName(conf, cmdLine); checkIterationCountSetting(conf, cmdLine); checkResultClassSetting(conf, cmdLine); checkAppName(conf, cmdLine); return parser; }