You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by "kaijchen (via GitHub)" <gi...@apache.org> on 2023/02/17 09:26:23 UTC

[GitHub] [incubator-uniffle] kaijchen commented on a diff in pull request #623: [MINOR] refactor: address unchecked conversions

kaijchen commented on code in PR #623:
URL: https://github.com/apache/incubator-uniffle/pull/623#discussion_r1109509745


##########
client-mr/src/main/java/org/apache/hadoop/mapreduce/task/reduce/RssRemoteMergeManagerImpl.java:
##########
@@ -286,7 +286,7 @@ private RawKeyValueIterator finalMerge() throws IOException {
         (RawComparator<K>)jobConf.getOutputKeyComparator();
     // We will only merge sort once time
     return Merger.merge(jobConf, remoteFS, keyClass, valueClass, codec,
-        onHDFSMapOutputs.toArray(new Path[onHDFSMapOutputs.size()]), true, Integer.MAX_VALUE,
+        onHDFSMapOutputs.toArray(new Path[0]), true, Integer.MAX_VALUE,

Review Comment:
   ```suggestion
           onHDFSMapOutputs.toArray(new Path[onHDFSMapOutputs.size()]), true, Integer.MAX_VALUE,
   ```



##########
client-mr/src/test/java/org/apache/hadoop/mapred/SortWriteBufferManagerTest.java:
##########
@@ -258,7 +261,7 @@ public void testWriteNormal() throws Exception {
     assertTrue(manager.getWaitSendBuffers().isEmpty());
   }
 
-  class MockShuffleWriteClient implements ShuffleWriteClient {
+  static class MockShuffleWriteClient implements ShuffleWriteClient {

Review Comment:
   ```suggestion
     class MockShuffleWriteClient implements ShuffleWriteClient {
   ```



##########
integration-test/spark3/src/test/java/org/apache/uniffle/test/GetShuffleReportForMultiPartTest.java:
##########
@@ -218,10 +218,10 @@ public <K, C> ShuffleReader<K, C> getReaderImpl(
         ShuffleReadMetricsReporter metrics,
         Roaring64NavigableMap taskIdBitmap) {
       int shuffleId = handle.shuffleId();
-      RssShuffleHandle rssShuffleHandle = (RssShuffleHandle) handle;
+      RssShuffleHandle<?, ?, ?> rssShuffleHandle = (RssShuffleHandle<?, ?, ?>) handle;
       Map<Integer, List<ShuffleServerInfo>> allPartitionToServers = rssShuffleHandle.getPartitionToServers();
       int partitionNum = (int) allPartitionToServers.entrySet().stream()
-                                   .filter(x -> x.getKey() >= startPartition && x.getKey() < endPartition).count();
+          .filter(x -> x.getKey() >= startPartition && x.getKey() < endPartition).count();

Review Comment:
   ```suggestion
                                      .filter(x -> x.getKey() >= startPartition && x.getKey() < endPartition).count();
   ```



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org