Skip to content

Conversation

@saintstack
Copy link
Contributor

Make it so hbase:meta can be altered. TableState for hbase:meta
is kept in Master. State is in-memory transient so if  Master
fails, hbase:meta is ENABLED again. hbase:meta schema will be
bootstrapped from the filesystem. Changes to filesystem schema
are atomic so we should be ok if Master fails mid-edit (TBD)
Undoes a bunch of guards that prevented our being able to edit
hbase:meta. At minimmum, need to add in a bunch of WARNING.

TODO: Tests, more clarity around hbase:meta table state, and undoing
references to hard-coded hbase:meta regioninfo.

M hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
 Throw illegal access exception if you try to use MetaTableAccessor
 getting state of the hbase:meta table.

M hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
 For table state, go to master rather than go to meta direct. Going
 to meta won't work for hbase;meta state. Puts load on Master.

M hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
 Change isTableDisabled/Enabled implementation to ask the Master instead.
 This will give the Master's TableStateManager's opinion rather than
 client figuring it for themselves reading meta table direct.

M hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java
 TODO: Cleanup in here. Go to master for state, not to meta.

M hbase-client/src/main/java/org/apache/hadoop/hbase/client/ZKAsyncRegistry.java
 Logging cleanup.

M hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZNodePaths.java
 Shutdown access.

M hbase-server/src/main/java/org/apache/hadoop/hbase/TableDescriptors.java
 Just cleanup.

M hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
 Add state holder for hbase:meta.
 Removed unused methods.

M hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStateStore.java
 Shut down access.

M hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DisableTableProcedure.java
 Allow hbase:meta to be disabled.

M hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/EnableTableProcedure.java
 Allow hbase:meta to be enabled.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
💙 reexec 1m 55s Docker mode activated.
_ Prechecks _
💚 dupname 0m 1s No case conflicting files found.
💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
💚 @author 0m 0s The patch does not contain any @author tags.
💚 test4tests 0m 0s The patch appears to include 11 new or modified test files.
_ master Compile Tests _
💙 mvndep 0m 37s Maven dependency ordering for branch
💚 mvninstall 5m 20s master passed
💚 compile 2m 2s master passed
💚 checkstyle 2m 45s master passed
💚 shadedjars 4m 32s branch has no errors when building our shaded downstream artifacts.
💚 javadoc 1m 41s master passed
💙 spotbugs 4m 0s Used deprecated FindBugs config; considering switching to SpotBugs.
💚 findbugs 6m 24s master passed
_ Patch Compile Tests _
💙 mvndep 0m 15s Maven dependency ordering for patch
💚 mvninstall 4m 59s the patch passed
💚 compile 2m 4s the patch passed
💚 javac 2m 4s the patch passed
💔 checkstyle 0m 33s hbase-client: The patch generated 1 new + 97 unchanged - 4 fixed = 98 total (was 101)
💔 checkstyle 1m 27s hbase-server: The patch generated 8 new + 446 unchanged - 19 fixed = 454 total (was 465)
💚 whitespace 0m 0s The patch has no whitespace issues.
💚 shadedjars 4m 33s patch has no errors when building our shaded downstream artifacts.
💚 hadoopcheck 15m 53s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
💚 javadoc 1m 46s the patch passed
💚 findbugs 7m 38s the patch passed
_ Other Tests _
💚 unit 3m 6s hbase-common in the patch passed.
💚 unit 1m 54s hbase-client in the patch passed.
💚 unit 0m 49s hbase-zookeeper in the patch passed.
💔 unit 158m 12s hbase-server in the patch failed.
💚 asflicense 2m 10s The patch does not generate ASF License warnings.
238m 59s
Reason Tests
Failed junit tests hadoop.hbase.regionserver.wal.TestLogRollingNoCluster
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-667/1/artifact/out/Dockerfile
GITHUB PR #667
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 56a2a3b9bfc7 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-667/out/precommit/personality/provided.sh
git revision master / 3250a80
Default Java 1.8.0_181
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-667/1/artifact/out/diff-checkstyle-hbase-client.txt
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-667/1/artifact/out/diff-checkstyle-hbase-server.txt
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-667/1/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-667/1/testReport/
Max. process+thread count 4694 (vs. ulimit of 10000)
modules C: hbase-common hbase-client hbase-zookeeper hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-667/1/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
💙 reexec 1m 11s Docker mode activated.
_ Prechecks _
💚 dupname 0m 0s No case conflicting files found.
💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
💚 @author 0m 0s The patch does not contain any @author tags.
💚 test4tests 0m 0s The patch appears to include 11 new or modified test files.
_ master Compile Tests _
💙 mvndep 0m 34s Maven dependency ordering for branch
💚 mvninstall 5m 54s master passed
💚 compile 2m 2s master passed
💚 checkstyle 2m 47s master passed
💚 shadedjars 4m 57s branch has no errors when building our shaded downstream artifacts.
💚 javadoc 1m 32s master passed
💙 spotbugs 4m 17s Used deprecated FindBugs config; considering switching to SpotBugs.
💚 findbugs 6m 46s master passed
_ Patch Compile Tests _
💙 mvndep 0m 14s Maven dependency ordering for patch
💚 mvninstall 5m 24s the patch passed
💚 compile 2m 6s the patch passed
💚 javac 2m 6s the patch passed
💚 checkstyle 0m 27s The patch passed checkstyle in hbase-common
💚 checkstyle 0m 35s hbase-client: The patch generated 0 new + 97 unchanged - 4 fixed = 97 total (was 101)
💚 checkstyle 0m 12s The patch passed checkstyle in hbase-zookeeper
💚 checkstyle 1m 35s hbase-server: The patch generated 0 new + 444 unchanged - 21 fixed = 444 total (was 465)
💚 whitespace 0m 0s The patch has no whitespace issues.
💚 shadedjars 5m 1s patch has no errors when building our shaded downstream artifacts.
💚 hadoopcheck 17m 14s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
💚 javadoc 1m 30s the patch passed
💚 findbugs 7m 25s the patch passed
_ Other Tests _
💚 unit 2m 55s hbase-common in the patch passed.
💚 unit 1m 44s hbase-client in the patch passed.
💚 unit 0m 48s hbase-zookeeper in the patch passed.
💔 unit 236m 29s hbase-server in the patch failed.
💚 asflicense 1m 36s The patch does not generate ASF License warnings.
318m 39s
Subsystem Report/Notes
Docker Client=19.03.2 Server=19.03.2 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-667/2/artifact/out/Dockerfile
GITHUB PR #667
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux d091e4973aad 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-667/out/precommit/personality/provided.sh
git revision master / b45c0d0
Default Java 1.8.0_181
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-667/2/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-667/2/testReport/
Max. process+thread count 4824 (vs. ulimit of 10000)
modules C: hbase-common hbase-client hbase-zookeeper hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-667/2/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.0 https://yetus.apache.org

This message was automatically generated.

    Make it so hbase:meta can be altered. TableState for hbase:meta
    is kept in Master. State is in-memory transient so if  Master
    fails, hbase:meta is ENABLED again. hbase:meta schema will be
    bootstrapped from the filesystem. Changes to filesystem schema
    are atomic so we should be ok if Master fails mid-edit (TBD)
    Undoes a bunch of guards that prevented our being able to edit
    hbase:meta. At minimmum, need to add in a bunch of WARNING.

    TODO: Tests, more clarity around hbase:meta table state, and undoing
    references to hard-coded hbase:meta regioninfo.

    M hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
     Throw illegal access exception if you try to use MetaTableAccessor
     getting state of the hbase:meta table.

    M hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
     For table state, go to master rather than go to meta direct. Going
     to meta won't work for hbase;meta state. Puts load on Master.

    M hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
     Change isTableDisabled/Enabled implementation to ask the Master instead.
     This will give the Master's TableStateManager's opinion rather than
     client figuring it for themselves reading meta table direct.

    M hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java
     TODO: Cleanup in here. Go to master for state, not to meta.

    M hbase-client/src/main/java/org/apache/hadoop/hbase/client/ZKAsyncRegistry.java
     Logging cleanup.

    M hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZNodePaths.java
     Shutdown access.

    M hbase-server/src/main/java/org/apache/hadoop/hbase/TableDescriptors.java
     Just cleanup.

    M hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
     Add state holder for hbase:meta.
     Removed unused methods.

    M hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStateStore.java
     Shut down access.

    M hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DisableTableProcedure.java
     Allow hbase:meta to be disabled.

    M hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/EnableTableProcedure.java
     Allow hbase:meta to be enabled.
@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
💙 reexec 0m 32s Docker mode activated.
_ Prechecks _
💚 dupname 0m 0s No case conflicting files found.
💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
💚 @author 0m 0s The patch does not contain any @author tags.
💚 test4tests 0m 0s The patch appears to include 11 new or modified test files.
_ master Compile Tests _
💙 mvndep 0m 34s Maven dependency ordering for branch
💚 mvninstall 5m 48s master passed
💚 compile 2m 2s master passed
💚 checkstyle 2m 49s master passed
💚 shadedjars 5m 0s branch has no errors when building our shaded downstream artifacts.
💚 javadoc 1m 31s master passed
💙 spotbugs 4m 22s Used deprecated FindBugs config; considering switching to SpotBugs.
💚 findbugs 6m 51s master passed
_ Patch Compile Tests _
💙 mvndep 0m 14s Maven dependency ordering for patch
💚 mvninstall 5m 21s the patch passed
💚 compile 1m 59s the patch passed
💚 javac 1m 59s the patch passed
💚 checkstyle 0m 27s The patch passed checkstyle in hbase-common
💚 checkstyle 0m 35s hbase-client: The patch generated 0 new + 97 unchanged - 4 fixed = 97 total (was 101)
💚 checkstyle 0m 13s The patch passed checkstyle in hbase-zookeeper
💚 checkstyle 1m 32s hbase-server: The patch generated 0 new + 444 unchanged - 21 fixed = 444 total (was 465)
💚 whitespace 0m 0s The patch has no whitespace issues.
💚 shadedjars 4m 58s patch has no errors when building our shaded downstream artifacts.
💚 hadoopcheck 17m 13s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
💚 javadoc 1m 30s the patch passed
💚 findbugs 7m 23s the patch passed
_ Other Tests _
💚 unit 2m 54s hbase-common in the patch passed.
💚 unit 1m 55s hbase-client in the patch passed.
💚 unit 0m 50s hbase-zookeeper in the patch passed.
💔 unit 160m 43s hbase-server in the patch failed.
💚 asflicense 1m 35s The patch does not generate ASF License warnings.
242m 2s
Reason Tests
Failed junit tests hadoop.hbase.master.TestMasterShutdown
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-667/3/artifact/out/Dockerfile
GITHUB PR #667
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 27b5fe79d602 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-667/out/precommit/personality/provided.sh
git revision master / 8363681
Default Java 1.8.0_181
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-667/3/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-667/3/testReport/
Max. process+thread count 4393 (vs. ulimit of 10000)
modules C: hbase-common hbase-client hbase-zookeeper hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-667/3/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
💙 reexec 0m 31s Docker mode activated.
_ Prechecks _
💚 dupname 0m 1s No case conflicting files found.
💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
💚 @author 0m 0s The patch does not contain any @author tags.
💚 test4tests 0m 0s The patch appears to include 11 new or modified test files.
_ master Compile Tests _
💙 mvndep 0m 35s Maven dependency ordering for branch
💚 mvninstall 5m 34s master passed
💚 compile 1m 59s master passed
💚 checkstyle 2m 48s master passed
💚 shadedjars 4m 57s branch has no errors when building our shaded downstream artifacts.
💚 javadoc 1m 31s master passed
💙 spotbugs 4m 29s Used deprecated FindBugs config; considering switching to SpotBugs.
💚 findbugs 6m 52s master passed
_ Patch Compile Tests _
💙 mvndep 0m 14s Maven dependency ordering for patch
💚 mvninstall 5m 23s the patch passed
💚 compile 2m 2s the patch passed
💚 javac 2m 2s the patch passed
💚 checkstyle 0m 27s The patch passed checkstyle in hbase-common
💚 checkstyle 0m 33s hbase-client: The patch generated 0 new + 97 unchanged - 4 fixed = 97 total (was 101)
💚 checkstyle 0m 13s The patch passed checkstyle in hbase-zookeeper
💚 checkstyle 1m 35s hbase-server: The patch generated 0 new + 444 unchanged - 21 fixed = 444 total (was 465)
💚 whitespace 0m 0s The patch has no whitespace issues.
💚 shadedjars 4m 58s patch has no errors when building our shaded downstream artifacts.
💚 hadoopcheck 17m 1s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
💚 javadoc 1m 30s the patch passed
💚 findbugs 7m 22s the patch passed
_ Other Tests _
💚 unit 2m 54s hbase-common in the patch passed.
💚 unit 1m 47s hbase-client in the patch passed.
💚 unit 0m 47s hbase-zookeeper in the patch passed.
💚 unit 156m 53s hbase-server in the patch passed.
💚 asflicense 1m 34s The patch does not generate ASF License warnings.
237m 32s
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-667/4/artifact/out/Dockerfile
GITHUB PR #667
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 32969c8dc284 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-667/out/precommit/personality/provided.sh
git revision master / 8363681
Default Java 1.8.0_181
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-667/4/testReport/
Max. process+thread count 4365 (vs. ulimit of 10000)
modules C: hbase-common hbase-client hbase-zookeeper hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-667/4/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.0 https://yetus.apache.org

This message was automatically generated.

@saintstack saintstack merged commit 5217618 into apache:master Sep 30, 2019
Copy link
Contributor

@Apache9 Apache9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry a bit late but this has already been committed to master and branch-2? I thought this will be on a feature branch... This is really a big change, I do not think we should commit this to branch-2...

import org.apache.hadoop.hbase.security.access.Permission;
import org.apache.hadoop.hbase.security.access.ShadedAccessControlUtil;
import org.apache.hadoop.hbase.security.access.UserPermission;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why an empty line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unintentional

throws IOException {
if (tableName.equals(TableName.META_TABLE_NAME)) {
return new TableState(tableName, TableState.State.ENABLED);
throw new IllegalAccessError("Go to the Master to find hbase:meta table state, not here");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IllegalArgumentException? An Error seems over kill.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah. This is helpful figuring all the places where we are asking MetaTableAccessor for hbase:meta state. It is an error if a client asks MTA for state of hbase:meta.

* @return Future that calls Master getTableState and compares to <code>state</code>
*/
private CompletableFuture<Boolean> isTableState(TableName tableName, TableState.State state) {
return this.<Boolean> newMasterCaller().
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really a good degisn? In the normal read/write path, sometimes we need to test whether a table is disabled. After this change, the normal read/write path will also rely on master, while in the past we only need to access meta table.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me file subtask to look at the incidence of state lookups.

I was thinking admin enable/disable are infrequent and ok if they fail because master is offline. Let me look at how often inline read/write does table state. Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* is read from the filesystem. It is changed atomically so if we die midway
* through an edit we should be good.
*/
private TableState.State metaTableState = TableState.State.ENABLED;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not store it on zk? Just like the location of meta table...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the Master dies during enable/disable, I want it to default to being online when new Master comes online. Lots of new conditions if hbase:meta is offline.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hbase:meta being offline should be temporary state.

* @param states states to check against
* @return null if succeed or table state if failed
*/
public TableState setTableStateIfInStates(TableName tableName, TableState.State newState,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. Not used.

*/
public EnableTableProcedure(MasterProcedureEnv env, TableName tableName,
ProcedurePrepareLatch syncLatch) {
ProcedurePrepareLatch syncLatch) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Format issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

throws ExecutionException, InterruptedException {
AsyncTable t = connection.getTable(TableName.META_TABLE_NAME);
List<HRegionLocation> rls =
t.getRegionLocator().getRegionLocations(HConstants.EMPTY_START_ROW, true).get();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use FutureUtils.get? It will unwrap the ExecutionException.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Done.

@@ -1,4 +1,6 @@
/**
/*
* Copyright The Apache Software Foundation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it is not javadoc.


/**
* Should be private
* @deprecated Since 2.3.0. Should be for internal use only. Used by testing.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class is IA.Private so we can remove this method at any time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: remove useless empty line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me address review in a sub-issue. I want to get a test run in to make sure nothing broke.

asfgit pushed a commit that referenced this pull request Oct 1, 2019
Revert because new feedback and requested survey of master usage
figuring table state.

This reverts commit 5217618.
asfgit pushed a commit that referenced this pull request Oct 1, 2019
Make it so hbase:meta can be altered. TableState for hbase:meta
    is kept in Master. State is in-memory transient so if  Master
    fails, hbase:meta is ENABLED again. hbase:meta schema will be
    bootstrapped from the filesystem. Changes to filesystem schema
    are atomic so we should be ok if Master fails mid-edit (TBD)
    Undoes a bunch of guards that prevented our being able to edit
    hbase:meta. At minimmum, need to add in a bunch of WARNING.

    TODO: Tests, more clarity around hbase:meta table state, and undoing
    references to hard-coded hbase:meta regioninfo.

    M hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
     Throw illegal access exception if you try to use MetaTableAccessor
     getting state of the hbase:meta table.

    M hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
     For table state, go to master rather than go to meta direct. Going
     to meta won't work for hbase;meta state. Puts load on Master.

    M hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
     Change isTableDisabled/Enabled implementation to ask the Master instead.
     This will give the Master's TableStateManager's opinion rather than
     client figuring it for themselves reading meta table direct.

    M hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java
     TODO: Cleanup in here. Go to master for state, not to meta.

    M hbase-client/src/main/java/org/apache/hadoop/hbase/client/ZKAsyncRegistry.java
     Logging cleanup.

    M hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZNodePaths.java
     Shutdown access.

    M hbase-server/src/main/java/org/apache/hadoop/hbase/TableDescriptors.java
     Just cleanup.

    M hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
     Add state holder for hbase:meta.
     Removed unused methods.

    M hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStateStore.java
     Shut down access.

    M hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DisableTableProcedure.java
     Allow hbase:meta to be disabled.

    M hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/EnableTableProcedure.java
     Allow hbase:meta to be enabled.

 Signed-off-by: Ramkrishna <ramkrishna.s.vasudevan@intel.com>
@saintstack
Copy link
Contributor Author

Reverted from master and branch-2. Made feature branch HBASE-23055. The first commit on the feature branch includes change that addresses the @Apache9 feedback above.

asfgit pushed a commit that referenced this pull request Oct 4, 2019
Make it so hbase:meta can be altered. TableState for hbase:meta
    is kept in Master. State is in-memory transient so if  Master
    fails, hbase:meta is ENABLED again. hbase:meta schema will be
    bootstrapped from the filesystem. Changes to filesystem schema
    are atomic so we should be ok if Master fails mid-edit (TBD)
    Undoes a bunch of guards that prevented our being able to edit
    hbase:meta. At minimmum, need to add in a bunch of WARNING.

    TODO: Tests, more clarity around hbase:meta table state, and undoing
    references to hard-coded hbase:meta regioninfo.

    M hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
     Throw illegal access exception if you try to use MetaTableAccessor
     getting state of the hbase:meta table.

    M hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
     For table state, go to master rather than go to meta direct. Going
     to meta won't work for hbase;meta state. Puts load on Master.

    M hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
     Change isTableDisabled/Enabled implementation to ask the Master instead.
     This will give the Master's TableStateManager's opinion rather than
     client figuring it for themselves reading meta table direct.

    M hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java
     TODO: Cleanup in here. Go to master for state, not to meta.

    M hbase-client/src/main/java/org/apache/hadoop/hbase/client/ZKAsyncRegistry.java
     Logging cleanup.

    M hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZNodePaths.java
     Shutdown access.

    M hbase-server/src/main/java/org/apache/hadoop/hbase/TableDescriptors.java
     Just cleanup.

    M hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java
     Add state holder for hbase:meta.
     Removed unused methods.

    M hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStateStore.java
     Shut down access.

    M hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DisableTableProcedure.java
     Allow hbase:meta to be disabled.

    M hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/EnableTableProcedure.java
     Allow hbase:meta to be enabled.

 Signed-off-by: Ramkrishna <ramkrishna.s.vasudevan@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants