|
34 | 34 | import java.util.function.Supplier;
|
35 | 35 | import java.util.stream.Collectors;
|
36 | 36 |
|
37 |
| -import scala.Tuple2; |
38 |
| - |
39 | 37 | import com.google.common.annotations.VisibleForTesting;
|
40 | 38 | import com.google.common.collect.Maps;
|
41 | 39 | import com.google.common.collect.Sets;
|
@@ -1064,7 +1062,7 @@ protected void registerShuffleServers(
|
1064 | 1062 | }
|
1065 | 1063 | LOG.info("Start to register shuffleId {}", shuffleId);
|
1066 | 1064 | long start = System.currentTimeMillis();
|
1067 |
| - Map<String, String> sparkConfMap = sparkConfToMap(getSparkConf()); |
| 1065 | + Map<String, String> sparkConfMap = RssSparkConfig.sparkConfToMap(getSparkConf()); |
1068 | 1066 | serverToPartitionRanges.entrySet().stream()
|
1069 | 1067 | .forEach(
|
1070 | 1068 | entry -> {
|
@@ -1095,7 +1093,7 @@ protected void registerShuffleServers(
|
1095 | 1093 | }
|
1096 | 1094 | LOG.info("Start to register shuffleId[{}]", shuffleId);
|
1097 | 1095 | long start = System.currentTimeMillis();
|
1098 |
| - Map<String, String> sparkConfMap = sparkConfToMap(getSparkConf()); |
| 1096 | + Map<String, String> sparkConfMap = RssSparkConfig.sparkConfToMap(getSparkConf()); |
1099 | 1097 | Set<Map.Entry<ShuffleServerInfo, List<PartitionRange>>> entries =
|
1100 | 1098 | serverToPartitionRanges.entrySet();
|
1101 | 1099 | entries.stream()
|
@@ -1141,15 +1139,4 @@ public boolean isRssStageRetryForFetchFailureEnabled() {
|
1141 | 1139 | public SparkConf getSparkConf() {
|
1142 | 1140 | return sparkConf;
|
1143 | 1141 | }
|
1144 |
| - |
1145 |
| - public Map<String, String> sparkConfToMap(SparkConf sparkConf) { |
1146 |
| - Map<String, String> map = new HashMap<>(); |
1147 |
| - |
1148 |
| - for (Tuple2<String, String> tuple : sparkConf.getAll()) { |
1149 |
| - String key = tuple._1; |
1150 |
| - map.put(key, tuple._2); |
1151 |
| - } |
1152 |
| - |
1153 |
| - return map; |
1154 |
| - } |
1155 | 1142 | }
|
0 commit comments