azure-storage - 纱线上的mapreduce作业以exitCode退出:-1000,因为src文件系统上的资源已更改
问题描述
Application application_1552978163044_0016 failed 5 times due to AM Container for appattempt_1552978163044_0016_000005 exited with exitCode: -1000
诊断:
java.io.IOException:资源 abfs://xxx@xxx.dfs.core.windows.net/hdp/apps/2.6.5.3006-29/mapreduce/mapreduce.tar.gz 在 src 文件系统上更改(预期为 1552949440000,为 1552978240000这次尝试失败。申请失败。
解决方案
仅根据异常信息,似乎是由于 Azure Storage 无法保留复制文件的原始时间戳。我搜索了一个解决方法,建议更改源代码yarn-common
以在复制文件时禁用时间戳检查的代码块,以避免抛出异常以使 MR 作业连续工作。
这是最新版本的源代码yarn-common
,其中检查复制文件的时间戳并引发异常。
/** #L255
* Localize files.
* @param destination destination directory
* @throws IOException cannot read or write file
* @throws YarnException subcommand returned an error
*/
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());
}
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);
}
推荐阅读
- c# - 如何在 UWP 组合框中的下拉列表中添加页脚
- python - 哪些初始化器受 tf.variable_scope("Model", reuse=None, initializer=initializer) 影响?
- activemq - Talend ESB:如何仅在数据库端点运行时使用来自队列的消息?
- scala - 如何将 `getOrWaitUntilNonEmpty` 作为单个班轮执行?
- reverse-engineering - 如何使用 Frida 在 Android 中从挂钩的本机函数中打印变量
- reactjs - 如果组件中使用了通过上下文传递的函数,我该如何编写一个笑话测试?
- java - 如何从现有的 Maven 项目创建 Spring Boot 项目
- authentication - 如何使用 C# 对 AWS SNS 消息进行身份验证?
- javascript - 在 webpack mix laravel 中更改字体编译路径
- java - 如果我更改条件搜索,请停止 Web 服务?