【Improvement】Avoid null host when forward to master (#4844)

Co-authored-by: wangxixu <wangxixu@xiaomi.com>
This commit is contained in:
xinghuayu007
2020-11-10 10:54:29 +08:00
committed by GitHub
parent 4204a878c8
commit 17af23edae

View File

@ -61,6 +61,9 @@ public class MasterOpExecutor {
// Send request to Master
private void forward() throws Exception {
if (!ctx.getCatalog().isReady()) {
throw new Exception("Node catalog is not ready, please wait for a while.");
}
String masterHost = ctx.getCatalog().getMasterIp();
int masterRpcPort = ctx.getCatalog().getMasterRpcPort();
TNetworkAddress thriftAddress = new TNetworkAddress(masterHost, masterRpcPort);