Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DongLiang-0 committed Dec 9, 2024
1 parent 7b8a29c commit 73990ae
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import org.apache.doris.catalog.Env;
import org.apache.doris.common.AnalysisException;
import org.apache.doris.common.DdlException;
import org.apache.doris.common.ErrorCode;
import org.apache.doris.common.ErrorReport;
import org.apache.doris.common.util.NetUtils;
Expand All @@ -41,7 +42,7 @@
/**
* admin rebalance disk
*/
public class AdminRebalanceDiskCommand extends Command {
public class AdminRebalanceDiskCommand extends Command implements NoForward {
private static final Logger LOG = LogManager.getLogger(AdminRebalanceDiskCommand.class);
private final long timeoutS = 24 * 3600; // default 24 hours
private List<String> backends;
Expand Down Expand Up @@ -95,6 +96,12 @@ private void handleRebalanceDisk() throws AnalysisException {
Env.getCurrentEnv().getTabletScheduler().rebalanceDisk(needRebalanceDiskBackends, timeoutS);
}

@Override
protected void checkSupportedInCloudMode(ConnectContext ctx) throws DdlException {
LOG.info("AdminRebalanceDiskCommand not supported in cloud mode");
throw new DdlException("Unsupported operation");
}

@Override
public <R, C> R accept(PlanVisitor<R, C> visitor, C context) {
return visitor.visitAdminRebalanceDiskCommand(this, context);
Expand Down

0 comments on commit 73990ae

Please sign in to comment.