You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/06/21 15:09:04 UTC

[GitHub] [hbase] Apache9 opened a new pull request #1943: HBASE-24609 Move MetaTableAccessor out of hbase-client

Apache9 opened a new pull request #1943:
URL: https://github.com/apache/hbase/pull/1943


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache9 commented on a change in pull request #1943: HBASE-24609 Move MetaTableAccessor out of hbase-client

Posted by GitBox <gi...@apache.org>.
Apache9 commented on a change in pull request #1943:
URL: https://github.com/apache/hbase/pull/1943#discussion_r444886962



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/CatalogFamilyFormat.java
##########
@@ -0,0 +1,349 @@
+/**
+ * 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;
+
+import edu.umd.cs.findbugs.annotations.Nullable;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.NavigableMap;
+import java.util.SortedMap;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import org.apache.hadoop.hbase.client.RegionInfo;
+import org.apache.hadoop.hbase.client.RegionInfoBuilder;
+import org.apache.hadoop.hbase.client.RegionReplicaUtil;
+import org.apache.hadoop.hbase.client.Result;
+import org.apache.hadoop.hbase.client.TableState;
+import org.apache.hadoop.hbase.exceptions.DeserializationException;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.yetus.audience.InterfaceAudience;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
+
+/**
+ * Helper class for generating/parsing
+ * {@value org.apache.hadoop.hbase.HConstants#CATALOG_FAMILY_STR} family cells in meta table.
+ * <p/>
+ * The cells in catalog family are:
+ *
+ * <pre>
+ * For each table range ('Region'), there is a single row, formatted as:
+ * &lt;tableName&gt;,&lt;startKey&gt;,&lt;regionId&gt;,&lt;encodedRegionName&gt;.
+ * This row is the serialized regionName of the default region replica.
+ * Columns are:
+ * info:regioninfo         => contains serialized HRI for the default region replica
+ * info:server             => contains hostname:port (in string form) for the server hosting
+ *                            the default regionInfo replica
+ * info:server_&lt;replicaId&gt => contains hostname:port (in string form) for the server hosting
+ *                                 the regionInfo replica with replicaId
+ * info:serverstartcode    => contains server start code (in binary long form) for the server
+ *                            hosting the default regionInfo replica
+ * info:serverstartcode_&lt;replicaId&gt => contains server start code (in binary long form) for
+ *                                          the server hosting the regionInfo replica with
+ *                                          replicaId
+ * info:seqnumDuringOpen   => contains seqNum (in binary long form) for the region at the time
+ *                            the server opened the region with default replicaId
+ * info:seqnumDuringOpen_&lt;replicaId&gt => contains seqNum (in binary long form) for the region
+ *                                           at the time the server opened the region with
+ *                                           replicaId
+ * info:splitA             => contains a serialized HRI for the first daughter region if the
+ *                            region is split
+ * info:splitB             => contains a serialized HRI for the second daughter region if the
+ *                            region is split
+ * info:merge*             => contains a serialized HRI for a merge parent region. There will be two
+ *                            or more of these columns in a row. A row that has these columns is
+ *                            undergoing a merge and is the result of the merge. Columns listed
+ *                            in marge* columns are the parents of this merged region. Example
+ *                            columns: info:merge0001, info:merge0002. You make also see 'mergeA',
+ *                            and 'mergeB'. This is old form replaced by the new format that allows
+ *                            for more than two parents to be merged at a time.
+ * </pre>
+ */
+@InterfaceAudience.Private
+public class CatalogFamilyFormat {
+
+  private static final Logger LOG = LoggerFactory.getLogger(CatalogFamilyFormat.class);
+
+  /** A regex for parsing server columns from meta. See above javadoc for meta layout */
+  private static final Pattern SERVER_COLUMN_PATTERN =
+    Pattern.compile("^server(_[0-9a-fA-F]{4})?$");

Review comment:
         @InterfaceAudience.Private
     String REPLICA_ID_FORMAT = "%04X";
   
    I think it is in hex format?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #1943: HBASE-24609 Move MetaTableAccessor out of hbase-client

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #1943:
URL: https://github.com/apache/hbase/pull/1943#issuecomment-647146046


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 25s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  1s |  No case conflicting files found.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  Patch does not have any anti-patterns.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 21s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   3m 55s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   2m 41s |  master passed  |
   | +1 :green_heart: |  spotbugs  |   4m 59s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 11s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 42s |  the patch passed  |
   | -0 :warning: |  checkstyle  |   0m 26s |  hbase-client: The patch generated 6 new + 8 unchanged - 57 fixed = 14 total (was 65)  |
   | -0 :warning: |  checkstyle  |   0m 11s |  hbase-balancer: The patch generated 9 new + 13 unchanged - 0 fixed = 22 total (was 13)  |
   | -0 :warning: |  checkstyle  |   1m 17s |  hbase-server: The patch generated 13 new + 326 unchanged - 7 fixed = 339 total (was 333)  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  hadoopcheck  |  12m  0s |  Patch does not cause any errors with Hadoop 3.1.2 3.2.1.  |
   | +1 :green_heart: |  spotbugs  |   5m 34s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 42s |  The patch does not generate ASF License warnings.  |
   |  |   |  45m 31s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.11 Server=19.03.11 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/1/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1943 |
   | Optional Tests | dupname asflicense spotbugs hadoopcheck hbaseanti checkstyle |
   | uname | Linux a49e3efbee30 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 73ab216414 |
   | checkstyle | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/1/artifact/yetus-general-check/output/diff-checkstyle-hbase-client.txt |
   | checkstyle | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/1/artifact/yetus-general-check/output/diff-checkstyle-hbase-balancer.txt |
   | checkstyle | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/1/artifact/yetus-general-check/output/diff-checkstyle-hbase-server.txt |
   | Max. process+thread count | 84 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-balancer hbase-server hbase-thrift U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/1/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) spotbugs=3.1.12 |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #1943: HBASE-24609 Move MetaTableAccessor out of hbase-client

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #1943:
URL: https://github.com/apache/hbase/pull/1943#issuecomment-647393783


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 36s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  3s |  Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck  |
   ||| _ Prechecks _ |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 24s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   5m 31s |  master passed  |
   | +1 :green_heart: |  compile  |   3m  7s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   7m 50s |  branch has no errors when building our shaded downstream artifacts.  |
   | -0 :warning: |  javadoc  |   0m 21s |  hbase-balancer in master failed.  |
   | -0 :warning: |  javadoc  |   0m 32s |  hbase-client in master failed.  |
   | -0 :warning: |  javadoc  |   0m 50s |  hbase-server in master failed.  |
   | -0 :warning: |  javadoc  |   1m 15s |  hbase-thrift in master failed.  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 17s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   5m 45s |  the patch passed  |
   | +1 :green_heart: |  compile  |   3m  8s |  the patch passed  |
   | +1 :green_heart: |  javac  |   3m  8s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   8m 15s |  patch has no errors when building our shaded downstream artifacts.  |
   | -0 :warning: |  javadoc  |   0m 31s |  hbase-client in the patch failed.  |
   | -0 :warning: |  javadoc  |   0m 20s |  hbase-balancer in the patch failed.  |
   | -0 :warning: |  javadoc  |   0m 53s |  hbase-server in the patch failed.  |
   | -0 :warning: |  javadoc  |   1m 16s |  hbase-thrift in the patch failed.  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   1m 38s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 27s |  hbase-balancer in the patch passed.  |
   | +1 :green_heart: |  unit  | 136m 59s |  hbase-server in the patch passed.  |
   | +1 :green_heart: |  unit  |   4m 20s |  hbase-thrift in the patch passed.  |
   |  |   | 187m 15s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.11 Server=19.03.11 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/3/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1943 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux ec7c073ed5c6 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 8f1353b447 |
   | Default Java | 2020-01-14 |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/3/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-balancer.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/3/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-client.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/3/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/3/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-thrift.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/3/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-client.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/3/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-balancer.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/3/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/3/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-thrift.txt |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/3/testReport/ |
   | Max. process+thread count | 3867 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-balancer hbase-server hbase-thrift U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/3/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #1943: HBASE-24609 Move MetaTableAccessor out of hbase-client

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #1943:
URL: https://github.com/apache/hbase/pull/1943#issuecomment-647282921


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 28s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  4s |  Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck  |
   ||| _ Prechecks _ |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 23s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m 12s |  master passed  |
   | +1 :green_heart: |  compile  |   2m 29s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   5m 42s |  branch has no errors when building our shaded downstream artifacts.  |
   | -0 :warning: |  javadoc  |   0m 18s |  hbase-balancer in master failed.  |
   | -0 :warning: |  javadoc  |   0m 26s |  hbase-client in master failed.  |
   | -0 :warning: |  javadoc  |   0m 39s |  hbase-server in master failed.  |
   | -0 :warning: |  javadoc  |   0m 50s |  hbase-thrift in master failed.  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 15s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 58s |  the patch passed  |
   | +1 :green_heart: |  compile  |   2m 27s |  the patch passed  |
   | +1 :green_heart: |  javac  |   2m 27s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   5m 42s |  patch has no errors when building our shaded downstream artifacts.  |
   | -0 :warning: |  javadoc  |   0m 27s |  hbase-client in the patch failed.  |
   | -0 :warning: |  javadoc  |   0m 16s |  hbase-balancer in the patch failed.  |
   | -0 :warning: |  javadoc  |   0m 40s |  hbase-server in the patch failed.  |
   | -0 :warning: |  javadoc  |   0m 50s |  hbase-thrift in the patch failed.  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   1m 13s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 23s |  hbase-balancer in the patch passed.  |
   | +1 :green_heart: |  unit  | 126m 23s |  hbase-server in the patch passed.  |
   | +1 :green_heart: |  unit  |   4m 20s |  hbase-thrift in the patch passed.  |
   |  |   | 165m 20s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.11 Server=19.03.11 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1943 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 9da4ab7be8af 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 8f1353b447 |
   | Default Java | 2020-01-14 |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/2/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-balancer.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/2/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-client.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/2/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/2/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-thrift.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/2/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-client.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/2/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-balancer.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/2/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/2/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-thrift.txt |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/2/testReport/ |
   | Max. process+thread count | 4222 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-balancer hbase-server hbase-thrift U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/2/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] infraio commented on a change in pull request #1943: HBASE-24609 Move MetaTableAccessor out of hbase-client

Posted by GitBox <gi...@apache.org>.
infraio commented on a change in pull request #1943:
URL: https://github.com/apache/hbase/pull/1943#discussion_r444682937



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/CatalogFamilyFormat.java
##########
@@ -0,0 +1,349 @@
+/**
+ * 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;
+
+import edu.umd.cs.findbugs.annotations.Nullable;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.NavigableMap;
+import java.util.SortedMap;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import org.apache.hadoop.hbase.client.RegionInfo;
+import org.apache.hadoop.hbase.client.RegionInfoBuilder;
+import org.apache.hadoop.hbase.client.RegionReplicaUtil;
+import org.apache.hadoop.hbase.client.Result;
+import org.apache.hadoop.hbase.client.TableState;
+import org.apache.hadoop.hbase.exceptions.DeserializationException;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.yetus.audience.InterfaceAudience;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
+
+/**
+ * Helper class for generating/parsing
+ * {@value org.apache.hadoop.hbase.HConstants#CATALOG_FAMILY_STR} family cells in meta table.
+ * <p/>
+ * The cells in catalog family are:
+ *
+ * <pre>
+ * For each table range ('Region'), there is a single row, formatted as:
+ * &lt;tableName&gt;,&lt;startKey&gt;,&lt;regionId&gt;,&lt;encodedRegionName&gt;.
+ * This row is the serialized regionName of the default region replica.
+ * Columns are:
+ * info:regioninfo         => contains serialized HRI for the default region replica
+ * info:server             => contains hostname:port (in string form) for the server hosting
+ *                            the default regionInfo replica
+ * info:server_&lt;replicaId&gt => contains hostname:port (in string form) for the server hosting
+ *                                 the regionInfo replica with replicaId
+ * info:serverstartcode    => contains server start code (in binary long form) for the server
+ *                            hosting the default regionInfo replica
+ * info:serverstartcode_&lt;replicaId&gt => contains server start code (in binary long form) for
+ *                                          the server hosting the regionInfo replica with
+ *                                          replicaId
+ * info:seqnumDuringOpen   => contains seqNum (in binary long form) for the region at the time
+ *                            the server opened the region with default replicaId
+ * info:seqnumDuringOpen_&lt;replicaId&gt => contains seqNum (in binary long form) for the region
+ *                                           at the time the server opened the region with
+ *                                           replicaId
+ * info:splitA             => contains a serialized HRI for the first daughter region if the
+ *                            region is split
+ * info:splitB             => contains a serialized HRI for the second daughter region if the
+ *                            region is split
+ * info:merge*             => contains a serialized HRI for a merge parent region. There will be two
+ *                            or more of these columns in a row. A row that has these columns is
+ *                            undergoing a merge and is the result of the merge. Columns listed
+ *                            in marge* columns are the parents of this merged region. Example
+ *                            columns: info:merge0001, info:merge0002. You make also see 'mergeA',
+ *                            and 'mergeB'. This is old form replaced by the new format that allows
+ *                            for more than two parents to be merged at a time.
+ * </pre>
+ */
+@InterfaceAudience.Private
+public class CatalogFamilyFormat {
+
+  private static final Logger LOG = LoggerFactory.getLogger(CatalogFamilyFormat.class);
+
+  /** A regex for parsing server columns from meta. See above javadoc for meta layout */
+  private static final Pattern SERVER_COLUMN_PATTERN =
+    Pattern.compile("^server(_[0-9a-fA-F]{4})?$");

Review comment:
       replica_id is a integer? So it should only have [0-9]? 




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache9 merged pull request #1943: HBASE-24609 Move MetaTableAccessor out of hbase-client

Posted by GitBox <gi...@apache.org>.
Apache9 merged pull request #1943:
URL: https://github.com/apache/hbase/pull/1943


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #1943: HBASE-24609 Move MetaTableAccessor out of hbase-client

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #1943:
URL: https://github.com/apache/hbase/pull/1943#issuecomment-647291300


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 35s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  3s |  Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck  |
   ||| _ Prechecks _ |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 22s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m  3s |  master passed  |
   | +1 :green_heart: |  compile  |   2m 25s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   7m  7s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   2m  0s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 16s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   4m 13s |  the patch passed  |
   | +1 :green_heart: |  compile  |   2m 32s |  the patch passed  |
   | +1 :green_heart: |  javac  |   2m 32s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   7m 10s |  patch has no errors when building our shaded downstream artifacts.  |
   | -0 :warning: |  javadoc  |   0m 26s |  hbase-client generated 3 new + 2 unchanged - 0 fixed = 5 total (was 2)  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   1m 14s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 22s |  hbase-balancer in the patch passed.  |
   | +1 :green_heart: |  unit  | 145m 24s |  hbase-server in the patch passed.  |
   | +1 :green_heart: |  unit  |   4m 56s |  hbase-thrift in the patch passed.  |
   |  |   | 187m 41s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.11 Server=19.03.11 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1943 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 90646a6170fb 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 8f1353b447 |
   | Default Java | 1.8.0_232 |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/2/artifact/yetus-jdk8-hadoop3-check/output/diff-javadoc-javadoc-hbase-client.txt |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/2/testReport/ |
   | Max. process+thread count | 3948 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-balancer hbase-server hbase-thrift U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/2/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache9 commented on pull request #1943: HBASE-24609 Move MetaTableAccessor out of hbase-client

Posted by GitBox <gi...@apache.org>.
Apache9 commented on pull request #1943:
URL: https://github.com/apache/hbase/pull/1943#issuecomment-647140760


   Introduced a CatalogFamilyFormat to place the method for generating/parsing cells in catalog family.
   Renamed AsyncMetaTableAccessor to ClientMetaTableAccessor, removed duplicated code with CatalogFamiltyFormat and MetaTableAccessor, moved some code in MetaTableAccessor to ClientMetaTableAccessor.
   Moved MetaTableAccessor to hbase-balancer.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache9 commented on pull request #1943: HBASE-24609 Move MetaTableAccessor out of hbase-client

Posted by GitBox <gi...@apache.org>.
Apache9 commented on pull request #1943:
URL: https://github.com/apache/hbase/pull/1943#issuecomment-647140955


   This is for simplifying the implementation for HBASE-24608.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #1943: HBASE-24609 Move MetaTableAccessor out of hbase-client

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #1943:
URL: https://github.com/apache/hbase/pull/1943#issuecomment-647161208


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   3m 52s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  4s |  Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck  |
   ||| _ Prechecks _ |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 22s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m 12s |  master passed  |
   | +1 :green_heart: |  compile  |   2m 27s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   5m 47s |  branch has no errors when building our shaded downstream artifacts.  |
   | -0 :warning: |  javadoc  |   0m 18s |  hbase-balancer in master failed.  |
   | -0 :warning: |  javadoc  |   0m 26s |  hbase-client in master failed.  |
   | -0 :warning: |  javadoc  |   0m 38s |  hbase-server in master failed.  |
   | -0 :warning: |  javadoc  |   0m 52s |  hbase-thrift in master failed.  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 15s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   4m  2s |  the patch passed  |
   | +1 :green_heart: |  compile  |   2m 26s |  the patch passed  |
   | +1 :green_heart: |  javac  |   2m 26s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   5m 42s |  patch has no errors when building our shaded downstream artifacts.  |
   | -0 :warning: |  javadoc  |   0m 24s |  hbase-client in the patch failed.  |
   | -0 :warning: |  javadoc  |   0m 18s |  hbase-balancer in the patch failed.  |
   | -0 :warning: |  javadoc  |   0m 38s |  hbase-server in the patch failed.  |
   | -0 :warning: |  javadoc  |   0m 51s |  hbase-thrift in the patch failed.  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   1m 10s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 22s |  hbase-balancer in the patch passed.  |
   | +1 :green_heart: |  unit  | 129m 54s |  hbase-server in the patch passed.  |
   | +1 :green_heart: |  unit  |   4m 48s |  hbase-thrift in the patch passed.  |
   |  |   | 172m 43s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.11 Server=19.03.11 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1943 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 7d983833e4e1 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 73ab216414 |
   | Default Java | 2020-01-14 |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/1/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-balancer.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/1/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-client.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/1/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/1/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-thrift.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/1/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-client.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/1/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-balancer.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/1/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/1/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-thrift.txt |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/1/testReport/ |
   | Max. process+thread count | 4027 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-balancer hbase-server hbase-thrift U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/1/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #1943: HBASE-24609 Move MetaTableAccessor out of hbase-client

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #1943:
URL: https://github.com/apache/hbase/pull/1943#issuecomment-647247034


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m 23s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  1s |  No case conflicting files found.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  Patch does not have any anti-patterns.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 28s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   3m 44s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   2m 41s |  master passed  |
   | +1 :green_heart: |  spotbugs  |   5m  0s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 12s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 47s |  the patch passed  |
   | +1 :green_heart: |  checkstyle  |   0m 27s |  hbase-client: The patch generated 0 new + 8 unchanged - 57 fixed = 8 total (was 65)  |
   | +1 :green_heart: |  checkstyle  |   0m 11s |  The patch passed checkstyle in hbase-balancer  |
   | +1 :green_heart: |  checkstyle  |   1m 16s |  hbase-server: The patch generated 0 new + 326 unchanged - 7 fixed = 326 total (was 333)  |
   | +1 :green_heart: |  checkstyle  |   0m 44s |  The patch passed checkstyle in hbase-thrift  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  hadoopcheck  |  12m 20s |  Patch does not cause any errors with Hadoop 3.1.2 3.2.1.  |
   | +1 :green_heart: |  spotbugs  |   5m 41s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 42s |  The patch does not generate ASF License warnings.  |
   |  |   |  47m  7s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.9 Server=19.03.9 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/2/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1943 |
   | Optional Tests | dupname asflicense spotbugs hadoopcheck hbaseanti checkstyle |
   | uname | Linux 801cc46cec35 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 8f1353b447 |
   | Max. process+thread count | 84 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-balancer hbase-server hbase-thrift U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/2/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) spotbugs=3.1.12 |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #1943: HBASE-24609 Move MetaTableAccessor out of hbase-client

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #1943:
URL: https://github.com/apache/hbase/pull/1943#issuecomment-647385877


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 29s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  3s |  Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck  |
   ||| _ Prechecks _ |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 25s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   3m 40s |  master passed  |
   | +1 :green_heart: |  compile  |   2m 12s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   5m 39s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   1m 50s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 16s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 25s |  the patch passed  |
   | +1 :green_heart: |  compile  |   2m 20s |  the patch passed  |
   | +1 :green_heart: |  javac  |   2m 20s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   5m 44s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   1m 45s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   1m  3s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 19s |  hbase-balancer in the patch passed.  |
   | +1 :green_heart: |  unit  | 135m 21s |  hbase-server in the patch passed.  |
   | +1 :green_heart: |  unit  |   4m 58s |  hbase-thrift in the patch passed.  |
   |  |   | 172m 24s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.11 Server=19.03.11 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/3/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1943 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 61f23a956928 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 8f1353b447 |
   | Default Java | 1.8.0_232 |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/3/testReport/ |
   | Max. process+thread count | 4686 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-balancer hbase-server hbase-thrift U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/3/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #1943: HBASE-24609 Move MetaTableAccessor out of hbase-client

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #1943:
URL: https://github.com/apache/hbase/pull/1943#issuecomment-647169003


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m 15s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  3s |  Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck  |
   ||| _ Prechecks _ |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 20s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   3m 58s |  master passed  |
   | +1 :green_heart: |  compile  |   2m  8s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   6m  1s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   1m 45s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 14s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 47s |  the patch passed  |
   | +1 :green_heart: |  compile  |   2m  8s |  the patch passed  |
   | +1 :green_heart: |  javac  |   2m  8s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   5m 58s |  patch has no errors when building our shaded downstream artifacts.  |
   | -0 :warning: |  javadoc  |   0m 22s |  hbase-client generated 3 new + 2 unchanged - 0 fixed = 5 total (was 2)  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   1m 15s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 20s |  hbase-balancer in the patch passed.  |
   | +1 :green_heart: |  unit  | 204m 44s |  hbase-server in the patch passed.  |
   | +1 :green_heart: |  unit  |   5m 13s |  hbase-thrift in the patch passed.  |
   |  |   | 243m 21s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.9 Server=19.03.9 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1943 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 94908116d114 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 73ab216414 |
   | Default Java | 1.8.0_232 |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/1/artifact/yetus-jdk8-hadoop3-check/output/diff-javadoc-javadoc-hbase-client.txt |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/1/testReport/ |
   | Max. process+thread count | 2916 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-balancer hbase-server hbase-thrift U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/1/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #1943: HBASE-24609 Move MetaTableAccessor out of hbase-client

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #1943:
URL: https://github.com/apache/hbase/pull/1943#issuecomment-647324396


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 38s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  Patch does not have any anti-patterns.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 13s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   3m 37s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   2m 28s |  master passed  |
   | +1 :green_heart: |  spotbugs  |   4m 45s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 13s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 26s |  the patch passed  |
   | +1 :green_heart: |  checkstyle  |   0m 27s |  hbase-client: The patch generated 0 new + 8 unchanged - 57 fixed = 8 total (was 65)  |
   | +1 :green_heart: |  checkstyle  |   0m 14s |  The patch passed checkstyle in hbase-balancer  |
   | +1 :green_heart: |  checkstyle  |   1m 13s |  hbase-server: The patch generated 0 new + 326 unchanged - 7 fixed = 326 total (was 333)  |
   | +1 :green_heart: |  checkstyle  |   0m 42s |  The patch passed checkstyle in hbase-thrift  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  hadoopcheck  |  11m  9s |  Patch does not cause any errors with Hadoop 3.1.2 3.2.1.  |
   | +1 :green_heart: |  spotbugs  |   5m 24s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 49s |  The patch does not generate ASF License warnings.  |
   |  |   |  43m 45s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.11 Server=19.03.11 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/3/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1943 |
   | Optional Tests | dupname asflicense spotbugs hadoopcheck hbaseanti checkstyle |
   | uname | Linux 4a5cb9e35d73 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 8f1353b447 |
   | Max. process+thread count | 94 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-balancer hbase-server hbase-thrift U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1943/3/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) spotbugs=3.1.12 |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] saintstack commented on a change in pull request #1943: HBASE-24609 Move MetaTableAccessor out of hbase-client

Posted by GitBox <gi...@apache.org>.
saintstack commented on a change in pull request #1943:
URL: https://github.com/apache/hbase/pull/1943#discussion_r504301057



##########
File path: hbase-balancer/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
##########
@@ -2176,13 +1606,9 @@ private static void debugLogMutation(Mutation p) throws IOException {
   }
 
   private static Put addSequenceNum(Put p, long openSeqNum, int replicaId) throws IOException {
-    return p.add(CellBuilderFactory.create(CellBuilderType.SHALLOW_COPY)
-              .setRow(p.getRow())
-              .setFamily(HConstants.CATALOG_FAMILY)
-              .setQualifier(getSeqNumColumn(replicaId))
-              .setTimestamp(p.getTimestamp())
-              .setType(Type.Put)
-              .setValue(Bytes.toBytes(openSeqNum))
-              .build());
+    return p.add(CellBuilderFactory.create(CellBuilderType.SHALLOW_COPY).setRow(p.getRow())
+      .setFamily(HConstants.CATALOG_FAMILY)
+      .setQualifier(CatalogFamilyFormat.getSeqNumColumn(replicaId)).setTimestamp(p.getTimestamp())
+      .setType(Type.Put).setValue(Bytes.toBytes(openSeqNum)).build());
   }
 }

Review comment:
       Trying to figure the prinicipal to apply figuring when to put something in MTA and when to put it in CMTA? Thanks.

##########
File path: hbase-balancer/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
##########
@@ -193,8 +133,8 @@
    * @param connection connection we're using
    * @param visitor Visitor invoked against each row in regions family.
    */
-  public static void fullScanRegions(Connection connection, final Visitor visitor)
-      throws IOException {
+  public static void fullScanRegions(Connection connection,

Review comment:
       Should this method be in ClientMTA altogether? Or you leave it here just to minimize code churn?

##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/CatalogFamilyFormat.java
##########
@@ -0,0 +1,349 @@
+/**
+ * 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;
+
+import edu.umd.cs.findbugs.annotations.Nullable;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.NavigableMap;
+import java.util.SortedMap;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import org.apache.hadoop.hbase.client.RegionInfo;
+import org.apache.hadoop.hbase.client.RegionInfoBuilder;
+import org.apache.hadoop.hbase.client.RegionReplicaUtil;
+import org.apache.hadoop.hbase.client.Result;
+import org.apache.hadoop.hbase.client.TableState;
+import org.apache.hadoop.hbase.exceptions.DeserializationException;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.yetus.audience.InterfaceAudience;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
+
+/**
+ * Helper class for generating/parsing
+ * {@value org.apache.hadoop.hbase.HConstants#CATALOG_FAMILY_STR} family cells in meta table.
+ * <p/>
+ * The cells in catalog family are:
+ *
+ * <pre>
+ * For each table range ('Region'), there is a single row, formatted as:
+ * &lt;tableName&gt;,&lt;startKey&gt;,&lt;regionId&gt;,&lt;encodedRegionName&gt;.
+ * This row is the serialized regionName of the default region replica.
+ * Columns are:
+ * info:regioninfo         => contains serialized HRI for the default region replica
+ * info:server             => contains hostname:port (in string form) for the server hosting
+ *                            the default regionInfo replica
+ * info:server_&lt;replicaId&gt => contains hostname:port (in string form) for the server hosting
+ *                                 the regionInfo replica with replicaId
+ * info:serverstartcode    => contains server start code (in binary long form) for the server
+ *                            hosting the default regionInfo replica
+ * info:serverstartcode_&lt;replicaId&gt => contains server start code (in binary long form) for
+ *                                          the server hosting the regionInfo replica with
+ *                                          replicaId
+ * info:seqnumDuringOpen   => contains seqNum (in binary long form) for the region at the time
+ *                            the server opened the region with default replicaId
+ * info:seqnumDuringOpen_&lt;replicaId&gt => contains seqNum (in binary long form) for the region
+ *                                           at the time the server opened the region with
+ *                                           replicaId
+ * info:splitA             => contains a serialized HRI for the first daughter region if the
+ *                            region is split
+ * info:splitB             => contains a serialized HRI for the second daughter region if the
+ *                            region is split
+ * info:merge*             => contains a serialized HRI for a merge parent region. There will be two
+ *                            or more of these columns in a row. A row that has these columns is
+ *                            undergoing a merge and is the result of the merge. Columns listed
+ *                            in marge* columns are the parents of this merged region. Example
+ *                            columns: info:merge0001, info:merge0002. You make also see 'mergeA',
+ *                            and 'mergeB'. This is old form replaced by the new format that allows
+ *                            for more than two parents to be merged at a time.
+ * </pre>
+ */
+@InterfaceAudience.Private
+public class CatalogFamilyFormat {

Review comment:
       Only for the 'info' CF?

##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/CatalogFamilyFormat.java
##########
@@ -0,0 +1,349 @@
+/**
+ * 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;
+
+import edu.umd.cs.findbugs.annotations.Nullable;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.NavigableMap;
+import java.util.SortedMap;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import org.apache.hadoop.hbase.client.RegionInfo;
+import org.apache.hadoop.hbase.client.RegionInfoBuilder;
+import org.apache.hadoop.hbase.client.RegionReplicaUtil;
+import org.apache.hadoop.hbase.client.Result;
+import org.apache.hadoop.hbase.client.TableState;
+import org.apache.hadoop.hbase.exceptions.DeserializationException;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.yetus.audience.InterfaceAudience;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
+
+/**
+ * Helper class for generating/parsing
+ * {@value org.apache.hadoop.hbase.HConstants#CATALOG_FAMILY_STR} family cells in meta table.
+ * <p/>
+ * The cells in catalog family are:
+ *
+ * <pre>
+ * For each table range ('Region'), there is a single row, formatted as:
+ * &lt;tableName&gt;,&lt;startKey&gt;,&lt;regionId&gt;,&lt;encodedRegionName&gt;.
+ * This row is the serialized regionName of the default region replica.
+ * Columns are:
+ * info:regioninfo         => contains serialized HRI for the default region replica
+ * info:server             => contains hostname:port (in string form) for the server hosting
+ *                            the default regionInfo replica
+ * info:server_&lt;replicaId&gt => contains hostname:port (in string form) for the server hosting
+ *                                 the regionInfo replica with replicaId
+ * info:serverstartcode    => contains server start code (in binary long form) for the server
+ *                            hosting the default regionInfo replica
+ * info:serverstartcode_&lt;replicaId&gt => contains server start code (in binary long form) for
+ *                                          the server hosting the regionInfo replica with
+ *                                          replicaId
+ * info:seqnumDuringOpen   => contains seqNum (in binary long form) for the region at the time
+ *                            the server opened the region with default replicaId
+ * info:seqnumDuringOpen_&lt;replicaId&gt => contains seqNum (in binary long form) for the region
+ *                                           at the time the server opened the region with
+ *                                           replicaId
+ * info:splitA             => contains a serialized HRI for the first daughter region if the
+ *                            region is split
+ * info:splitB             => contains a serialized HRI for the second daughter region if the
+ *                            region is split
+ * info:merge*             => contains a serialized HRI for a merge parent region. There will be two
+ *                            or more of these columns in a row. A row that has these columns is
+ *                            undergoing a merge and is the result of the merge. Columns listed
+ *                            in marge* columns are the parents of this merged region. Example
+ *                            columns: info:merge0001, info:merge0002. You make also see 'mergeA',
+ *                            and 'mergeB'. This is old form replaced by the new format that allows
+ *                            for more than two parents to be merged at a time.
+ * </pre>
+ */
+@InterfaceAudience.Private
+public class CatalogFamilyFormat {

Review comment:
       Looks like could be package private?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org