You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uniffle.apache.org by zu...@apache.org on 2025/01/26 09:03:06 UTC
(incubator-uniffle) branch master updated: [#2349] Improvement: Fix the warning: unchecked method invocation: method put in interface Map is applied to given types (#2352)
This is an automated email from the ASF dual-hosted git repository.
zuston pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
The following commit(s) were added to refs/heads/master by this push:
new 7cad484a9 [#2349] Improvement: Fix the warning: unchecked method invocation: method put in interface Map is applied to given types (#2352)
7cad484a9 is described below
commit 7cad484a995e6ef22fea6d3e8228c7bb54e8f8bd
Author: Neo Chien <cc...@cs.ccu.edu.tw>
AuthorDate: Sun Jan 26 17:03:01 2025 +0800
[#2349] Improvement: Fix the warning: unchecked method invocation: method put in interface Map is applied to given types (#2352)
### What changes were proposed in this pull request?
Fix the warning: unchecked method invocation: method put in interface Map is applied to given types
### Why are the changes needed?
Fix: #2349
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
current UT
<img width="1133" alt="image" src="https://github.com/user-attachments/assets/36935007-9cbf-4ef7-8af2-17b8a0f3269b" />
---
.../java/org/apache/uniffle/client/record/reader/RMRecordsReader.java | 4 ++--
.../org/apache/uniffle/test/RemoteMergeShuffleWithRssClientTest.java | 4 ++--
.../test/RemoteMergeShuffleWithRssClientTestWhenShuffleFlushed.java | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/client/src/main/java/org/apache/uniffle/client/record/reader/RMRecordsReader.java b/client/src/main/java/org/apache/uniffle/client/record/reader/RMRecordsReader.java
index 83856bb2a..311768d64 100644
--- a/client/src/main/java/org/apache/uniffle/client/record/reader/RMRecordsReader.java
+++ b/client/src/main/java/org/apache/uniffle/client/record/reader/RMRecordsReader.java
@@ -194,9 +194,9 @@ public class RMRecordsReader<K, V, C> {
public void start() {
for (int partitionId : partitionIds) {
- mergeBuffers.put(partitionId, new Queue(maxBufferPerPartition));
+ mergeBuffers.put(partitionId, new Queue<>(maxBufferPerPartition));
if (this.combiner != null) {
- combineBuffers.put(partitionId, new Queue(maxBufferPerPartition));
+ combineBuffers.put(partitionId, new Queue<>(maxBufferPerPartition));
}
RecordsFetcher fetcher = new RecordsFetcher(partitionId);
fetcher.start();
diff --git a/integration-test/common/src/test/java/org/apache/uniffle/test/RemoteMergeShuffleWithRssClientTest.java b/integration-test/common/src/test/java/org/apache/uniffle/test/RemoteMergeShuffleWithRssClientTest.java
index 8a892d9a6..29336daec 100644
--- a/integration-test/common/src/test/java/org/apache/uniffle/test/RemoteMergeShuffleWithRssClientTest.java
+++ b/integration-test/common/src/test/java/org/apache/uniffle/test/RemoteMergeShuffleWithRssClientTest.java
@@ -641,7 +641,7 @@ public class RemoteMergeShuffleWithRssClientTest extends ShuffleReadWriteBase {
Map<Integer, Set<Long>> ptb = new HashMap<>();
for (int i = PARTITION_ID; i < PARTITION_ID + 3; i++) {
final int partitionId = i;
- ptb.put(partitionId, new HashSet());
+ ptb.put(partitionId, new HashSet<>());
ptb.get(partitionId)
.addAll(
blocks1.stream()
@@ -854,7 +854,7 @@ public class RemoteMergeShuffleWithRssClientTest extends ShuffleReadWriteBase {
Map<Integer, Set<Long>> ptb = new HashMap<>();
for (int i = PARTITION_ID; i < PARTITION_ID + 3; i++) {
final int partitionId = i;
- ptb.put(partitionId, new HashSet());
+ ptb.put(partitionId, new HashSet<>());
ptb.get(partitionId)
.addAll(
blocks1.stream()
diff --git a/integration-test/common/src/test/java/org/apache/uniffle/test/RemoteMergeShuffleWithRssClientTestWhenShuffleFlushed.java b/integration-test/common/src/test/java/org/apache/uniffle/test/RemoteMergeShuffleWithRssClientTestWhenShuffleFlushed.java
index 2ab9f7b8f..402d17ead 100644
--- a/integration-test/common/src/test/java/org/apache/uniffle/test/RemoteMergeShuffleWithRssClientTestWhenShuffleFlushed.java
+++ b/integration-test/common/src/test/java/org/apache/uniffle/test/RemoteMergeShuffleWithRssClientTestWhenShuffleFlushed.java
@@ -655,7 +655,7 @@ public class RemoteMergeShuffleWithRssClientTestWhenShuffleFlushed extends Shuff
Map<Integer, Set<Long>> ptb = new HashMap<>();
for (int i = PARTITION_ID; i < PARTITION_ID + 3; i++) {
final int partitionId = i;
- ptb.put(partitionId, new HashSet());
+ ptb.put(partitionId, new HashSet<>());
ptb.get(partitionId)
.addAll(
blocks1.stream()
@@ -869,7 +869,7 @@ public class RemoteMergeShuffleWithRssClientTestWhenShuffleFlushed extends Shuff
Map<Integer, Set<Long>> ptb = new HashMap<>();
for (int i = PARTITION_ID; i < PARTITION_ID + 3; i++) {
final int partitionId = i;
- ptb.put(partitionId, new HashSet());
+ ptb.put(partitionId, new HashSet<>());
ptb.get(partitionId)
.addAll(
blocks1.stream()