Apache9 commented on a change in pull request #3550: URL: https://github.com/apache/hbase/pull/3550#discussion_r685631191
########## File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcConnectionRegistry.java ########## @@ -0,0 +1,99 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hbase.client; + +import java.io.IOException; +import java.util.Set; +import java.util.concurrent.CompletableFuture; +import java.util.stream.Collectors; +import org.apache.commons.lang3.StringUtils; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hbase.HBaseInterfaceAudience; +import org.apache.hadoop.hbase.ServerName; +import org.apache.yetus.audience.InterfaceAudience; + +import org.apache.hbase.thirdparty.com.google.common.base.Splitter; + +import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil; +import org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService; +import org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetBootstrapNodesRequest; +import org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetBootstrapNodesResponse; + +/** + * Rpc based connection registry. It will make use of the {@link ClientMetaService} to get registry + * information. + * <p/> + * It needs bootstrap node list when start up, and then it will use {@link ClientMetaService} to + * refresh the bootstrap node list periodically. + * <p/> + * Usually, you could set masters as the bootstrap nodes,as they will also implement the + * {@link ClientMetaService}, and then, we will switch to use region servers after refreshing the + * bootstrap nodes. Review comment: We will replace the bootstrap nodes every time when we fetch the new bootstrap nodes. So once the client connects to cluster, no matter what the first bootstrap nodes are, it will switch to the new bootstrap nodes we want the client to use. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
