stoty commented on code in PR #1658: URL: https://github.com/apache/phoenix/pull/1658#discussion_r1342280654
########## phoenix-core/src/main/java/org/apache/phoenix/jdbc/MasterConnectionInfo.java: ########## @@ -0,0 +1,103 @@ +/* + * 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.phoenix.jdbc; + +import java.sql.SQLException; +import java.util.Map; +import java.util.Properties; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hbase.HConstants; +import org.apache.hadoop.hbase.security.User; +import org.apache.phoenix.util.PhoenixRuntime; +import org.apache.phoenix.util.ReadOnlyProps; + +/** + * ConnectionInfo used for org.apache.hadoop.hbase.client.MasterRegistry + * + */ +public class MasterConnectionInfo extends AbstractRPCConnectionInfo { + + private static final String MASTER_REGISTRY_CLASS_NAME = + "org.apache.hadoop.hbase.client.MasterRegistry"; Review Comment: Referring the class directly would require compiling with HBase 2.4+, and would preclude a straight-ish backport to 5.1. Also, RPCRegistry is only available in HBase 2.5, so we cannot do this for each registry even in master. I have duplicated all property and class strings so that we can compile with HBase 2.1+, and added some explicit HBase version checks instead. (I also noticed that we are duplicating a lot of string constants that have been stable and available for a long time, but I left those alone). The extra code required to support MasterRegistry is also minimal, it's the same as RPCClientRegistry, it just takes the hosts lists from different properties. -- 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]
