3 回答
TA贡献1848条经验 获得超2个赞
我仍然不知道为什么资源文件的时间戳不一致,并且没有办法通过配置方式修复它,AFAIK。
但是,我设法找到了解决方法来跳过该问题。让我在这里为可能遇到同样问题的人总结一下。
通过检查错误日志并在源代码中搜索Hadoop,我们可以在hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/FSDownload.java.
只需删除异常抛出语句,
private void verifyAndCopy(Path destination)
throws IOException, YarnException {
final Path sCopy;
try {
sCopy = resource.getResource().toPath();
} catch (URISyntaxException e) {
throw new IOException("Invalid resource", e);
}
FileSystem sourceFs = sCopy.getFileSystem(conf);
FileStatus sStat = sourceFs.getFileStatus(sCopy);
if (sStat.getModificationTime() != resource.getTimestamp()) {
/**
throw new IOException("Resource " + sCopy +
" changed on src filesystem (expected " + resource.getTimestamp() +
", was " + sStat.getModificationTime());
**/
LOG.debug("[Gearon][Info] The timestamp is not consistent among resource files.\n" +
"Stop throwing exception . It doesn't affect other modules. ");
}
if (resource.getVisibility() == LocalResourceVisibility.PUBLIC) {
if (!isPublic(sourceFs, sCopy, sStat, statCache)) {
throw new IOException("Resource " + sCopy +
" is not publicly accessible and as such cannot be part of the" +
" public cache.");
}
}
downloadAndUnpack(sCopy, destination);
}
构建hadoop-yarn-project并复制“hadoop-yarn-common-xxxjar to$HADOOP_HOME/share/hadoop/yarn”。
将此线程留在这里,并感谢您对如何在不更改hadoop源代码的情况下修复它的任何进一步解释。
TA贡献1856条经验 获得超17个赞
我必须做同样的事情,这应该是可配置的,即使很小的延迟也会导致执行失败,如果将hadoop文件系统更改为使用s3并运行MR程序,则可能会发生这种情况,注意*请确保,您使用的是相同的jdk version 来生成 jar,如 apache hadoop 文档中所述,适用于您的 hadoop 版本,否则您可能会遇到错误。
TA贡献1793条经验 获得超6个赞
实际上,您只需手动将日期设置回之前的值即可解决此问题。例如,使用带有或选项的touch命令:-t STAMP
-d DATE
sudo touch -d '07 Apr 2022 11:12:30.000 +0000' '<path_to_file>'
添加回答
举报