Skip to content

Commit

Permalink
[to rc/1.3.3] Modify message of unsupported DataNode->ConfigNode RPC …
Browse files Browse the repository at this point in the history
…(CP 13945) #13948
  • Loading branch information
liyuheng55555 authored Oct 29, 2024
1 parent 6ea5ec2 commit 6406f23
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ public class ConfigNodeClient implements IConfigNodeRPCService.Iface, ThriftClie
private static final long RETRY_INTERVAL_MS = 1000L;
private static final long WAIT_CN_LEADER_ELECTION_INTERVAL_MS = 2000L;

private static final String UNSUPPORTED_INVOCATION =
"This method is not supported for invocation by DataNode";

private final ThriftClientProperty property;

private IConfigNodeRPCService.Iface client;
Expand Down Expand Up @@ -462,17 +465,17 @@ public TDataNodeRestartResp restartDataNode(TDataNodeRestartReq req) throws TExc

@Override
public TAINodeRegisterResp registerAINode(TAINodeRegisterReq req) throws TException {
throw new UnsupportedOperationException("RegisterAINode method is not supported in datanode");
throw new UnsupportedOperationException(UNSUPPORTED_INVOCATION);
}

@Override
public TAINodeRestartResp restartAINode(TAINodeRestartReq req) throws TException {
throw new UnsupportedOperationException("RestartAINode method is not supported in datanode");
throw new UnsupportedOperationException(UNSUPPORTED_INVOCATION);
}

@Override
public TSStatus removeAINode(TAINodeRemoveReq req) throws TException {
throw new UnsupportedOperationException("RemoveAINode method is not supported in datanode");
throw new UnsupportedOperationException(UNSUPPORTED_INVOCATION);
}

@Override
Expand All @@ -483,8 +486,7 @@ public TShowAINodesResp showAINodes() throws TException {

@Override
public TAINodeConfigurationResp getAINodeConfiguration(int aiNodeId) throws TException {
throw new UnsupportedOperationException(
"GetAINodeConfiguration method is not supported in datanode");
throw new UnsupportedOperationException(UNSUPPORTED_INVOCATION);
}

@Override
Expand Down Expand Up @@ -750,7 +752,8 @@ public TSStatus submitLoadConfigurationTask() throws TException {

@Override
public TSStatus loadConfiguration() throws TException {
throw new UnsupportedOperationException("Please call submitLoadConfigurationTask instead");
throw new UnsupportedOperationException(
UNSUPPORTED_INVOCATION + ", please call submitLoadConfigurationTask instead");
}

@Override
Expand Down

0 comments on commit 6406f23

Please sign in to comment.