aajisaka commented on code in PR #4248:
URL: https://github.com/apache/hadoop/pull/4248#discussion_r985124236


##########
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/output/MultipleOutputs.java:
##########
@@ -345,6 +356,11 @@ public static boolean getCountersEnabled(JobContext job) {
     return job.getConfiguration().getBoolean(COUNTERS_ENABLED, false);
   }
 
+  @VisibleForTesting
+  public synchronized void setRecordWriters(Map<String, RecordWriter<?, ?>> 
recordWriters) {

Review Comment:
   Would you make it package-private?



##########
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/MultipleOutputs.java:
##########
@@ -527,9 +557,42 @@ public void collect(Object key, Object value) throws 
IOException {
    * @throws java.io.IOException thrown if any of the MultipleOutput files
    *                             could not be closed properly.
    */
-  public void close() throws IOException {
+  public void close() throws IOException, InterruptedException {

Review Comment:
   `InterruptedException` is not thrown in this method and should be removed. 
This class is annotated `@Public` and the change may cause compile error. Also, 
we can remove the below code from the test code.
   ```
         try {
           mos.close();
         } catch (InterruptedException e) {
           throw new RuntimeException(e);
         }
   ```



##########
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/MultipleOutputs.java:
##########
@@ -381,6 +406,11 @@ public static boolean getCountersEnabled(JobConf conf) {
   private Map<String, RecordWriter> recordWriters;
   private boolean countersEnabled;
 
+  @VisibleForTesting
+  public synchronized void setRecordWriters(Map<String, RecordWriter> 
recordWriters) {

Review Comment:
   Would you make this method package-private?



-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to