steveloughran commented on code in PR #7025:
URL: https://github.com/apache/hadoop/pull/7025#discussion_r1743537144
##########
hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java:
##########
@@ -438,6 +446,15 @@ protected DistCpContext getContext() {
return context;
}
+ /**
+ * Sets the current context.
+ *
+ * @param context context to be set to.
+ */
+ public void setContext(DistCpContext context) {
Review Comment:
is this for testing or part of the public API?
##########
hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java:
##########
@@ -181,15 +180,24 @@ public int run(String[] argv) {
return DistCpConstants.SUCCESS;
}
+ public Job execute() throws Exception {
Review Comment:
add javadoc, emphasise it is the original entry point
##########
hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java:
##########
@@ -139,10 +139,9 @@ public int run(String[] argv) {
}
try {
- context = new DistCpContext(OptionsParser.parse(argv));
- checkSplitLargeFile();
- setTargetPathExists();
- LOG.info("Input Options: " + context);
+ DistCpContext ctx = new DistCpContext(OptionsParser.parse(argv));
+ LOG.info("Input Options: " + ctx);
Review Comment:
move to using {} in log...the + is only there because it was originally
commons-logging
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]