@Test public void missingCoreSiteXML() { String hdfsSite = Paths.get(sTestDir.toPath().toString(), "hdfs-site.xml").toString(); ValidationTestUtils.writeXML(hdfsSite, ImmutableMap.of("key1", "value1")); sConf.set(PropertyKey.UNDERFS_HDFS_CONFIGURATION, hdfsSite); HdfsConfValidationTask task = new HdfsConfValidationTask("hdfs: ValidationTaskResult result = task.loadHdfsConfig(); assertEquals(result.getState(), ValidationUtils.State.SKIPPED); assertThat(result.getResult(), containsString("core-site.xml is not configured")); assertThat(result.getAdvice(), containsString("core-site.xml")); }
protected ValidationTaskResult loadHdfsConfig() { Pair<String, String> clientConfFiles = getHdfsConfPaths(); String coreConfPath = clientConfFiles.getFirst(); String hdfsConfPath = clientConfFiles.getSecond(); mCoreConf = accessAndParseConf("core-site.xml", coreConfPath); mHdfsConf = accessAndParseConf("hdfs-site.xml", hdfsConfPath); return new ValidationTaskResult(mState, getName(), mMsg.toString(), mAdvice.toString()); }
HdfsConfValidationTask extends AbstractValidationTask { protected ValidationTaskResult loadHdfsConfig() { Pair<String, String> clientConfFiles = getHdfsConfPaths(); String coreConfPath = clientConfFiles.getFirst(); String hdfsConfPath = clientConfFiles.getSecond(); mCoreConf = accessAndParseConf("core-site.xml", coreConfPath); mHdfsConf = accessAndParseConf("hdfs-site.xml", hdfsConfPath); return new ValidationTaskResult(mState, getName(), mMsg.toString(), mAdvice.toString()); } }
HdfsConfValidationTask extends AbstractValidationTask { protected ValidationTaskResult loadHdfsConfig() { Pair<String, String> clientConfFiles = getHdfsConfPaths(); String coreConfPath = clientConfFiles.getFirst(); String hdfsConfPath = clientConfFiles.getSecond(); mCoreConf = accessAndParseConf("core-site.xml", coreConfPath); mHdfsConf = accessAndParseConf("hdfs-site.xml", hdfsConfPath); return new ValidationTaskResult(mState, getName(), mMsg.toString(), mAdvice.toString()); } HdfsConfValidationTask(String path, AlluxioConfiguration conf); }
HdfsConfValidationTask extends AbstractValidationTask { protected ValidationTaskResult loadHdfsConfig() { Pair<String, String> clientConfFiles = getHdfsConfPaths(); String coreConfPath = clientConfFiles.getFirst(); String hdfsConfPath = clientConfFiles.getSecond(); mCoreConf = accessAndParseConf("core-site.xml", coreConfPath); mHdfsConf = accessAndParseConf("hdfs-site.xml", hdfsConfPath); return new ValidationTaskResult(mState, getName(), mMsg.toString(), mAdvice.toString()); } HdfsConfValidationTask(String path, AlluxioConfiguration conf); @Override String getName(); @Override ValidationTaskResult validateImpl(Map<String, String> optionsMap); }
HdfsConfValidationTask extends AbstractValidationTask { protected ValidationTaskResult loadHdfsConfig() { Pair<String, String> clientConfFiles = getHdfsConfPaths(); String coreConfPath = clientConfFiles.getFirst(); String hdfsConfPath = clientConfFiles.getSecond(); mCoreConf = accessAndParseConf("core-site.xml", coreConfPath); mHdfsConf = accessAndParseConf("hdfs-site.xml", hdfsConfPath); return new ValidationTaskResult(mState, getName(), mMsg.toString(), mAdvice.toString()); } HdfsConfValidationTask(String path, AlluxioConfiguration conf); @Override String getName(); @Override ValidationTaskResult validateImpl(Map<String, String> optionsMap); static final String SEPARATOR; }