This is an automated email from the ASF dual-hosted git repository. luozenglin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new d24a8a524e [refactor](fe): Remove resource group which is useless (#18249) d24a8a524e is described below commit d24a8a524eb803167e928e1a8f2bcca63163acce Author: 赵立伟 <zhaoli...@xiaomi.com> AuthorDate: Tue Apr 18 21:04:30 2023 +0800 [refactor](fe): Remove resource group which is useless (#18249) --- .../org/apache/doris/catalog/ResourceGroup.java | 145 --------------------- .../doris/consistency/CheckConsistencyJob.java | 10 +- .../main/java/org/apache/doris/load/LoadJob.java | 29 +---- .../java/org/apache/doris/master/MasterImpl.java | 5 - .../java/org/apache/doris/mysql/MysqlProto.java | 4 - .../org/apache/doris/mysql/privilege/Auth.java | 12 +- .../apache/doris/mysql/privilege/UserProperty.java | 68 +--------- .../doris/mysql/privilege/UserPropertyMgr.java | 62 +-------- .../apache/doris/mysql/privilege/UserResource.java | 138 +++----------------- .../java/org/apache/doris/persist/EditLog.java | 1 - .../java/org/apache/doris/qe/ConnectContext.java | 5 - .../java/org/apache/doris/qe/ConnectProcessor.java | 3 - .../main/java/org/apache/doris/qe/Coordinator.java | 7 - .../java/org/apache/doris/qe/MasterOpExecutor.java | 1 - .../apache/doris/service/FrontendServiceImpl.java | 3 +- .../apache/doris/catalog/ResourceGroupTest.java | 57 -------- .../org/apache/doris/catalog/UserPropertyTest.java | 16 +-- .../org/apache/doris/catalog/UserResourceTest.java | 79 ----------- .../load/routineload/RoutineLoadSchedulerTest.java | 1 - .../apache/doris/planner/ResourceTagQueryTest.java | 2 +- gensrc/thrift/FrontendService.thrift | 2 + gensrc/thrift/MasterService.thrift | 6 +- gensrc/thrift/PaloInternalService.thrift | 2 + 23 files changed, 42 insertions(+), 616 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/ResourceGroup.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/ResourceGroup.java deleted file mode 100644 index 7c934570b8..0000000000 --- a/fe/fe-core/src/main/java/org/apache/doris/catalog/ResourceGroup.java +++ /dev/null @@ -1,145 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -package org.apache.doris.catalog; - -import org.apache.doris.common.DdlException; -import org.apache.doris.common.io.Writable; -import org.apache.doris.thrift.TResourceGroup; -import org.apache.doris.thrift.TResourceType; - -import com.google.common.collect.Maps; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; -import java.util.EnumMap; -import java.util.Map; - -// Resource group to contain -public class ResourceGroup implements Writable { - private EnumMap<ResourceType, Integer> quotaByType; - - // Used for readIn - private ResourceGroup() { - quotaByType = Maps.newEnumMap(ResourceType.class); - } - - private ResourceGroup(int cpuShare) { - quotaByType = Maps.newEnumMap(ResourceType.class); - quotaByType.put(ResourceType.CPU_SHARE, cpuShare); - } - - public ResourceGroup getCopiedResourceGroup() { - ResourceGroup resourceGroup = new ResourceGroup(); - resourceGroup.quotaByType = Maps.newEnumMap(quotaByType); - return resourceGroup; - } - - public void updateByDesc(String desc, int value) throws DdlException { - ResourceType type = ResourceType.fromDesc(desc); - if (type == null) { - throw new DdlException("Unknown resource type(" + desc + ")"); - } - if (type == ResourceType.CPU_SHARE || type == ResourceType.IO_SHARE) { - if (value < 100 || value > 1000) { - throw new DdlException("Value for resource type(" - + desc + ") has to be in [100, 1000]"); - } - } - quotaByType.put(type, value); - } - - public int getByDesc(String desc) throws DdlException { - ResourceType type = ResourceType.fromDesc(desc); - if (type == null) { - throw new DdlException("Unknown resource type(" + desc + ")"); - } - return quotaByType.get(type); - } - - public Map<ResourceType, Integer> getQuotaMap() { - return quotaByType; - } - - public static Builder builder() { - return new Builder(); - } - - public TResourceGroup toThrift() { - TResourceGroup tgroup = new TResourceGroup(); - for (EnumMap.Entry<ResourceType, Integer> entry : quotaByType.entrySet()) { - tgroup.putToResourceByType(entry.getKey().toThrift(), entry.getValue()); - } - return tgroup; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - int idx = 0; - for (EnumMap.Entry<ResourceType, Integer> entry : quotaByType.entrySet()) { - if (idx++ != 0) { - sb.append(", "); - } - sb.append(entry.getKey().toString()).append(" = ").append(entry.getValue()); - } - return sb.toString(); - } - - @Override - public void write(DataOutput out) throws IOException { - out.writeInt(quotaByType.size()); - for (Map.Entry<ResourceType, Integer> entry : quotaByType.entrySet()) { - out.writeInt(entry.getKey().toThrift().getValue()); - out.writeInt(entry.getValue()); - } - } - - public void readFields(DataInput in) throws IOException { - int numResource = in.readInt(); - for (int i = 0; i < numResource; ++i) { - int code = in.readInt(); - int value = in.readInt(); - - quotaByType.put(ResourceType.fromThrift(TResourceType.findByValue(code)), value); - } - } - - public static ResourceGroup readIn(DataInput in) throws IOException { - ResourceGroup group = new ResourceGroup(); - group.readFields(in); - return group; - } - - public static class Builder { - private int cpuShare; - - public Builder() { - cpuShare = ResourceType.CPU_SHARE.getDefaultValue(); - } - - public ResourceGroup build() { - return new ResourceGroup(cpuShare); - } - - public Builder cpuShare(int share) { - this.cpuShare = share; - return this; - } - } -} diff --git a/fe/fe-core/src/main/java/org/apache/doris/consistency/CheckConsistencyJob.java b/fe/fe-core/src/main/java/org/apache/doris/consistency/CheckConsistencyJob.java index 3272199a9b..f1518215af 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/consistency/CheckConsistencyJob.java +++ b/fe/fe-core/src/main/java/org/apache/doris/consistency/CheckConsistencyJob.java @@ -30,13 +30,11 @@ import org.apache.doris.catalog.TabletInvertedIndex; import org.apache.doris.catalog.TabletMeta; import org.apache.doris.common.Config; import org.apache.doris.persist.ConsistencyCheckInfo; -import org.apache.doris.qe.ConnectContext; import org.apache.doris.task.AgentBatchTask; import org.apache.doris.task.AgentTask; import org.apache.doris.task.AgentTaskExecutor; import org.apache.doris.task.AgentTaskQueue; import org.apache.doris.task.CheckConsistencyTask; -import org.apache.doris.thrift.TResourceInfo; import org.apache.doris.thrift.TTaskType; import com.google.common.base.Preconditions; @@ -118,12 +116,6 @@ public class CheckConsistencyJob { return false; } - // get user resource info - TResourceInfo resourceInfo = null; - if (ConnectContext.get() != null) { - resourceInfo = ConnectContext.get().toResourceCtx(); - } - Tablet tablet = null; AgentBatchTask batchTask = new AgentBatchTask(); @@ -179,7 +171,7 @@ public class CheckConsistencyJob { maxDataSize = replica.getDataSize(); } - CheckConsistencyTask task = new CheckConsistencyTask(resourceInfo, replica.getBackendId(), + CheckConsistencyTask task = new CheckConsistencyTask(null, replica.getBackendId(), tabletMeta.getDbId(), tabletMeta.getTableId(), tabletMeta.getPartitionId(), diff --git a/fe/fe-core/src/main/java/org/apache/doris/load/LoadJob.java b/fe/fe-core/src/main/java/org/apache/doris/load/LoadJob.java index 97c40c4a1c..684db1b997 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/load/LoadJob.java +++ b/fe/fe-core/src/main/java/org/apache/doris/load/LoadJob.java @@ -36,9 +36,7 @@ import org.apache.doris.load.FailMsg.CancelType; import org.apache.doris.persist.ReplicaPersistInfo; import org.apache.doris.task.PushTask; import org.apache.doris.thrift.TPriority; -import org.apache.doris.thrift.TResourceInfo; -import com.google.common.base.Strings; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; @@ -120,8 +118,6 @@ public class LoadJob implements Writable { private List<Predicate> conditions = null; private DeleteInfo deleteInfo; - private TResourceInfo resourceInfo; - private TPriority priority; private long execMemLimit; @@ -167,7 +163,6 @@ public class LoadJob implements Writable { this.unfinishedTablets = new ArrayList<>(); this.pushTasks = new HashSet<PushTask>(); this.replicaPersistInfos = Maps.newHashMap(); - this.resourceInfo = null; this.priority = TPriority.NORMAL; this.execMemLimit = DEFAULT_EXEC_MEM_LIMIT; this.finishedReplicas = Maps.newHashMap(); @@ -563,14 +558,6 @@ public class LoadJob implements Writable { } } - public void setResourceInfo(TResourceInfo resourceInfo) { - this.resourceInfo = resourceInfo; - } - - public TResourceInfo getResourceInfo() { - return resourceInfo; - } - public boolean addFinishedReplica(Replica replica) { finishedReplicas.put(replica.getId(), replica); return true; @@ -657,8 +644,6 @@ public class LoadJob implements Writable { pushTasks.clear(); pushTasks = null; } - - resourceInfo = null; } public void write(DataOutput out) throws IOException { @@ -728,14 +713,7 @@ public class LoadJob implements Writable { } // resourceInfo - if (resourceInfo == null || Strings.isNullOrEmpty(resourceInfo.getGroup()) - || Strings.isNullOrEmpty(resourceInfo.getUser())) { - out.writeBoolean(false); - } else { - out.writeBoolean(true); - Text.writeString(out, resourceInfo.getUser()); - Text.writeString(out, resourceInfo.getGroup()); - } + out.writeBoolean(false); Text.writeString(out, priority.name()); @@ -877,9 +855,8 @@ public class LoadJob implements Writable { } if (in.readBoolean()) { - String user = Text.readString(in); - String group = Text.readString(in); - resourceInfo = new TResourceInfo(user, group); + Text.readString(in); + Text.readString(in); } this.priority = TPriority.valueOf(Text.readString(in)); diff --git a/fe/fe-core/src/main/java/org/apache/doris/master/MasterImpl.java b/fe/fe-core/src/main/java/org/apache/doris/master/MasterImpl.java index deae3b4793..4e89cd56ae 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/master/MasterImpl.java +++ b/fe/fe-core/src/main/java/org/apache/doris/master/MasterImpl.java @@ -51,7 +51,6 @@ import org.apache.doris.task.StorageMediaMigrationTask; import org.apache.doris.task.UpdateTabletMetaInfoTask; import org.apache.doris.task.UploadTask; import org.apache.doris.thrift.TBackend; -import org.apache.doris.thrift.TFetchResourceResult; import org.apache.doris.thrift.TFinishTaskRequest; import org.apache.doris.thrift.TMasterResult; import org.apache.doris.thrift.TPushType; @@ -567,10 +566,6 @@ public class MasterImpl { return reportHandler.handleReport(request); } - public TFetchResourceResult fetchResource() { - return Env.getCurrentEnv().getAuth().toResourceThrift(); - } - private void finishAlterTask(AgentTask task) { AlterReplicaTask alterTask = (AlterReplicaTask) task; try { diff --git a/fe/fe-core/src/main/java/org/apache/doris/mysql/MysqlProto.java b/fe/fe-core/src/main/java/org/apache/doris/mysql/MysqlProto.java index e8e0c23595..089bf3db35 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/mysql/MysqlProto.java +++ b/fe/fe-core/src/main/java/org/apache/doris/mysql/MysqlProto.java @@ -29,7 +29,6 @@ import org.apache.doris.common.LdapConfig; import org.apache.doris.datasource.CatalogIf; import org.apache.doris.ldap.LdapAuthenticate; import org.apache.doris.mysql.privilege.Auth; -import org.apache.doris.mysql.privilege.UserResource; import org.apache.doris.qe.ConnectContext; import org.apache.doris.system.SystemInfoService; @@ -109,9 +108,6 @@ public class MysqlProto { strList = tmpUser.split("#", 2); if (strList.length > 1) { tmpUser = strList[0]; - if (UserResource.isValidGroup(strList[1])) { - context.getSessionVariable().setResourceGroup(strList[1]); - } } LOG.debug("parse cluster: {}", clusterName); diff --git a/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/Auth.java b/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/Auth.java index e9b81e5776..c32ad9d32c 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/Auth.java +++ b/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/Auth.java @@ -58,7 +58,6 @@ import org.apache.doris.persist.PrivInfo; import org.apache.doris.qe.ConnectContext; import org.apache.doris.resource.Tag; import org.apache.doris.system.SystemInfoService; -import org.apache.doris.thrift.TFetchResourceResult; import org.apache.doris.thrift.TPrivilegeStatus; import com.google.common.base.Joiner; @@ -457,7 +456,7 @@ public class Auth implements Writable { userRoleManager.addUserRole(userIdent, roleName); } // other user properties - propertyMgr.addUserResource(userIdent.getQualifiedUser(), false); + propertyMgr.addUserResource(userIdent.getQualifiedUser()); // 5. update password policy passwdPolicyManager.updatePolicy(userIdent, password, passwordOptions); @@ -1246,15 +1245,6 @@ public class Auth implements Writable { } } - public TFetchResourceResult toResourceThrift() { - readLock(); - try { - return propertyMgr.toResourceThrift(); - } finally { - readUnlock(); - } - } - public List<List<String>> getRoleInfo() { readLock(); try { diff --git a/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserProperty.java b/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserProperty.java index 8b9d18e22b..10ee95e406 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserProperty.java +++ b/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserProperty.java @@ -19,8 +19,6 @@ package org.apache.doris.mysql.privilege; import org.apache.doris.analysis.SetUserPropertyVar; import org.apache.doris.catalog.Env; -import org.apache.doris.catalog.ResourceGroup; -import org.apache.doris.catalog.ResourceType; import org.apache.doris.common.AnalysisException; import org.apache.doris.common.DdlException; import org.apache.doris.common.FeMetaVersion; @@ -47,7 +45,6 @@ import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.Set; -import java.util.concurrent.atomic.AtomicInteger; import java.util.regex.Pattern; /* @@ -81,8 +78,6 @@ public class UserProperty implements Writable { private CommonUserProperties commonProperties = new CommonUserProperties(); - // Resource belong to this user. - private UserResource resource = new UserResource(1000); // load cluster private String defaultLoadCluster = null; private Map<String, DppConfig> clusterToDppConfig = Maps.newHashMap(); @@ -180,7 +175,6 @@ public class UserProperty implements Writable { int queryTimeout = this.commonProperties.getQueryTimeout(); int insertTimeout = this.commonProperties.getInsertTimeout(); - UserResource newResource = resource.getCopiedUserResource(); String newDefaultLoadCluster = defaultLoadCluster; Map<String, DppConfig> newDppConfigs = Maps.newHashMap(clusterToDppConfig); @@ -205,42 +199,6 @@ public class UserProperty implements Writable { if (newMaxConn <= 0 || newMaxConn > 10000) { throw new DdlException(PROP_MAX_USER_CONNECTIONS + " is not valid, must between 1 and 10000"); } - } else if (keyArr[0].equalsIgnoreCase(PROP_RESOURCE)) { - // set property "resource.cpu_share" = "100" - if (keyArr.length != 2) { - throw new DdlException(PROP_RESOURCE + " format error"); - } - - int resource = 0; - try { - resource = Integer.parseInt(value); - } catch (NumberFormatException e) { - throw new DdlException(key + " is not number"); - } - - if (resource <= 0) { - throw new DdlException(key + " is not valid"); - } - - newResource.updateResource(keyArr[1], resource); - } else if (keyArr[0].equalsIgnoreCase(PROP_QUOTA)) { - // set property "quota.normal" = "100" - if (keyArr.length != 2) { - throw new DdlException(PROP_QUOTA + " format error"); - } - - int quota = 0; - try { - quota = Integer.parseInt(value); - } catch (NumberFormatException e) { - throw new DdlException(key + " is not number"); - } - - if (quota <= 0) { - throw new DdlException(key + " is not valid"); - } - - newResource.updateGroupShare(keyArr[1], quota); } else if (keyArr[0].equalsIgnoreCase(PROP_LOAD_CLUSTER)) { updateLoadCluster(keyArr, value, newDppConfigs); } else if (keyArr[0].equalsIgnoreCase(PROP_DEFAULT_LOAD_CLUSTER)) { @@ -349,7 +307,6 @@ public class UserProperty implements Writable { this.commonProperties.setExecMemLimit(execMemLimit); this.commonProperties.setQueryTimeout(queryTimeout); this.commonProperties.setInsertTimeout(insertTimeout); - resource = newResource; if (newDppConfigs.containsKey(newDefaultLoadCluster)) { defaultLoadCluster = newDefaultLoadCluster; } else { @@ -430,10 +387,6 @@ public class UserProperty implements Writable { } } - public UserResource getResource() { - return resource; - } - public String getDefaultLoadCluster() { return defaultLoadCluster; } @@ -484,19 +437,6 @@ public class UserProperty implements Writable { // resource tag result.add(Lists.newArrayList(PROP_RESOURCE_TAGS, Joiner.on(", ").join(commonProperties.getResourceTags()))); - // resource - ResourceGroup group = resource.getResource(); - for (Map.Entry<ResourceType, Integer> entry : group.getQuotaMap().entrySet()) { - result.add(Lists.newArrayList(PROP_RESOURCE + dot + entry.getKey().getDesc().toLowerCase(), - entry.getValue().toString())); - } - - // quota - Map<String, AtomicInteger> groups = resource.getShareByGroup(); - for (Map.Entry<String, AtomicInteger> entry : groups.entrySet()) { - result.add(Lists.newArrayList(PROP_QUOTA + dot + entry.getKey(), entry.getValue().toString())); - } - // load cluster if (defaultLoadCluster != null) { result.add(Lists.newArrayList(PROP_DEFAULT_LOAD_CLUSTER, defaultLoadCluster)); @@ -555,8 +495,8 @@ public class UserProperty implements Writable { // user name Text.writeString(out, qualifiedUser); - // user resource - resource.write(out); + // call UserResource.write(out) to make sure that FE can rollback. + UserResource.write(out); // load cluster if (defaultLoadCluster == null) { @@ -583,8 +523,8 @@ public class UserProperty implements Writable { this.commonProperties.setMaxConn(maxConn); } - // user resource - resource = UserResource.readIn(in); + // call UserResource.readIn(out) to make sure that FE can rollback. + UserResource.readIn(in); // load cluster if (in.readBoolean()) { diff --git a/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserPropertyMgr.java b/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserPropertyMgr.java index 7d3e506baa..ff68cd028e 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserPropertyMgr.java +++ b/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserPropertyMgr.java @@ -27,8 +27,6 @@ import org.apache.doris.common.UserException; import org.apache.doris.common.io.Writable; import org.apache.doris.load.DppConfig; import org.apache.doris.resource.Tag; -import org.apache.doris.thrift.TAgentServiceVersion; -import org.apache.doris.thrift.TFetchResourceResult; import com.google.common.collect.Maps; import org.apache.logging.log4j.LogManager; @@ -51,40 +49,18 @@ public class UserPropertyMgr implements Writable { public static final String LDAP_RESOURCE_USER = "ldap"; private static final UserProperty LDAP_PROPERTY = new UserProperty(LDAP_RESOURCE_USER); - - static { - try { - setNormalUserDefaultResource(LDAP_PROPERTY); - } catch (DdlException e) { - LOG.error("init DEFAULT_PROPERTY error.", e); - throw new RuntimeException(e); - } - } - private AtomicLong resourceVersion = new AtomicLong(0); public UserPropertyMgr() { } - public void addUserResource(String qualifiedUser, boolean isSystemUser) { + public void addUserResource(String qualifiedUser) { UserProperty property = propertyMap.get(qualifiedUser); if (property != null) { return; } property = new UserProperty(qualifiedUser); - - // set user properties - try { - if (isSystemUser) { - setSystemUserDefaultResource(property); - } else { - setNormalUserDefaultResource(property); - } - } catch (DdlException e) { - // this should not happen, because the value is set by us!! - } - propertyMap.put(qualifiedUser, property); resourceVersion.incrementAndGet(); } @@ -149,42 +125,6 @@ public class UserPropertyMgr implements Writable { return existProperty.getCopiedResourceTags(); } - public int getPropertyMapSize() { - return propertyMap.size(); - } - - private void setSystemUserDefaultResource(UserProperty user) throws DdlException { - UserResource userResource = user.getResource(); - userResource.updateResource("CPU_SHARE", 100); - userResource.updateResource("IO_SHARE", 100); - userResource.updateResource("SSD_READ_MBPS", 30); - userResource.updateResource("SSD_WRITE_MBPS", 30); - userResource.updateResource("HDD_READ_MBPS", 30); - userResource.updateResource("HDD_WRITE_MBPS", 30); - } - - private static void setNormalUserDefaultResource(UserProperty user) throws DdlException { - UserResource userResource = user.getResource(); - userResource.updateResource("CPU_SHARE", 1000); - userResource.updateResource("IO_SHARE", 1000); - userResource.updateResource("SSD_READ_IOPS", 1000); - userResource.updateResource("HDD_READ_IOPS", 80); - userResource.updateResource("SSD_READ_MBPS", 30); - userResource.updateResource("HDD_READ_MBPS", 30); - } - - public TFetchResourceResult toResourceThrift() { - TFetchResourceResult tResult = new TFetchResourceResult(); - tResult.setProtocolVersion(TAgentServiceVersion.V1); - tResult.setResourceVersion(resourceVersion.get()); - - for (Map.Entry<String, UserProperty> entry : propertyMap.entrySet()) { - tResult.putToResourceByUser(entry.getKey(), entry.getValue().getResource().toThrift()); - } - - return tResult; - } - public Pair<String, DppConfig> getLoadClusterInfo(String qualifiedUser, String cluster) throws DdlException { Pair<String, DppConfig> loadClusterInfo = null; diff --git a/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserResource.java b/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserResource.java index 1ce8c4dc49..362fd9cdb5 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserResource.java +++ b/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserResource.java @@ -17,137 +17,33 @@ package org.apache.doris.mysql.privilege; -import org.apache.doris.catalog.ResourceGroup; -import org.apache.doris.common.DdlException; import org.apache.doris.common.io.Text; -import org.apache.doris.common.io.Writable; -import org.apache.doris.thrift.TUserResource; - -import com.google.common.collect.ImmutableSortedMap; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; -import java.util.Map; -import java.util.concurrent.atomic.AtomicInteger; - -// Resource belong to one user -public class UserResource implements Writable { - public static final String LOW = "low"; - public static final String NORMAL = "normal"; - public static final String HIGH = "high"; - // TODO(zhaochun): move this to config - private static int defaultLowShare = 100; - private static int defaultNormalShare = 400; - private static int defaultHighShare = 800; - - // This resource group is used to extend - private ResourceGroup resource; - // Use atomic integer for modify in place. - private ImmutableSortedMap<String, AtomicInteger> shareByGroup; - - // Used to readIn - private UserResource() { - } - - public UserResource(int cpuShare) { - resource = ResourceGroup.builder().cpuShare(cpuShare).build(); - - ImmutableSortedMap.Builder<String, AtomicInteger> builder = - ImmutableSortedMap.orderedBy(String.CASE_INSENSITIVE_ORDER); - - // Low, Normal and High. - builder.put(LOW, new AtomicInteger(defaultLowShare)); - builder.put(NORMAL, new AtomicInteger(defaultNormalShare)); - builder.put(HIGH, new AtomicInteger(defaultHighShare)); - - shareByGroup = builder.build(); - } - - public UserResource getCopiedUserResource() { - UserResource userResource = new UserResource(); - userResource.resource = resource.getCopiedResourceGroup(); - userResource.shareByGroup = ImmutableSortedMap.copyOf(shareByGroup); - return userResource; - } - - public static boolean isValidGroup(String group) { - if (group.equalsIgnoreCase(LOW) || group.equalsIgnoreCase(NORMAL) || group.equalsIgnoreCase(HIGH)) { - return true; - } - return false; - } - - public void updateResource(String desc, int quota) throws DdlException { - resource.updateByDesc(desc, quota); - } - public void updateGroupShare(String groupName, int newShare) throws DdlException { - AtomicInteger share = shareByGroup.get(groupName); - if (share == null) { - throw new DdlException("Unknown resource(" + groupName + ")"); +// This class is used for keeping backward compatible +@Deprecated +public class UserResource { + public static void write(DataOutput out) throws IOException { + // resouce count + out.writeInt(0); + // group count + out.writeInt(0); + } + + public static void readIn(DataInput in) throws IOException { + int numResource = in.readInt(); + for (int i = 0; i < numResource; ++i) { + in.readInt(); + in.readInt(); } - share.set(newShare); - } - - public ResourceGroup getResource() { - return resource; - } - - public Map<String, AtomicInteger> getShareByGroup() { - return shareByGroup; - } - public TUserResource toThrift() { - TUserResource tResource = new TUserResource(); - tResource.setResource(resource.toThrift()); - for (Map.Entry<String, AtomicInteger> entry : shareByGroup.entrySet()) { - tResource.putToShareByGroup(entry.getKey(), entry.getValue().get()); - } - return tResource; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("TotalQuota(").append(resource.toString()).append(")\n"); - int idx = 0; - for (Map.Entry<String, AtomicInteger> entry : shareByGroup.entrySet()) { - if (idx++ != 0) { - sb.append(", "); - } - sb.append(entry.getKey()).append("(").append(entry.getValue()).append(")"); - } - return sb.toString(); - } - - @Override - public void write(DataOutput out) throws IOException { - resource.write(out); - out.writeInt(shareByGroup.size()); - for (Map.Entry<String, AtomicInteger> entry : shareByGroup.entrySet()) { - Text.writeString(out, entry.getKey()); - out.writeInt(entry.getValue().get()); - } - } - - public void readFields(DataInput in) throws IOException { - resource = ResourceGroup.readIn(in); - ImmutableSortedMap.Builder<String, AtomicInteger> builder = - ImmutableSortedMap.orderedBy(String.CASE_INSENSITIVE_ORDER); int numGroup = in.readInt(); for (int i = 0; i < numGroup; ++i) { - String name = Text.readString(in); - AtomicInteger value = new AtomicInteger(in.readInt()); - - builder.put(name, value); + Text.readString(in); + in.readInt(); } - shareByGroup = builder.build(); - } - - public static UserResource readIn(DataInput in) throws IOException { - UserResource userResource = new UserResource(); - userResource.readFields(in); - return userResource; } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java b/fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java index fc837efd70..692937a486 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java +++ b/fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java @@ -1079,7 +1079,6 @@ public class EditLog { } long start = System.currentTimeMillis(); - try { journal.write(op, writable); } catch (Throwable t) { diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java b/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java index 66b4a496e4..f25bb5e4f8 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java @@ -36,7 +36,6 @@ import org.apache.doris.nereids.StatementContext; import org.apache.doris.nereids.stats.StatsErrorEstimator; import org.apache.doris.plugin.AuditEvent.AuditEventBuilder; import org.apache.doris.resource.Tag; -import org.apache.doris.thrift.TResourceInfo; import org.apache.doris.thrift.TUniqueId; import org.apache.doris.transaction.TransactionEntry; import org.apache.doris.transaction.TransactionStatus; @@ -325,10 +324,6 @@ public class ConnectContext { this.txnEntry = txnEntry; } - public TResourceInfo toResourceCtx() { - return new TResourceInfo(qualifiedUser, sessionVariable.getResourceGroup()); - } - public void setEnv(Env env) { this.env = env; defaultCatalog = env.getInternalCatalog().getName(); diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java b/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java index 12b4b289da..018176bbb1 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java @@ -667,9 +667,6 @@ public class ConnectProcessor { if (request.isSetCluster()) { ctx.setCluster(request.cluster); } - if (request.isSetResourceInfo()) { - ctx.getSessionVariable().setResourceGroup(request.getResourceInfo().getGroup()); - } if (request.isSetUserIp()) { ctx.setRemoteIP(request.getUserIp()); } 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 597978eef4..0743a13304 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 @@ -93,7 +93,6 @@ import org.apache.doris.thrift.TQueryGlobals; 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.TResourceLimit; import org.apache.doris.thrift.TRuntimeFilterParams; import org.apache.doris.thrift.TRuntimeFilterTargetParams; @@ -237,7 +236,6 @@ public class Coordinator { // Input parameter private long jobId = -1; // job which this task belongs to private TUniqueId queryId; - private final TResourceInfo tResourceInfo; private final boolean needReport; // parallel execute @@ -343,8 +341,6 @@ public class Coordinator { } else { this.queryGlobals.setTimeZone(context.getSessionVariable().getTimeZone()); } - this.tResourceInfo = new TResourceInfo(context.getQualifiedUser(), - context.getSessionVariable().getResourceGroup()); this.needReport = context.getSessionVariable().enableProfile(); this.nextInstanceId = new TUniqueId(); nextInstanceId.setHi(queryId.hi); @@ -369,7 +365,6 @@ public class Coordinator { this.queryGlobals.setTimeZone(timezone); this.queryGlobals.setLoadZeroTolerance(loadZeroTolerance); this.queryOptions.setBeExecVersion(Config.be_exec_version); - this.tResourceInfo = new TResourceInfo("", ""); this.needReport = true; this.nextInstanceId = new TUniqueId(); nextInstanceId.setHi(queryId.hi); @@ -3085,7 +3080,6 @@ public class Coordinator { params.setFragment(fragment.toThrift()); params.setDescTbl(descTable); params.setParams(new TPlanFragmentExecParams()); - params.setResourceInfo(tResourceInfo); params.setBuildHashTableForBroadcastJoin(instanceExecParam.buildHashTableForBroadcastJoin); params.params.setQueryId(queryId); params.params.setFragmentInstanceId(instanceExecParam.instanceId); @@ -3149,7 +3143,6 @@ public class Coordinator { // Set global param params.setProtocolVersion(PaloInternalServiceVersion.V1); params.setDescTbl(descTable); - params.setResourceInfo(tResourceInfo); params.setQueryId(queryId); params.setPerExchNumSenders(perExchNumSenders); params.setDestinations(destinations); diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/MasterOpExecutor.java b/fe/fe-core/src/main/java/org/apache/doris/qe/MasterOpExecutor.java index 5167612dd1..5e2ab92875 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/MasterOpExecutor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/MasterOpExecutor.java @@ -105,7 +105,6 @@ public class MasterOpExecutor { params.setStmtIdx(originStmt.idx); params.setUser(ctx.getQualifiedUser()); params.setDb(ctx.getDatabase()); - params.setResourceInfo(ctx.toResourceCtx()); params.setUserIp(ctx.getRemoteIP()); params.setStmtId(ctx.getStmtId()); params.setCurrentUserIdent(ctx.getCurrentUserIdentity().toThrift()); diff --git a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java index 276a48ea4c..e4c3c465d7 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java +++ b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java @@ -843,9 +843,10 @@ public class FrontendServiceImpl implements FrontendService.Iface { return masterImpl.report(request); } + // This interface is used for keeping backward compatible @Override public TFetchResourceResult fetchResource() throws TException { - return masterImpl.fetchResource(); + throw new TException("not supported"); } @Override diff --git a/fe/fe-core/src/test/java/org/apache/doris/catalog/ResourceGroupTest.java b/fe/fe-core/src/test/java/org/apache/doris/catalog/ResourceGroupTest.java deleted file mode 100644 index f5569d5eda..0000000000 --- a/fe/fe-core/src/test/java/org/apache/doris/catalog/ResourceGroupTest.java +++ /dev/null @@ -1,57 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -package org.apache.doris.catalog; - -import org.apache.doris.common.DdlException; -import org.apache.doris.thrift.TResourceGroup; -import org.apache.doris.thrift.TResourceType; - -import org.junit.Assert; -import org.junit.Test; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; - -public class ResourceGroupTest { - @Test - public void testNormal() throws IOException, DdlException { - ResourceGroup.Builder builder = ResourceGroup.builder(); - builder.cpuShare(100); - ResourceGroup resource = builder.build(); - - Assert.assertEquals("CPU_SHARE = 100", resource.toString()); - - // To thrift - TResourceGroup tResource = resource.toThrift(); - Assert.assertEquals(100, tResource.getResourceByType().get(TResourceType.TRESOURCE_CPU_SHARE).intValue()); - - // Write edit log - resource.updateByDesc("cpu_share", 150); - ByteArrayOutputStream byteStream = new ByteArrayOutputStream(); - DataOutputStream outputStream = new DataOutputStream(byteStream); - resource.write(outputStream); - outputStream.flush(); - DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(byteStream.toByteArray())); - ResourceGroup newResource = ResourceGroup.readIn(inputStream); - - Assert.assertEquals(150, newResource.getByDesc("cpu_share")); - } -} diff --git a/fe/fe-core/src/test/java/org/apache/doris/catalog/UserPropertyTest.java b/fe/fe-core/src/test/java/org/apache/doris/catalog/UserPropertyTest.java index c8c3613935..793cdf6a7d 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/catalog/UserPropertyTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/catalog/UserPropertyTest.java @@ -83,25 +83,23 @@ public class UserPropertyTest { fakeEnv = new FakeEnv(); FakeEnv.setMetaVersion(FeConstants.meta_version); - UserProperty property = new UserProperty("root"); - property.getResource().updateGroupShare("low", 991); + String qualifiedUser = "root"; + UserProperty property = new UserProperty(qualifiedUser); // To image ByteArrayOutputStream byteStream = new ByteArrayOutputStream(); DataOutputStream outputStream = new DataOutputStream(byteStream); property.write(outputStream); outputStream.flush(); + DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(byteStream.toByteArray())); UserProperty newProperty = UserProperty.read(inputStream); - - Assert.assertEquals(991, newProperty.getResource().getShareByGroup().get("low").intValue()); + Assert.assertEquals(qualifiedUser, newProperty.getQualifiedUser()); } @Test public void testUpdate() throws UserException { List<Pair<String, String>> properties = Lists.newArrayList(); properties.add(Pair.of("MAX_USER_CONNECTIONS", "100")); - properties.add(Pair.of("resource.cpu_share", "101")); - properties.add(Pair.of("quota.normal", "102")); properties.add(Pair.of("load_cluster.dpp-cluster.hadoop_palo_path", "/user/palo2")); properties.add(Pair.of("default_load_cluster", "dpp-cluster")); properties.add(Pair.of("max_qUERY_instances", "3000")); @@ -112,8 +110,6 @@ public class UserPropertyTest { UserProperty userProperty = new UserProperty(); userProperty.update(properties); Assert.assertEquals(100, userProperty.getMaxConn()); - Assert.assertEquals(101, userProperty.getResource().getResource().getByDesc("cpu_share")); - Assert.assertEquals(102, userProperty.getResource().getShareByGroup().get("normal").intValue()); Assert.assertEquals("/user/palo2", userProperty.getLoadClusterInfo("dpp-cluster").second.getPaloPath()); Assert.assertEquals("dpp-cluster", userProperty.getDefaultLoadCluster()); Assert.assertEquals(3000, userProperty.getMaxQueryInstances()); @@ -129,10 +125,6 @@ public class UserPropertyTest { if (key.equalsIgnoreCase("max_user_connections")) { Assert.assertEquals("100", value); - } else if (key.equalsIgnoreCase("resource.cpu_share")) { - Assert.assertEquals("101", value); - } else if (key.equalsIgnoreCase("quota.normal")) { - Assert.assertEquals("102", value); } else if (key.equalsIgnoreCase("load_cluster.dpp-cluster.hadoop_palo_path")) { Assert.assertEquals("/user/palo2", value); } else if (key.equalsIgnoreCase("default_load_cluster")) { diff --git a/fe/fe-core/src/test/java/org/apache/doris/catalog/UserResourceTest.java b/fe/fe-core/src/test/java/org/apache/doris/catalog/UserResourceTest.java deleted file mode 100644 index 1fb23783e5..0000000000 --- a/fe/fe-core/src/test/java/org/apache/doris/catalog/UserResourceTest.java +++ /dev/null @@ -1,79 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -package org.apache.doris.catalog; - -import org.apache.doris.common.DdlException; -import org.apache.doris.mysql.privilege.UserResource; -import org.apache.doris.thrift.TResourceType; -import org.apache.doris.thrift.TUserResource; - -import org.junit.Assert; -import org.junit.Test; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; - -public class UserResourceTest { - @Test - public void testNormal() throws IOException, DdlException { - UserResource resource = new UserResource(123); - // To thrift - TUserResource tUserResource = resource.toThrift(); - Assert.assertEquals(3, tUserResource.getShareByGroupSize()); - Assert.assertEquals(123, - tUserResource.getResource().getResourceByType().get(TResourceType.TRESOURCE_CPU_SHARE).intValue()); - - resource.updateResource("cpu_share", 321); - resource.updateGroupShare("low", 987); - // To image - ByteArrayOutputStream byteStream = new ByteArrayOutputStream(); - DataOutputStream outputStream = new DataOutputStream(byteStream); - resource.write(outputStream); - outputStream.flush(); - DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(byteStream.toByteArray())); - UserResource newResource = UserResource.readIn(inputStream); - Assert.assertEquals(321, newResource.getResource().getByDesc("cpu_share")); - Assert.assertEquals(987, newResource.getShareByGroup().get("low").intValue()); - } - - @Test(expected = DdlException.class) - public void testNoGroup() throws DdlException { - UserResource resource = new UserResource(123); - resource.updateGroupShare("noGroup", 234); - Assert.fail("No exception throws"); - } - - @Test(expected = DdlException.class) - public void testNoResource() throws DdlException { - UserResource resource = new UserResource(123); - resource.updateResource("noResource", 120); - Assert.fail("No exception throws"); - } - - @Test - public void testValidGroup() throws DdlException { - Assert.assertTrue(UserResource.isValidGroup("low")); - Assert.assertTrue(UserResource.isValidGroup("lOw")); - Assert.assertTrue(UserResource.isValidGroup("normal")); - Assert.assertTrue(UserResource.isValidGroup("high")); - Assert.assertFalse(UserResource.isValidGroup("high223")); - } -} diff --git a/fe/fe-core/src/test/java/org/apache/doris/load/routineload/RoutineLoadSchedulerTest.java b/fe/fe-core/src/test/java/org/apache/doris/load/routineload/RoutineLoadSchedulerTest.java index 99ec14e077..7e3d2a6fa7 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/load/routineload/RoutineLoadSchedulerTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/load/routineload/RoutineLoadSchedulerTest.java @@ -132,7 +132,6 @@ public class RoutineLoadSchedulerTest { throws DdlException, InterruptedException { new Expectations() { { - connectContext.toResourceCtx(); minTimes = 0; result = tResourceInfo; } diff --git a/fe/fe-core/src/test/java/org/apache/doris/planner/ResourceTagQueryTest.java b/fe/fe-core/src/test/java/org/apache/doris/planner/ResourceTagQueryTest.java index cde2440a20..f245dc8ec5 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/planner/ResourceTagQueryTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/planner/ResourceTagQueryTest.java @@ -279,7 +279,7 @@ public class ResourceTagQueryTest { Assert.assertEquals(1000000, execMemLimit); List<List<String>> userProps = Env.getCurrentEnv().getAuth().getUserProperties(Auth.ROOT_USER); - Assert.assertEquals(18, userProps.size()); + Assert.assertEquals(9, userProps.size()); } private void checkTableReplicaAllocation(OlapTable tbl) throws InterruptedException { diff --git a/gensrc/thrift/FrontendService.thrift b/gensrc/thrift/FrontendService.thrift index fc4ac1f663..b1fc35734a 100644 --- a/gensrc/thrift/FrontendService.thrift +++ b/gensrc/thrift/FrontendService.thrift @@ -442,6 +442,7 @@ struct TMasterOpRequest { 1: required string user 2: required string db 3: required string sql + // Deprecated 4: optional Types.TResourceInfo resourceInfo 5: optional string cluster 6: optional i64 execMemLimit // deprecated, move into query_options @@ -832,6 +833,7 @@ service FrontendService { MasterService.TMasterResult finishTask(1: MasterService.TFinishTaskRequest request) MasterService.TMasterResult report(1: MasterService.TReportRequest request) + // Deprecated MasterService.TFetchResourceResult fetchResource() TMasterOpResult forward(1: TMasterOpRequest params) diff --git a/gensrc/thrift/MasterService.thrift b/gensrc/thrift/MasterService.thrift index 99ca74a22b..893bb0171a 100644 --- a/gensrc/thrift/MasterService.thrift +++ b/gensrc/thrift/MasterService.thrift @@ -108,7 +108,7 @@ struct TMasterResult { 1: required Status.TStatus status } -// Now we only support CPU share. +// Deprecated enum TResourceType { TRESOURCE_CPU_SHARE TRESOURCE_IO_SHARE @@ -122,11 +122,12 @@ enum TResourceType { TRESOURCE_HDD_WRITE_MBPS } +// Deprecated struct TResourceGroup { 1: required map<TResourceType, i32> resourceByType } -// Resource per user +// Deprecated struct TUserResource { 1: required TResourceGroup resource @@ -134,6 +135,7 @@ struct TUserResource { 2: required map<string, i32> shareByGroup } +// Deprecated struct TFetchResourceResult { // Master service not find protocol version, so using agent service version 1: required AgentService.TAgentServiceVersion protocolVersion diff --git a/gensrc/thrift/PaloInternalService.thrift b/gensrc/thrift/PaloInternalService.thrift index 1d3e636425..02949dfa94 100644 --- a/gensrc/thrift/PaloInternalService.thrift +++ b/gensrc/thrift/PaloInternalService.thrift @@ -376,6 +376,7 @@ struct TExecPlanFragmentParams { // required in V1 // @Common components + // Deprecated 10: optional Types.TResourceInfo resource_info // load job related @@ -590,6 +591,7 @@ struct TPipelineFragmentParams { 3: optional i32 fragment_id 4: required map<Types.TPlanNodeId, i32> per_exch_num_senders 5: optional Descriptors.TDescriptorTable desc_tbl + // Deprecated 6: optional Types.TResourceInfo resource_info 7: list<TPlanFragmentDestination> destinations 8: optional i32 num_senders --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org