From 1189c13a0597b3393d09f866648fd85a8714421b Mon Sep 17 00:00:00 2001 From: Connor Date: Tue, 27 Aug 2024 11:15:19 -0400 Subject: [PATCH 1/5] compute node selection for ingestion and reads. Note, has logging which should be quieted. Missing unit tests. has some directional todos. --- build.sh | 31 +++++++++++--- .../java/com/starrocks/common/ErrorCode.java | 3 +- .../java/com/starrocks/lake/StarOSAgent.java | 8 ++++ .../DefaultSharedDataWorkerProvider.java | 41 +++++++++++++++---- .../com/starrocks/planner/OlapScanNode.java | 5 +++ .../java/com/starrocks/planner/ScanNode.java | 4 ++ .../starrocks/qe/CoordinatorPreprocessor.java | 3 ++ .../starrocks/qe/NormalBackendSelector.java | 5 ++- .../com/starrocks/system/NodeSelector.java | 21 +++++++++- .../cluster/SystemInfoServiceTest.java | 11 +++++ .../DefaultSharedDataWorkerProviderTest.java | 15 +++++++ 11 files changed, 129 insertions(+), 18 deletions(-) diff --git a/build.sh b/build.sh index feac5769c5808..c4d00db80b3fd 100755 --- a/build.sh +++ b/build.sh @@ -37,6 +37,12 @@ ROOT=`dirname "$0"` ROOT=`cd "$ROOT"; pwd` MACHINE_TYPE=$(uname -m) +echo "here 1" +if [ -z "$*" ]; then echo "No args"; fi +echo "you passed me" $* + + + export STARROCKS_HOME=${ROOT} if [ -z $BUILD_TYPE ]; then @@ -110,6 +116,8 @@ Usage: $0 " exit 1 } +echo "here 2" +echo "$1" OPTS=$(getopt \ -n $0 \ @@ -137,8 +145,11 @@ OPTS=$(getopt \ if [ $? != 0 ] ; then usage fi +echo "before eval set $1" + eval set -- "$OPTS" +echo "after eval set $1" BUILD_BE= BUILD_FE= @@ -199,6 +210,7 @@ fi HELP=0 if [ $# == 1 ] ; then # default. `sh build.sh`` + echo "in here 1" BUILD_BE=1 BUILD_FE=1 BUILD_SPARK_DPP=1 @@ -207,6 +219,7 @@ if [ $# == 1 ] ; then RUN_UT=0 elif [[ $OPTS =~ "-j " ]] && [ $# == 3 ]; then # default. `sh build.sh -j 32` + echo "in here 1" BUILD_BE=1 BUILD_FE=1 BUILD_SPARK_DPP=1 @@ -215,16 +228,20 @@ elif [[ $OPTS =~ "-j " ]] && [ $# == 3 ]; then RUN_UT=0 PARALLEL=$2 else + echo "in here 3, forcing just fe clean build regardless of cmd line args" + echo "$1" + BUILD_BE=0 - BUILD_FE=0 + BUILD_FE=1 BUILD_SPARK_DPP=0 BUILD_HIVE_UDF=0 - CLEAN=0 + CLEAN=1 RUN_UT=0 while true; do + echo "$1" case "$1" in --be) BUILD_BE=1 ; shift ;; - --fe) BUILD_FE=1 ; shift ;; + --fe) BUILD_FE=1 ; echo "setting fe"; shift ;; --spark-dpp) BUILD_SPARK_DPP=1 ; shift ;; --hive-udf) BUILD_HIVE_UDF=1 ; shift ;; --clean) CLEAN=1 ; shift ;; @@ -245,6 +262,8 @@ else esac done fi +echo "here 3: " +echo $BUILD_FE if [[ ${HELP} -eq 1 ]]; then usage @@ -281,7 +300,9 @@ echo "Get params: BUILD_JAVA_EXT -- $BUILD_JAVA_EXT OUTPUT_COMPILE_TIME -- $OUTPUT_COMPILE_TIME " - +if [ ${CLEAN} -eq 1 ]; then + echo "blah" +fi check_tool() { local toolname=$1 @@ -561,7 +582,7 @@ endTime=$(date +%s) totalTime=$((endTime - startTime)) echo "***************************************" -echo "Successfully build StarRocks ${MSG} ; StartTime:$(date -d @$startTime '+%Y-%m-%d %H:%M:%S'), EndTime:$(date -d @$endTime '+%Y-%m-%d %H:%M:%S'), TotalTime:${totalTime}s" +echo "Successfully build StarRocks ${MSG} ;" echo "***************************************" if [[ ! -z ${STARROCKS_POST_BUILD_HOOK} ]]; then diff --git a/fe/fe-core/src/main/java/com/starrocks/common/ErrorCode.java b/fe/fe-core/src/main/java/com/starrocks/common/ErrorCode.java index 990ab4bdf2a5c..ff6490d921585 100644 --- a/fe/fe-core/src/main/java/com/starrocks/common/ErrorCode.java +++ b/fe/fe-core/src/main/java/com/starrocks/common/ErrorCode.java @@ -344,7 +344,8 @@ public enum ErrorCode { ERR_WAREHOUSE_SUSPENDED(10003, new byte[] {'4', '2', '0', '0', '0'}, "Warehouse %s has been suspended."), ERR_WAREHOUSE_UNAVAILABLE(10004, new byte[] {'4', '2', '0', '0', '0'}, "Warehouse %s is not available."), ERR_NO_NODES_IN_WAREHOUSE(10005, new byte[] {'4', '2', '0', '0', '0'}, - "No alive backend or compute node in warehouse %s."), + "No alive backend or compute node in warehouse %s. Also possible that there are no CN of the " + + "resource isolation group matching the FE."), ERR_INVALID_WAREHOUSE_NAME(10006, new byte[] {'4', '2', '0', '0', '0'}, "Warehouse name can not be null or empty"), ERR_NOT_SUPPORTED_STATEMENT_IN_SHARED_NOTHING_MODE(10007, new byte[] {'4', '2', '0', '0', '0'}, diff --git a/fe/fe-core/src/main/java/com/starrocks/lake/StarOSAgent.java b/fe/fe-core/src/main/java/com/starrocks/lake/StarOSAgent.java index aec2cabc03118..f1cb6ab78f867 100644 --- a/fe/fe-core/src/main/java/com/starrocks/lake/StarOSAgent.java +++ b/fe/fe-core/src/main/java/com/starrocks/lake/StarOSAgent.java @@ -614,7 +614,15 @@ public Set getAllNodeIdsByShard(long shardId, long workerGroupId, boolean } public Set getAllNodeIdsByShard(ShardInfo shardInfo, boolean onlyPrimary) { + // TODO(cbrennan) Here we'd want the shardInfo to include resource isolation group info, so we could get a + // different node for the shard depending on its resource isolation group. One problem is that + // getReplicaInfoList is a part of the staros module, which is not modifiable. + // Failed idea 1. Another workaround would be not filter using onlyPrimary, and then filter down later using + // node's resourceGroupId. However, it appears that the staros is returning only one replica even before the + // stream/filter on replica role + // Right now, seeing that we're only getting one replica for each shard. List replicas = shardInfo.getReplicaInfoList(); + if (onlyPrimary) { replicas = replicas.stream().filter(x -> x.getReplicaRole() == ReplicaRole.PRIMARY) .collect(Collectors.toList()); diff --git a/fe/fe-core/src/main/java/com/starrocks/lake/qe/scheduler/DefaultSharedDataWorkerProvider.java b/fe/fe-core/src/main/java/com/starrocks/lake/qe/scheduler/DefaultSharedDataWorkerProvider.java index da9357e485ff4..8f37ab328d04c 100644 --- a/fe/fe-core/src/main/java/com/starrocks/lake/qe/scheduler/DefaultSharedDataWorkerProvider.java +++ b/fe/fe-core/src/main/java/com/starrocks/lake/qe/scheduler/DefaultSharedDataWorkerProvider.java @@ -45,6 +45,8 @@ import java.util.function.IntSupplier; import java.util.stream.Collectors; +import static com.starrocks.system.NodeSelector.resourceIsolationGroupMatches; + /** * WorkerProvider for SHARED_DATA mode. Compared to its counterpart for SHARED_NOTHING mode: * 1. All Backends and ComputeNodes are treated the same as ComputeNodes. @@ -71,7 +73,8 @@ public DefaultSharedDataWorkerProvider captureAvailableWorkers(SystemInfoService int numUsedComputeNodes, ComputationFragmentSchedulingPolicy computationFragmentSchedulingPolicy, long warehouseId) { - + String thisFeResourceIsolationGroup = GlobalStateMgr.getCurrentState(). + getNodeMgr().getMySelf().getResourceIsolationGroup(); WarehouseManager warehouseManager = GlobalStateMgr.getCurrentState().getWarehouseMgr(); ImmutableMap.Builder builder = ImmutableMap.builder(); List computeNodeIds = warehouseManager.getAllComputeNodeIds(warehouseId); @@ -82,23 +85,27 @@ public DefaultSharedDataWorkerProvider captureAvailableWorkers(SystemInfoService LOG.debug("idToComputeNode: {}", idToComputeNode); } - ImmutableMap availableComputeNodes = filterAvailableWorkers(idToComputeNode); + ImmutableMap availableComputeNodes = filterAvailableWorkers(idToComputeNode, + thisFeResourceIsolationGroup); if (availableComputeNodes.isEmpty()) { Warehouse warehouse = warehouseManager.getWarehouse(warehouseId); throw ErrorReportException.report(ErrorCode.ERR_NO_NODES_IN_WAREHOUSE, warehouse.getName()); } - return new DefaultSharedDataWorkerProvider(idToComputeNode, availableComputeNodes); + return new DefaultSharedDataWorkerProvider(idToComputeNode, availableComputeNodes, + thisFeResourceIsolationGroup); } } /** - * All the compute nodes (including backends), including those that are not alive or in block list. + * All the compute nodes (including backends), including those that are not alive, in block list, and not matching + * the resource isolation group of the current frontend. */ private final ImmutableMap id2ComputeNode; /** * The available compute nodes, which are alive and not in the block list when creating the snapshot. It is still * possible that the node becomes unavailable later, it will be checked again in some of the interfaces. + * If we're using resource isolation groups, this only includes ComputeNodes of the same group as the frontend. */ private final ImmutableMap availableID2ComputeNode; @@ -109,16 +116,27 @@ public DefaultSharedDataWorkerProvider captureAvailableWorkers(SystemInfoService private final Set selectedWorkerIds; + private final String thisFeResourceIsolationGroup; + @VisibleForTesting public DefaultSharedDataWorkerProvider(ImmutableMap id2ComputeNode, - ImmutableMap availableID2ComputeNode + ImmutableMap availableID2ComputeNode, + String thisFeResourceIsolationGroup ) { this.id2ComputeNode = id2ComputeNode; this.availableID2ComputeNode = availableID2ComputeNode; this.selectedWorkerIds = Sets.newConcurrentHashSet(); + this.thisFeResourceIsolationGroup = thisFeResourceIsolationGroup; this.allComputeNodeIds = null; } + @VisibleForTesting + public DefaultSharedDataWorkerProvider(ImmutableMap id2ComputeNode, + ImmutableMap availableID2ComputeNode + ) { + this(id2ComputeNode, availableID2ComputeNode, null); + } + @Override public long selectNextWorker() throws NonRecoverableException { ComputeNode worker; @@ -244,9 +262,12 @@ public long selectBackupWorker(long workerId) { public String toString() { StringBuilder out = new StringBuilder("compute node: "); id2ComputeNode.forEach((backendID, backend) -> out.append( - String.format("[%s alive: %b, available: %b, inBlacklist: %b] ", backend.getHost(), + String.format("[%s alive: %b, available: %b, inBlacklist: %b, resourceIsolationGroupMatch: %b] ", + backend.getHost(), backend.isAlive(), availableID2ComputeNode.containsKey(backendID), - SimpleScheduler.isInBlocklist(backendID)))); + SimpleScheduler.isInBlocklist(backendID), + resourceIsolationGroupMatches(this.thisFeResourceIsolationGroup, + backend.getResourceIsolationGroup())))); return out.toString(); } @@ -270,10 +291,12 @@ private static ComputeNode getNextWorker(ImmutableMap workers return workers.values().asList().get(index); } - private static ImmutableMap filterAvailableWorkers(ImmutableMap workers) { + private static ImmutableMap filterAvailableWorkers(ImmutableMap workers, + String thisFeResourceIsolationGroup) { ImmutableMap.Builder builder = new ImmutableMap.Builder<>(); for (Map.Entry entry : workers.entrySet()) { - if (entry.getValue().isAlive() && !SimpleScheduler.isInBlocklist(entry.getKey())) { + if (entry.getValue().isAlive() && !SimpleScheduler.isInBlocklist(entry.getKey()) && + resourceIsolationGroupMatches(thisFeResourceIsolationGroup, entry.getValue().getResourceIsolationGroup())) { builder.put(entry); } } diff --git a/fe/fe-core/src/main/java/com/starrocks/planner/OlapScanNode.java b/fe/fe-core/src/main/java/com/starrocks/planner/OlapScanNode.java index eddb0f08c9b1c..ea5e8dcaaced8 100644 --- a/fe/fe-core/src/main/java/com/starrocks/planner/OlapScanNode.java +++ b/fe/fe-core/src/main/java/com/starrocks/planner/OlapScanNode.java @@ -539,6 +539,8 @@ public void addScanRangeLocations(Partition partition, List allQueryableReplicas = Lists.newArrayList(); List localReplicas = Lists.newArrayList(); if (RunMode.getCurrentRunMode() == RunMode.SHARED_DATA) { + /* TODO(cbrennan) This would be best if it could return only replicas belonging to CNs in this FE's + resource isolation group. */ tablet.getQueryableReplicas(allQueryableReplicas, localReplicas, visibleVersion, localBeId, schemaHash, warehouseId); } else { @@ -608,6 +610,9 @@ public void addScanRangeLocations(Partition partition, internalRange.setFill_data_cache(fillDataCache); tabletIsNull = false; + // TODO(cbrennan) turn this into a debug statement once we've confirmed that we have a stable mapping for each group. + LOG.info("Ideally, tablet {} mapped to backend id {}", tablet.getId(), replica.getBackendId()); + // for CBO if (!collectedStat && replica.getRowCount() != -1) { actualRows += replica.getRowCount(); diff --git a/fe/fe-core/src/main/java/com/starrocks/planner/ScanNode.java b/fe/fe-core/src/main/java/com/starrocks/planner/ScanNode.java index 713c80739b07c..b81b85c3958f6 100644 --- a/fe/fe-core/src/main/java/com/starrocks/planner/ScanNode.java +++ b/fe/fe-core/src/main/java/com/starrocks/planner/ScanNode.java @@ -115,6 +115,10 @@ protected Expr castToSlot(SlotDescriptor slotDesc, Expr expr) throws UserExcepti * only applicable to HDFS; less than or equal to zero means no * maximum. */ + // TODO(cbrennan): When we want to have multiple replicas in shared-data mode, or if we want official assignments of + // scan ranges to one node per group, we'll ultimately need to change what this returns. Currently it appears that + // this will be a somewhat involved process, left for v2. For our purposes, this should be done first for the + // OlapScanNode. public abstract List getScanRangeLocations(long maxScanRangeLength); @Override diff --git a/fe/fe-core/src/main/java/com/starrocks/qe/CoordinatorPreprocessor.java b/fe/fe-core/src/main/java/com/starrocks/qe/CoordinatorPreprocessor.java index 43cf806d6952a..d0fbe7a62b933 100644 --- a/fe/fe-core/src/main/java/com/starrocks/qe/CoordinatorPreprocessor.java +++ b/fe/fe-core/src/main/java/com/starrocks/qe/CoordinatorPreprocessor.java @@ -143,6 +143,9 @@ public static TQueryGlobals genQueryGlobals(Instant startTime, String timezone) } private WorkerProvider.Factory newWorkerProviderFactory() { + // TODO(cbrennan): In a future implementation of resource isolation groups, we could create an entirely new + // class and if all the compute nodes are ungrouped or no compute node matches the frontend group, we return + // the Default. if (RunMode.isSharedDataMode()) { return new DefaultSharedDataWorkerProvider.Factory(); } else { diff --git a/fe/fe-core/src/main/java/com/starrocks/qe/NormalBackendSelector.java b/fe/fe-core/src/main/java/com/starrocks/qe/NormalBackendSelector.java index 6ad4a9ffc83ba..591ca2a0a9c87 100644 --- a/fe/fe-core/src/main/java/com/starrocks/qe/NormalBackendSelector.java +++ b/fe/fe-core/src/main/java/com/starrocks/qe/NormalBackendSelector.java @@ -81,13 +81,16 @@ public void computeScanRangeAssignment() throws UserException { if (!workerProvider.isDataNodeAvailable(location.getBackend_id())) { if (workerProvider.allowUsingBackupNode()) { long backupNodeId = workerProvider.selectBackupWorker(location.getBackend_id()); - LOG.debug("Select a backup node:{} for node:{}", backupNodeId, location.getBackend_id()); if (backupNodeId > 0) { // using the backupNode to generate a new ScanRangeLocation TScanRangeLocation backupLocation = new TScanRangeLocation(); backupLocation.setBackend_id(backupNodeId); backupLocation.setServer(workerProvider.getWorkerById(backupNodeId).getAddress()); backupLocations.add(backupLocation); + // TODO(cbrennan) turn into a debug statement and move it back up when done testing + LOG.info("Select a backup node:{} for node:{} {}", backupNodeId, + location.getBackend_id(), + backupLocation.getServer()); } } continue; diff --git a/fe/fe-core/src/main/java/com/starrocks/system/NodeSelector.java b/fe/fe-core/src/main/java/com/starrocks/system/NodeSelector.java index 341056b350c91..91d3a4991b99c 100644 --- a/fe/fe-core/src/main/java/com/starrocks/system/NodeSelector.java +++ b/fe/fe-core/src/main/java/com/starrocks/system/NodeSelector.java @@ -23,6 +23,7 @@ import com.starrocks.clone.TabletChecker; import com.starrocks.common.Pair; import com.starrocks.common.UserException; +import com.starrocks.server.GlobalStateMgr; import com.starrocks.server.RunMode; import com.starrocks.thrift.TStorageMedium; import org.apache.commons.collections.CollectionUtils; @@ -35,6 +36,7 @@ import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Random; import java.util.Set; import java.util.function.Predicate; @@ -91,12 +93,27 @@ public List seqChooseBackendIds(int backendNum, boolean needAvailable, } } + public static boolean resourceIsolationGroupMatches(String rig1, String rig2) { + if (Objects.equals(rig1, rig2)) { + return true; + } + boolean unset1 = rig1 == null || rig1.isEmpty(); + boolean unset2 = rig2 == null || rig2.isEmpty(); + return unset1 && unset2; + } + public List seqChooseComputeNodes(int computeNodeNum, boolean needAvailable, boolean isCreate) { - final List candidateComputeNodes = + List candidateComputeNodes = needAvailable ? systemInfoService.getAvailableComputeNodes() : systemInfoService.getComputeNodes(); + + String thisFeRig = GlobalStateMgr.getCurrentState().getNodeMgr().getMySelf().getResourceIsolationGroup(); + candidateComputeNodes = candidateComputeNodes.stream(). + filter(cn -> resourceIsolationGroupMatches(cn.getResourceIsolationGroup(), thisFeRig)). + collect(Collectors.toList()); if (CollectionUtils.isEmpty(candidateComputeNodes)) { - LOG.warn("failed to find any compute nodes, needAvailable={}", needAvailable); + LOG.warn("failed to find any compute nodes, needAvailable={}, resourceIsolationGroup={}", + needAvailable, thisFeRig); return Collections.emptyList(); } diff --git a/fe/fe-core/src/test/java/com/starrocks/cluster/SystemInfoServiceTest.java b/fe/fe-core/src/test/java/com/starrocks/cluster/SystemInfoServiceTest.java index 6469c7d54589f..3dadeff1b8c28 100644 --- a/fe/fe-core/src/test/java/com/starrocks/cluster/SystemInfoServiceTest.java +++ b/fe/fe-core/src/test/java/com/starrocks/cluster/SystemInfoServiceTest.java @@ -54,6 +54,7 @@ import com.starrocks.sql.ast.DropBackendClause; import com.starrocks.system.Backend; import com.starrocks.system.ComputeNode; +import com.starrocks.system.Frontend; import com.starrocks.system.NodeSelector; import com.starrocks.system.SystemInfoService; import mockit.Expectations; @@ -398,6 +399,16 @@ public void testSeqChooseComputeNodes() { result = analyzer; } }; + + Frontend thisFe = new Frontend(); + NodeMgr nodeMgr = GlobalStateMgr.getCurrentState().getNodeMgr(); + new Expectations(nodeMgr) { + { + nodeMgr.getMySelf(); + result = thisFe; + minTimes = 0; + } + }; com.starrocks.sql.analyzer.Analyzer.analyze(new AlterSystemStmt(stmt), new ConnectContext(null)); try { diff --git a/fe/fe-core/src/test/java/com/starrocks/lake/qe/scheduler/DefaultSharedDataWorkerProviderTest.java b/fe/fe-core/src/test/java/com/starrocks/lake/qe/scheduler/DefaultSharedDataWorkerProviderTest.java index c4a7914388af4..bd7e6adeb2acd 100644 --- a/fe/fe-core/src/test/java/com/starrocks/lake/qe/scheduler/DefaultSharedDataWorkerProviderTest.java +++ b/fe/fe-core/src/test/java/com/starrocks/lake/qe/scheduler/DefaultSharedDataWorkerProviderTest.java @@ -37,9 +37,11 @@ import com.starrocks.qe.scheduler.NonRecoverableException; import com.starrocks.qe.scheduler.WorkerProvider; import com.starrocks.server.GlobalStateMgr; +import com.starrocks.server.NodeMgr; import com.starrocks.server.WarehouseManager; import com.starrocks.system.Backend; import com.starrocks.system.ComputeNode; +import com.starrocks.system.Frontend; import com.starrocks.system.SystemInfoService; import com.starrocks.thrift.TInternalScanRange; import com.starrocks.thrift.TScanRange; @@ -72,6 +74,7 @@ public class DefaultSharedDataWorkerProviderTest { private Map id2ComputeNode; private Map id2AllNodes; private DefaultSharedDataWorkerProvider.Factory factory; + private Frontend thisFe; private static Map genWorkers(long startId, long endId, Supplier factory) { @@ -117,6 +120,16 @@ public void setUp() { } }; + thisFe = new Frontend(); + NodeMgr nodeMgr = GlobalStateMgr.getCurrentState().getNodeMgr(); + new Expectations(nodeMgr) { + { + nodeMgr.getMySelf(); + result = thisFe; + minTimes = 0; + } + }; + new MockUp() { @Mock public ComputeNode getBackendOrComputeNode(long nodeId) { @@ -127,6 +140,8 @@ public ComputeNode getBackendOrComputeNode(long nodeId) { return node; } }; + + } private WorkerProvider newWorkerProvider() { From 53b9d380969c32f874457448794abd303d13ddc3 Mon Sep 17 00:00:00 2001 From: Connor Date: Tue, 27 Aug 2024 16:11:05 -0400 Subject: [PATCH 2/5] TODOs to remind me what to look at later --- fe/fe-core/src/main/java/com/starrocks/lake/Utils.java | 1 + .../src/main/java/com/starrocks/server/WarehouseManager.java | 1 + .../src/main/java/com/starrocks/system/SystemInfoService.java | 2 ++ .../java/com/starrocks/transaction/PublishVersionDaemon.java | 1 + 4 files changed, 5 insertions(+) diff --git a/fe/fe-core/src/main/java/com/starrocks/lake/Utils.java b/fe/fe-core/src/main/java/com/starrocks/lake/Utils.java index 14ed7713e35b6..13c55720b2e1e 100644 --- a/fe/fe-core/src/main/java/com/starrocks/lake/Utils.java +++ b/fe/fe-core/src/main/java/com/starrocks/lake/Utils.java @@ -114,6 +114,7 @@ public static void publishVersionBatch(@NotNull List tablets, List idToBackendRef; + // TODO(cbrennan) Trace all usages of the ComputeNode references, make sure their resource isolation group + // information is being used appropriately. @SerializedName(value = "ce") protected volatile ConcurrentHashMap idToComputeNodeRef; diff --git a/fe/fe-core/src/main/java/com/starrocks/transaction/PublishVersionDaemon.java b/fe/fe-core/src/main/java/com/starrocks/transaction/PublishVersionDaemon.java index 6090b80598420..c2863e0897e3b 100644 --- a/fe/fe-core/src/main/java/com/starrocks/transaction/PublishVersionDaemon.java +++ b/fe/fe-core/src/main/java/com/starrocks/transaction/PublishVersionDaemon.java @@ -543,6 +543,7 @@ public boolean publishPartitionBatch(Database db, long tableId, long partitionId // used to delete txnLog when publish success Map> nodeToTablets = new HashMap<>(); + // TODO(cbrennan): See here for entrypoint into getting nodes for vacuuming. Utils.publishVersionBatch(publishTablets, txnInfos, startVersion - 1, endVersion, compactionScores, warehouseId, From 1f15f86d016e98689cb40ad49e387bd5b003862a Mon Sep 17 00:00:00 2001 From: Connor Date: Thu, 29 Aug 2024 10:32:54 -0400 Subject: [PATCH 3/5] small refactor of resoure isolation group utilities --- .../lake/ResourceIsolationGroupUtils.java | 16 ++++++++++++++++ .../DefaultSharedDataWorkerProvider.java | 18 ++++++++++-------- .../com/starrocks/system/NodeSelector.java | 11 ++--------- .../starrocks/system/SystemInfoService.java | 3 ++- 4 files changed, 30 insertions(+), 18 deletions(-) create mode 100644 fe/fe-core/src/main/java/com/starrocks/lake/ResourceIsolationGroupUtils.java diff --git a/fe/fe-core/src/main/java/com/starrocks/lake/ResourceIsolationGroupUtils.java b/fe/fe-core/src/main/java/com/starrocks/lake/ResourceIsolationGroupUtils.java new file mode 100644 index 0000000000000..5a76c57db8dc7 --- /dev/null +++ b/fe/fe-core/src/main/java/com/starrocks/lake/ResourceIsolationGroupUtils.java @@ -0,0 +1,16 @@ +package com.starrocks.lake; + +import java.util.Objects; + +public class ResourceIsolationGroupUtils { + public static final String DEFAULT_RESOURCE_ISOLATION_GROUP_ID = ""; + + public static boolean resourceIsolationGroupMatches(String rig1, String rig2) { + if (Objects.equals(rig1, rig2)) { + return true; + } + boolean unset1 = rig1 == null || rig1.isEmpty(); + boolean unset2 = rig2 == null || rig2.isEmpty(); + return unset1 && unset2; + } +} diff --git a/fe/fe-core/src/main/java/com/starrocks/lake/qe/scheduler/DefaultSharedDataWorkerProvider.java b/fe/fe-core/src/main/java/com/starrocks/lake/qe/scheduler/DefaultSharedDataWorkerProvider.java index 8f37ab328d04c..45f58f2141896 100644 --- a/fe/fe-core/src/main/java/com/starrocks/lake/qe/scheduler/DefaultSharedDataWorkerProvider.java +++ b/fe/fe-core/src/main/java/com/starrocks/lake/qe/scheduler/DefaultSharedDataWorkerProvider.java @@ -45,7 +45,7 @@ import java.util.function.IntSupplier; import java.util.stream.Collectors; -import static com.starrocks.system.NodeSelector.resourceIsolationGroupMatches; +import static com.starrocks.lake.ResourceIsolationGroupUtils.resourceIsolationGroupMatches; /** * WorkerProvider for SHARED_DATA mode. Compared to its counterpart for SHARED_NOTHING mode: @@ -75,6 +75,9 @@ public DefaultSharedDataWorkerProvider captureAvailableWorkers(SystemInfoService long warehouseId) { String thisFeResourceIsolationGroup = GlobalStateMgr.getCurrentState(). getNodeMgr().getMySelf().getResourceIsolationGroup(); + return captureAvailableWorkers(warehouseId, thisFeResourceIsolationGroup); + } + public DefaultSharedDataWorkerProvider captureAvailableWorkers(long warehouseId, String resourceIsolationGroup) { WarehouseManager warehouseManager = GlobalStateMgr.getCurrentState().getWarehouseMgr(); ImmutableMap.Builder builder = ImmutableMap.builder(); List computeNodeIds = warehouseManager.getAllComputeNodeIds(warehouseId); @@ -86,14 +89,13 @@ public DefaultSharedDataWorkerProvider captureAvailableWorkers(SystemInfoService } ImmutableMap availableComputeNodes = filterAvailableWorkers(idToComputeNode, - thisFeResourceIsolationGroup); + resourceIsolationGroup); if (availableComputeNodes.isEmpty()) { Warehouse warehouse = warehouseManager.getWarehouse(warehouseId); throw ErrorReportException.report(ErrorCode.ERR_NO_NODES_IN_WAREHOUSE, warehouse.getName()); } - return new DefaultSharedDataWorkerProvider(idToComputeNode, availableComputeNodes, - thisFeResourceIsolationGroup); + resourceIsolationGroup); } } @@ -116,17 +118,17 @@ public DefaultSharedDataWorkerProvider captureAvailableWorkers(SystemInfoService private final Set selectedWorkerIds; - private final String thisFeResourceIsolationGroup; + private final String resourceIsolationGroup; @VisibleForTesting public DefaultSharedDataWorkerProvider(ImmutableMap id2ComputeNode, ImmutableMap availableID2ComputeNode, - String thisFeResourceIsolationGroup + String resourceIsolationGroup ) { this.id2ComputeNode = id2ComputeNode; this.availableID2ComputeNode = availableID2ComputeNode; this.selectedWorkerIds = Sets.newConcurrentHashSet(); - this.thisFeResourceIsolationGroup = thisFeResourceIsolationGroup; + this.resourceIsolationGroup = resourceIsolationGroup; this.allComputeNodeIds = null; } @@ -266,7 +268,7 @@ public String toString() { backend.getHost(), backend.isAlive(), availableID2ComputeNode.containsKey(backendID), SimpleScheduler.isInBlocklist(backendID), - resourceIsolationGroupMatches(this.thisFeResourceIsolationGroup, + resourceIsolationGroupMatches(this.resourceIsolationGroup, backend.getResourceIsolationGroup())))); return out.toString(); } diff --git a/fe/fe-core/src/main/java/com/starrocks/system/NodeSelector.java b/fe/fe-core/src/main/java/com/starrocks/system/NodeSelector.java index 91d3a4991b99c..4f2b717711436 100644 --- a/fe/fe-core/src/main/java/com/starrocks/system/NodeSelector.java +++ b/fe/fe-core/src/main/java/com/starrocks/system/NodeSelector.java @@ -36,12 +36,13 @@ import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Random; import java.util.Set; import java.util.function.Predicate; import java.util.stream.Collectors; +import static com.starrocks.lake.ResourceIsolationGroupUtils.resourceIsolationGroupMatches; + /** * Select nodes when creating table or loading data. */ @@ -93,14 +94,6 @@ public List seqChooseBackendIds(int backendNum, boolean needAvailable, } } - public static boolean resourceIsolationGroupMatches(String rig1, String rig2) { - if (Objects.equals(rig1, rig2)) { - return true; - } - boolean unset1 = rig1 == null || rig1.isEmpty(); - boolean unset2 = rig2 == null || rig2.isEmpty(); - return unset1 && unset2; - } public List seqChooseComputeNodes(int computeNodeNum, boolean needAvailable, boolean isCreate) { diff --git a/fe/fe-core/src/main/java/com/starrocks/system/SystemInfoService.java b/fe/fe-core/src/main/java/com/starrocks/system/SystemInfoService.java index 7d379e8365390..5e71789760ed7 100644 --- a/fe/fe-core/src/main/java/com/starrocks/system/SystemInfoService.java +++ b/fe/fe-core/src/main/java/com/starrocks/system/SystemInfoService.java @@ -100,6 +100,7 @@ import java.util.stream.Stream; import static com.starrocks.common.util.PropertyAnalyzer.getResourceIsolationGroupFromProperties; +import static com.starrocks.lake.ResourceIsolationGroupUtils.DEFAULT_RESOURCE_ISOLATION_GROUP_ID; public class SystemInfoService implements GsonPostProcessable { private static final Logger LOG = LogManager.getLogger(SystemInfoService.class); @@ -317,7 +318,7 @@ public ShowResultSet modifyComputeNodeProperty(ModifyComputeNodeClause modifyCom if (entry.getKey().equals(AlterSystemStmtAnalyzer.PROP_KEY_GROUP)) { // "" means clean group label if (entry.getValue().isEmpty()) { - computeNode.setResourceIsolationGroup(""); + computeNode.setResourceIsolationGroup(DEFAULT_RESOURCE_ISOLATION_GROUP_ID); continue; } computeNode.setResourceIsolationGroup(getResourceIsolationGroupFromProperties(properties)); From fc2044ce1f707d0d1069409f9a3f13836f3ab8c4 Mon Sep 17 00:00:00 2001 From: Connor Date: Fri, 6 Sep 2024 12:37:12 -0400 Subject: [PATCH 4/5] undo changes to build.sh --- build.sh | 110 +++++++++++++++++++++++++++---------------------------- 1 file changed, 53 insertions(+), 57 deletions(-) diff --git a/build.sh b/build.sh index c4d00db80b3fd..5d1a0f52acb48 100755 --- a/build.sh +++ b/build.sh @@ -37,12 +37,6 @@ ROOT=`dirname "$0"` ROOT=`cd "$ROOT"; pwd` MACHINE_TYPE=$(uname -m) -echo "here 1" -if [ -z "$*" ]; then echo "No args"; fi -echo "you passed me" $* - - - export STARROCKS_HOME=${ROOT} if [ -z $BUILD_TYPE ]; then @@ -101,10 +95,14 @@ Usage: $0 --without-starcache build Backend without starcache library -j build Backend parallel - --output-compile-time + --output-compile-time save a list of the compile time for every C++ file in ${ROOT}/compile_times.txt. Turning this option on automatically disables ccache. - + --with-tenann + build with vector index tenann library + --with-compress-debug-symbol {ON|OFF} + build with compressing debug symbol. (default: $WITH_COMPRESS) + -h,--help Show this help message Eg. $0 build all $0 --be build Backend without clean @@ -116,13 +114,10 @@ Usage: $0 " exit 1 } -echo "here 2" -echo "$1" OPTS=$(getopt \ -n $0 \ - -o '' \ - -o 'h' \ + -o 'hj:' \ -l 'be' \ -l 'fe' \ -l 'spark-dpp' \ @@ -134,22 +129,20 @@ OPTS=$(getopt \ -l 'without-gcov' \ -l 'without-java-ext' \ -l 'without-starcache' \ - -l 'use-staros' \ -l 'with-brpc-keepalive' \ + -l 'use-staros' \ -l 'enable-shared-data' \ -l 'output-compile-time' \ - -o 'j:' \ + -l 'with-tenann' \ + -l 'with-compress-debug-symbol:' \ -l 'help' \ -- "$@") if [ $? != 0 ] ; then usage fi -echo "before eval set $1" - eval set -- "$OPTS" -echo "after eval set $1" BUILD_BE= BUILD_FE= @@ -165,6 +158,7 @@ WITH_STARCACHE=ON USE_STAROS=OFF BUILD_JAVA_EXT=ON OUTPUT_COMPILE_TIME=OFF +WITH_TENANN=OFF MSG="" MSG_FE="Frontend" MSG_DPP="Spark Dpp application" @@ -186,6 +180,10 @@ if [[ -z ${CCACHE} ]] && [[ -x "$(command -v ccache)" ]]; then CCACHE=ccache fi +if [[ -z ${WITH_TENANN} ]]; then + WITH_TENANN=ON +fi + if [ -e /proc/cpuinfo ] ; then # detect cpuinfo if [[ -z $(grep -o 'avx[^ ]\+' /proc/cpuinfo) ]]; then @@ -210,7 +208,6 @@ fi HELP=0 if [ $# == 1 ] ; then # default. `sh build.sh`` - echo "in here 1" BUILD_BE=1 BUILD_FE=1 BUILD_SPARK_DPP=1 @@ -219,7 +216,6 @@ if [ $# == 1 ] ; then RUN_UT=0 elif [[ $OPTS =~ "-j " ]] && [ $# == 3 ]; then # default. `sh build.sh -j 32` - echo "in here 1" BUILD_BE=1 BUILD_FE=1 BUILD_SPARK_DPP=1 @@ -228,20 +224,16 @@ elif [[ $OPTS =~ "-j " ]] && [ $# == 3 ]; then RUN_UT=0 PARALLEL=$2 else - echo "in here 3, forcing just fe clean build regardless of cmd line args" - echo "$1" - BUILD_BE=0 - BUILD_FE=1 + BUILD_FE=0 BUILD_SPARK_DPP=0 BUILD_HIVE_UDF=0 - CLEAN=1 + CLEAN=0 RUN_UT=0 while true; do - echo "$1" case "$1" in --be) BUILD_BE=1 ; shift ;; - --fe) BUILD_FE=1 ; echo "setting fe"; shift ;; + --fe) BUILD_FE=1 ; shift ;; --spark-dpp) BUILD_SPARK_DPP=1 ; shift ;; --hive-udf) BUILD_HIVE_UDF=1 ; shift ;; --clean) CLEAN=1 ; shift ;; @@ -254,6 +246,8 @@ else --without-java-ext) BUILD_JAVA_EXT=OFF; shift ;; --without-starcache) WITH_STARCACHE=OFF; shift ;; --output-compile-time) OUTPUT_COMPILE_TIME=ON; shift ;; + --with-tenann) WITH_TENANN=ON; shift ;; + --with-compress-debug-symbol) WITH_COMPRESS=$2 ; shift 2 ;; -h) HELP=1; shift ;; --help) HELP=1; shift ;; -j) PARALLEL=$2; shift 2 ;; @@ -262,8 +256,6 @@ else esac done fi -echo "here 3: " -echo $BUILD_FE if [[ ${HELP} -eq 1 ]]; then usage @@ -276,33 +268,32 @@ if [ ${CLEAN} -eq 1 ] && [ ${BUILD_BE} -eq 0 ] && [ ${BUILD_FE} -eq 0 ] && [ ${B fi echo "Get params: - BUILD_BE -- $BUILD_BE - BE_CMAKE_TYPE -- $BUILD_TYPE - BUILD_FE -- $BUILD_FE - BUILD_SPARK_DPP -- $BUILD_SPARK_DPP - BUILD_HIVE_UDF -- $BUILD_HIVE_UDF - CCACHE -- ${CCACHE} - CLEAN -- $CLEAN - RUN_UT -- $RUN_UT - WITH_GCOV -- $WITH_GCOV - WITH_BENCH -- $WITH_BENCH - WITH_CLANG_TIDY -- $WITH_CLANG_TIDY - WITH_COMPRESS -- $WITH_COMPRESS - WITH_STARCACHE -- $WITH_STARCACHE - ENABLE_SHARED_DATA -- $USE_STAROS - USE_AVX2 -- $USE_AVX2 - USE_AVX512 -- $USE_AVX512 - USE_SSE4_2 -- $USE_SSE4_2 - JEMALLOC_DEBUG -- $JEMALLOC_DEBUG - PARALLEL -- $PARALLEL - ENABLE_QUERY_DEBUG_TRACE -- $ENABLE_QUERY_DEBUG_TRACE - ENABLE_FAULT_INJECTION -- $ENABLE_FAULT_INJECTION - BUILD_JAVA_EXT -- $BUILD_JAVA_EXT - OUTPUT_COMPILE_TIME -- $OUTPUT_COMPILE_TIME + BUILD_BE -- $BUILD_BE + BE_CMAKE_TYPE -- $BUILD_TYPE + BUILD_FE -- $BUILD_FE + BUILD_SPARK_DPP -- $BUILD_SPARK_DPP + BUILD_HIVE_UDF -- $BUILD_HIVE_UDF + CCACHE -- ${CCACHE} + CLEAN -- $CLEAN + RUN_UT -- $RUN_UT + WITH_GCOV -- $WITH_GCOV + WITH_BENCH -- $WITH_BENCH + WITH_CLANG_TIDY -- $WITH_CLANG_TIDY + WITH_COMPRESS_DEBUG_SYMBOL -- $WITH_COMPRESS + WITH_STARCACHE -- $WITH_STARCACHE + ENABLE_SHARED_DATA -- $USE_STAROS + USE_AVX2 -- $USE_AVX2 + USE_AVX512 -- $USE_AVX512 + USE_SSE4_2 -- $USE_SSE4_2 + JEMALLOC_DEBUG -- $JEMALLOC_DEBUG + PARALLEL -- $PARALLEL + ENABLE_QUERY_DEBUG_TRACE -- $ENABLE_QUERY_DEBUG_TRACE + ENABLE_FAULT_INJECTION -- $ENABLE_FAULT_INJECTION + BUILD_JAVA_EXT -- $BUILD_JAVA_EXT + OUTPUT_COMPILE_TIME -- $OUTPUT_COMPILE_TIME + WITH_TENANN -- $WITH_TENANN " -if [ ${CLEAN} -eq 1 ]; then - echo "blah" -fi + check_tool() { local toolname=$1 @@ -337,6 +328,7 @@ cd ${STARROCKS_HOME} if [[ "${MACHINE_TYPE}" == "aarch64" ]]; then export LIBRARY_PATH=${JAVA_HOME}/jre/lib/aarch64/server/ + WITH_TENANN=OFF else export LIBRARY_PATH=${JAVA_HOME}/jre/lib/amd64/server/ fi @@ -371,7 +363,7 @@ if [ ${BUILD_BE} -eq 1 ] ; then fi export STARLET_INSTALL_DIR fi - + if [ "${OUTPUT_COMPILE_TIME}" == "ON" ]; then rm -f ${ROOT}/compile_times.txt CXX_COMPILER_LAUNCHER=${ROOT}/build-support/compile_time.sh @@ -400,6 +392,7 @@ if [ ${BUILD_BE} -eq 1 ] ; then -DWITH_STARCACHE=${WITH_STARCACHE} \ -DUSE_STAROS=${USE_STAROS} \ -DENABLE_FAULT_INJECTION=${ENABLE_FAULT_INJECTION} \ + -DWITH_TENANN=${WITH_TENANN} \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .. time ${BUILD_SYSTEM} -j${PARALLEL} @@ -493,6 +486,7 @@ fi if [ ${BUILD_BE} -eq 1 ]; then rm -rf ${STARROCKS_OUTPUT}/be/lib/* mkdir -p ${STARROCKS_OUTPUT}/be/lib/jni-packages + mkdir -p ${STARROCKS_OUTPUT}/be/lib/py-packages install -d ${STARROCKS_OUTPUT}/be/bin \ ${STARROCKS_OUTPUT}/be/conf \ @@ -570,6 +564,8 @@ if [ ${BUILD_BE} -eq 1 ]; then rm -f ${STARROCKS_OUTPUT}/be/lib/hadoop/common/lib/avro-1.9.2.jar rm -f ${STARROCKS_OUTPUT}/be/lib/hadoop/hdfs/lib/avro-1.9.2.jar + cp -r -p ${STARROCKS_HOME}/be/extension/python-udf/src/flight_server.py ${STARROCKS_OUTPUT}/be/lib/py-packages + MSG="${MSG} √ ${MSG_BE}" fi @@ -582,11 +578,11 @@ endTime=$(date +%s) totalTime=$((endTime - startTime)) echo "***************************************" -echo "Successfully build StarRocks ${MSG} ;" +echo "Successfully build StarRocks ${MSG} ; StartTime:$(date -d @$startTime '+%Y-%m-%d %H:%M:%S'), EndTime:$(date -d @$endTime '+%Y-%m-%d %H:%M:%S'), TotalTime:${totalTime}s" echo "***************************************" if [[ ! -z ${STARROCKS_POST_BUILD_HOOK} ]]; then eval ${STARROCKS_POST_BUILD_HOOK} fi -exit 0 +exit 0 \ No newline at end of file From 60bdf1aa79fcca5ba7d9947dd7b04aa8acd8181e Mon Sep 17 00:00:00 2001 From: Connor Date: Fri, 6 Sep 2024 12:38:17 -0400 Subject: [PATCH 5/5] undo changes to build.sh --- build.sh | 73 ++++++++++++++++++++++---------------------------------- 1 file changed, 28 insertions(+), 45 deletions(-) diff --git a/build.sh b/build.sh index 5d1a0f52acb48..39bf3ba2923ad 100755 --- a/build.sh +++ b/build.sh @@ -98,11 +98,7 @@ Usage: $0 --output-compile-time save a list of the compile time for every C++ file in ${ROOT}/compile_times.txt. Turning this option on automatically disables ccache. - --with-tenann - build with vector index tenann library - --with-compress-debug-symbol {ON|OFF} - build with compressing debug symbol. (default: $WITH_COMPRESS) - -h,--help Show this help message + Eg. $0 build all $0 --be build Backend without clean @@ -117,7 +113,8 @@ Usage: $0 OPTS=$(getopt \ -n $0 \ - -o 'hj:' \ + -o '' \ + -o 'h' \ -l 'be' \ -l 'fe' \ -l 'spark-dpp' \ @@ -129,12 +126,11 @@ OPTS=$(getopt \ -l 'without-gcov' \ -l 'without-java-ext' \ -l 'without-starcache' \ - -l 'with-brpc-keepalive' \ -l 'use-staros' \ + -l 'with-brpc-keepalive' \ -l 'enable-shared-data' \ -l 'output-compile-time' \ - -l 'with-tenann' \ - -l 'with-compress-debug-symbol:' \ + -o 'j:' \ -l 'help' \ -- "$@") @@ -158,7 +154,6 @@ WITH_STARCACHE=ON USE_STAROS=OFF BUILD_JAVA_EXT=ON OUTPUT_COMPILE_TIME=OFF -WITH_TENANN=OFF MSG="" MSG_FE="Frontend" MSG_DPP="Spark Dpp application" @@ -180,10 +175,6 @@ if [[ -z ${CCACHE} ]] && [[ -x "$(command -v ccache)" ]]; then CCACHE=ccache fi -if [[ -z ${WITH_TENANN} ]]; then - WITH_TENANN=ON -fi - if [ -e /proc/cpuinfo ] ; then # detect cpuinfo if [[ -z $(grep -o 'avx[^ ]\+' /proc/cpuinfo) ]]; then @@ -246,8 +237,6 @@ else --without-java-ext) BUILD_JAVA_EXT=OFF; shift ;; --without-starcache) WITH_STARCACHE=OFF; shift ;; --output-compile-time) OUTPUT_COMPILE_TIME=ON; shift ;; - --with-tenann) WITH_TENANN=ON; shift ;; - --with-compress-debug-symbol) WITH_COMPRESS=$2 ; shift 2 ;; -h) HELP=1; shift ;; --help) HELP=1; shift ;; -j) PARALLEL=$2; shift 2 ;; @@ -268,30 +257,29 @@ if [ ${CLEAN} -eq 1 ] && [ ${BUILD_BE} -eq 0 ] && [ ${BUILD_FE} -eq 0 ] && [ ${B fi echo "Get params: - BUILD_BE -- $BUILD_BE - BE_CMAKE_TYPE -- $BUILD_TYPE - BUILD_FE -- $BUILD_FE - BUILD_SPARK_DPP -- $BUILD_SPARK_DPP - BUILD_HIVE_UDF -- $BUILD_HIVE_UDF - CCACHE -- ${CCACHE} - CLEAN -- $CLEAN - RUN_UT -- $RUN_UT - WITH_GCOV -- $WITH_GCOV - WITH_BENCH -- $WITH_BENCH - WITH_CLANG_TIDY -- $WITH_CLANG_TIDY - WITH_COMPRESS_DEBUG_SYMBOL -- $WITH_COMPRESS - WITH_STARCACHE -- $WITH_STARCACHE - ENABLE_SHARED_DATA -- $USE_STAROS - USE_AVX2 -- $USE_AVX2 - USE_AVX512 -- $USE_AVX512 - USE_SSE4_2 -- $USE_SSE4_2 - JEMALLOC_DEBUG -- $JEMALLOC_DEBUG - PARALLEL -- $PARALLEL - ENABLE_QUERY_DEBUG_TRACE -- $ENABLE_QUERY_DEBUG_TRACE - ENABLE_FAULT_INJECTION -- $ENABLE_FAULT_INJECTION - BUILD_JAVA_EXT -- $BUILD_JAVA_EXT - OUTPUT_COMPILE_TIME -- $OUTPUT_COMPILE_TIME - WITH_TENANN -- $WITH_TENANN + BUILD_BE -- $BUILD_BE + BE_CMAKE_TYPE -- $BUILD_TYPE + BUILD_FE -- $BUILD_FE + BUILD_SPARK_DPP -- $BUILD_SPARK_DPP + BUILD_HIVE_UDF -- $BUILD_HIVE_UDF + CCACHE -- ${CCACHE} + CLEAN -- $CLEAN + RUN_UT -- $RUN_UT + WITH_GCOV -- $WITH_GCOV + WITH_BENCH -- $WITH_BENCH + WITH_CLANG_TIDY -- $WITH_CLANG_TIDY + WITH_COMPRESS -- $WITH_COMPRESS + WITH_STARCACHE -- $WITH_STARCACHE + ENABLE_SHARED_DATA -- $USE_STAROS + USE_AVX2 -- $USE_AVX2 + USE_AVX512 -- $USE_AVX512 + USE_SSE4_2 -- $USE_SSE4_2 + JEMALLOC_DEBUG -- $JEMALLOC_DEBUG + PARALLEL -- $PARALLEL + ENABLE_QUERY_DEBUG_TRACE -- $ENABLE_QUERY_DEBUG_TRACE + ENABLE_FAULT_INJECTION -- $ENABLE_FAULT_INJECTION + BUILD_JAVA_EXT -- $BUILD_JAVA_EXT + OUTPUT_COMPILE_TIME -- $OUTPUT_COMPILE_TIME " check_tool() @@ -328,7 +316,6 @@ cd ${STARROCKS_HOME} if [[ "${MACHINE_TYPE}" == "aarch64" ]]; then export LIBRARY_PATH=${JAVA_HOME}/jre/lib/aarch64/server/ - WITH_TENANN=OFF else export LIBRARY_PATH=${JAVA_HOME}/jre/lib/amd64/server/ fi @@ -392,7 +379,6 @@ if [ ${BUILD_BE} -eq 1 ] ; then -DWITH_STARCACHE=${WITH_STARCACHE} \ -DUSE_STAROS=${USE_STAROS} \ -DENABLE_FAULT_INJECTION=${ENABLE_FAULT_INJECTION} \ - -DWITH_TENANN=${WITH_TENANN} \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .. time ${BUILD_SYSTEM} -j${PARALLEL} @@ -486,7 +472,6 @@ fi if [ ${BUILD_BE} -eq 1 ]; then rm -rf ${STARROCKS_OUTPUT}/be/lib/* mkdir -p ${STARROCKS_OUTPUT}/be/lib/jni-packages - mkdir -p ${STARROCKS_OUTPUT}/be/lib/py-packages install -d ${STARROCKS_OUTPUT}/be/bin \ ${STARROCKS_OUTPUT}/be/conf \ @@ -564,8 +549,6 @@ if [ ${BUILD_BE} -eq 1 ]; then rm -f ${STARROCKS_OUTPUT}/be/lib/hadoop/common/lib/avro-1.9.2.jar rm -f ${STARROCKS_OUTPUT}/be/lib/hadoop/hdfs/lib/avro-1.9.2.jar - cp -r -p ${STARROCKS_HOME}/be/extension/python-udf/src/flight_server.py ${STARROCKS_OUTPUT}/be/lib/py-packages - MSG="${MSG} √ ${MSG_BE}" fi