This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 4f7c6da [Refactor] Refactor function getScanRangeLength (#4912)
4f7c6da is described below
commit 4f7c6da1f526ed885bb52654a30bb5e363ec466e
Author: xinghuayu007 <[email protected]>
AuthorDate: Sun Nov 22 20:44:11 2020 +0800
[Refactor] Refactor function getScanRangeLength (#4912)
getScanRangeLength always return 1, it is no need to maintain a function
like this.
---
fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
b/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
index ef71425..8a943f0 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
@@ -73,7 +73,6 @@ import org.apache.doris.thrift.TQueryOptions;
import org.apache.doris.thrift.TQueryType;
import org.apache.doris.thrift.TReportExecStatusParams;
import org.apache.doris.thrift.TResourceInfo;
-import org.apache.doris.thrift.TScanRange;
import org.apache.doris.thrift.TScanRangeLocation;
import org.apache.doris.thrift.TScanRangeLocations;
import org.apache.doris.thrift.TScanRangeParams;
@@ -1161,10 +1160,6 @@ public class Coordinator {
return value;
}
- private long getScanRangeLength(final TScanRange scanRange) {
- return 1;
- }
-
private void computeColocateJoinInstanceParam(PlanFragmentId fragmentId,
int parallelExecInstanceNum, FragmentExecParams params) {
Map<Integer, TNetworkAddress> bucketSeqToAddress =
fragmentIdToSeqToAddressMap.get(fragmentId);
Set<Integer> scanNodeIds = fragmentIdToScanNodeIds.get(fragmentId);
@@ -1295,6 +1290,7 @@ public class Coordinator {
FragmentScanRangeAssignment assignment) throws Exception {
HashMap<TNetworkAddress, Long> assignedBytesPerHost =
Maps.newHashMap();
+ Long step = 1L;
for (TScanRangeLocations scanRangeLocations : locations) {
// assign this scan range to the host w/ the fewest assigned bytes
Long minAssignedBytes = Long.MAX_VALUE;
@@ -1306,9 +1302,8 @@ public class Coordinator {
minLocation = location;
}
}
- Long scanRangeLength =
getScanRangeLength(scanRangeLocations.scan_range);
assignedBytesPerHost.put(minLocation.server,
- assignedBytesPerHost.get(minLocation.server) +
scanRangeLength);
+ assignedBytesPerHost.get(minLocation.server) + step);
Reference<Long> backendIdRef = new Reference<Long>();
TNetworkAddress execHostPort =
SimpleScheduler.getHost(minLocation.backend_id,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]