Skip to content

Commit

Permalink
[Enhancement] Allow CN to run script (#44982)
Browse files Browse the repository at this point in the history
Signed-off-by: Binglin Chang <[email protected]>
(cherry picked from commit ed6a72c)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/qe/ExecuteScriptExecutor.java
  • Loading branch information
decster authored and mergify[bot] committed Apr 29, 2024
1 parent dbba8b0 commit 3024413
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import com.starrocks.rpc.BackendServiceClient;
import com.starrocks.server.GlobalStateMgr;
import com.starrocks.sql.ast.ExecuteScriptStmt;
import com.starrocks.system.Backend;
import com.starrocks.system.ComputeNode;
import com.starrocks.thrift.TNetworkAddress;
import groovy.lang.Binding;
import groovy.lang.GroovyShell;
Expand Down Expand Up @@ -79,7 +79,11 @@ private static ShowResultSet executeFrontendScript(ExecuteScriptStmt stmt, Conne
}

private static ShowResultSet executeBackendScript(ExecuteScriptStmt stmt, ConnectContext ctx) throws UserException {
<<<<<<< HEAD
Backend be = GlobalStateMgr.getCurrentSystemInfo().getBackend(stmt.getBeId());
=======
ComputeNode be = GlobalStateMgr.getCurrentState().getNodeMgr().getClusterInfo().getBackendOrComputeNode(stmt.getBeId());
>>>>>>> ed6a72c431 ([Enhancement] Allow CN to run script (#44982))
if (be == null) {
throw new UserException("node not found: " + stmt.getBeId());
}
Expand Down

0 comments on commit 3024413

Please sign in to comment.