diff --git a/fe/fe-core/src/main/java/com/starrocks/http/HttpServer.java b/fe/fe-core/src/main/java/com/starrocks/http/HttpServer.java index efd4ffc6942ea..0df7539fedc59 100644 --- a/fe/fe-core/src/main/java/com/starrocks/http/HttpServer.java +++ b/fe/fe-core/src/main/java/com/starrocks/http/HttpServer.java @@ -97,6 +97,7 @@ import com.starrocks.metric.GaugeMetric; import com.starrocks.metric.GaugeMetricImpl; import com.starrocks.metric.Metric; +import com.starrocks.server.RunMode; import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.Channel; import io.netty.channel.ChannelHandlerContext; @@ -199,8 +200,9 @@ private void registerActions() throws IllegalArgException { // for stop FE StopFeAction.registerAction(controller); ExecuteSqlAction.registerAction(controller); - StarManagerHttpServiceAction.registerAction(controller); - + if (RunMode.isSharedDataMode()) { + StarManagerHttpServiceAction.registerAction(controller); + } // meta service action File imageDir = MetaHelper.getLeaderImageDir(); ImageAction.registerAction(controller, imageDir); diff --git a/fe/fe-core/src/main/java/com/starrocks/http/rest/StarManagerHttpServiceAction.java b/fe/fe-core/src/main/java/com/starrocks/http/rest/StarManagerHttpServiceAction.java index d722989fa9ee5..56aa3433d13a4 100644 --- a/fe/fe-core/src/main/java/com/starrocks/http/rest/StarManagerHttpServiceAction.java +++ b/fe/fe-core/src/main/java/com/starrocks/http/rest/StarManagerHttpServiceAction.java @@ -69,7 +69,7 @@ public static void registerAction(ActionController controller) throws IllegalArg controller.registerHandler(HttpMethod.POST, "/api/v1/starmgr/service/{" + SERVICE + "}/shardgroup/{" + ID + "}/removereplicas", action); - // rebalance all replicas + // balance all replicas controller.registerHandler(HttpMethod.POST, "/api/v1/starmgr/service/{" + SERVICE + "}/rebalance", action); } @@ -87,7 +87,7 @@ public void executeWithoutPassword(BaseRequest request, BaseResponse response) response.setContentType(httpResponse.headers().get(HttpHeaderNames.CONTENT_TYPE)); writeResponse(request, response, httpResponse.status()); } else { - throw new DdlException("Internal Error"); + throw new DdlException("Failed to access star manager's http service"); } } } \ No newline at end of file