Talend (7.0.1) - Cannot modify mapred.job.name at runtime

余生长醉 提交于 2019-12-13 19:30:59

问题


I am having some trouble running a simple tHiveCreateTable job in Talend OS for Big Data (Print of the job where I am getting this error). The Hive connection is fine and the job worked until Ranger was activated in the cluster.

After ranger, I started getting the following log:

   [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

This error occurs either using Tez or MapReduce for the job, throwing an exception in the following line of the automatically generated code:

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

Do you know any solution or workarround for this?

Thanks in advance


回答1:


It is possible to disable changing mapreduce.job.name and hive.query.name at runtime by Talend7 jobs.

Edit the file

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

and comment out lines 6 and 11 like that:

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

It solved this issue for me.



来源:https://stackoverflow.com/questions/50176579/talend-7-0-1-cannot-modify-mapred-job-name-at-runtime

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!