Talend(7.0.1) - 无法在运行时修改mapred.job.name

问题描述 投票:1回答:1

我在Talend OS for big Data(Print of the job where I am getting this error)中运行简单的tHiveCreateTable作业时遇到了一些麻烦。 Hive连接很好,工作正常,直到Ranger在群集中激活。

在游侠之后,我开始获得以下日志:

   [statistics] connecting to socket on port 3345
   [statistics] connected
   Error while processing statement: Cannot modify mapred.job.name at runtime. It is not in list of params that are allowed to be modified at runtime
   [statistics] disconnected

对作业使用Tez或MapReduce发生此错误,在自动生成的代码的以下行中引发异常:

    // For MapReduce Mode
    stmt_tHiveCreateTable_1.execute("set mapred.job.name=" + queryIdentifier);

你知道任何解决方案或解决方法吗?

提前致谢

hive talend
1个回答
0
投票

可以通过Talend7作业在运行时禁用更改mapreduce.job.name和hive.query.name。

编辑文件

{talend_install_dir}/plugins/org.talend.designer.components.localprovider_7.1.1.20181026_1147/components/templates/Hive/SetQueryName.javajet

并注释掉第6行和第11行:

// stmt_<%=cid %>.execute("set mapred.job.name=" + queryIdentifier_<%=cid %>);
// stmt_<%=cid %>.execute("set hive.query.name=" + queryIdentifier_<%=cid %>);

它为我解决了这个问题。

© www.soinside.com 2019 - 2024. All rights reserved.