[ https://issues.apache.org/jira/browse/MAPREDUCE-6825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15854425#comment-15854425
]
Daniel Templeton commented on MAPREDUCE-6825:
---------------------------------------------
Thanks, [~GergelyNovak]. Some comments:
{code} warnForJavaLibPath(conf.get(MRJobConfig.MAPRED_MAP_ADMIN_JAVA_OPTS, ""),
"map",
MRJobConfig.MAPRED_MAP_ADMIN_JAVA_OPTS,
MRJobConfig.MAPRED_ADMIN_USER_ENV);
warnForJavaLibPath(conf.get(MRJobConfig.REDUCE_JAVA_OPTS, ""), "reduce",
MRJobConfig.REDUCE_JAVA_OPTS, MRJobConfig.REDUCE_ENV);
warnForJavaLibPath(conf.get(MRJobConfig.MAPRED_REDUCE_ADMIN_JAVA_OPTS, ""),
"reduce",
MRJobConfig.MAPRED_REDUCE_ADMIN_JAVA_OPTS,
MRJobConfig.MAPRED_ADMIN_USER_ENV);
{code}
The first and third call have the same style regarding line breaks, but the second is different.
May as well make them all consistent.
{code}
Map<String, LocalResource> localResources =
setupLocalResources(jobConf, jobSubmitDir);
// Setup security tokens
DataOutputBuffer dob = new DataOutputBuffer();
ts.writeTokenStorageToStream(dob);
ByteBuffer securityTokens = ByteBuffer.wrap(
dob.getData(), 0, dob.getLength());
{code}
Similarly, {{localResources}} and {{securityTokens}} are split in different ways. I prefer
to break the line on the equals, like {{localResources}}.
While you're messing with stuff, you may as well switch all the collections to use the diamond
operator.
And, while it's not your fault, the javadoc is missing for {{createApplicationSubmissionContext()}}.
Could you please add it?
> YARNRunner#createApplicationSubmissionContext method is longer than 150 lines
> -----------------------------------------------------------------------------
>
> Key: MAPREDUCE-6825
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-6825
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Reporter: Chris Trezzo
> Assignee: Gergely Novák
> Priority: Trivial
> Labels: newbie
> Attachments: MAPREDUCE-6825.001.patch, MAPREDUCE-6825.002.patch, MAPREDUCE-6825.003.patch
>
>
> bq. ./hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java:341:
public ApplicationSubmissionContext createApplicationSubmissionContext(:3: Method length is
249 lines (max allowed is 150).
> {{YARNRunner#createApplicationSubmissionContext}} is longer than 150 lines and needs
to be refactored.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: mapreduce-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: mapreduce-issues-help@hadoop.apache.org
|