HBASE-18106 Redo ProcedureInfo and LockInfo
commit359fed7b4b62e4dc7818a211735630cf0e10fc14
authorBalazs Meszaros <balazs.meszaros@cloudera.com>
Wed, 6 Sep 2017 13:21:32 +0000 (6 15:21 +0200)
committerMichael Stack <stack@apache.org>
Fri, 8 Sep 2017 17:24:04 +0000 (8 10:24 -0700)
tree5976fcdd803cf0782811f41574591c7b88a2397c
parent87c3ae9314e3a6ba85900cceb06ea34cf295395a
HBASE-18106 Redo ProcedureInfo and LockInfo

Main changes:
- ProcedureInfo and LockInfo were removed, we use JSON instead of them
- Procedure and LockedResource are their server side equivalent
- Procedure protobuf state_data became obsolate, it is only kept for
reading previously written WAL
- Procedure protobuf contains a state_message field, which stores the internal
state messages (Any type instead of bytes)
- Procedure.serializeStateData and deserializeStateData were changed slightly
- Procedures internal states are available on client side
- Procedures are displayed on web UI and in shell in the following jruby format:
  { ID => '1', PARENT_ID = '-1', PARAMETERS => [ ..extra state information.. ] }

Signed-off-by: Michael Stack <stack@apache.org>
96 files changed:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncHBaseAdmin.java
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ShortCircuitMasterConnection.java
hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufMessageConverter.java [new file with mode: 0644]
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java
hbase-client/src/test/java/org/apache/hadoop/hbase/shaded/protobuf/TestProtobufUtil.java [moved from hbase-server/src/test/java/org/apache/hadoop/hbase/shaded/protobuf/TestProtobufUtil.java with 75% similarity]
hbase-common/src/main/java/org/apache/hadoop/hbase/ProcedureInfo.java [deleted file]
hbase-common/src/main/java/org/apache/hadoop/hbase/procedure2/LockInfo.java [deleted file]
hbase-common/src/main/java/org/apache/hadoop/hbase/util/JRubyFormat.java [new file with mode: 0644]
hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestJRubyFormat.java [new file with mode: 0644]
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/LockType.java [copied from hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestReplicationShell.java with 54% similarity]
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/LockedResource.java [new file with mode: 0644]
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/LockedResourceType.java [copied from hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestReplicationShell.java with 54% similarity]
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/Procedure.java
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureInMemoryChore.java
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureScheduler.java
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureStateSerializer.java [copied from hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestReplicationShell.java with 56% similarity]
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureUtil.java
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/SequentialProcedure.java
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/SimpleProcedureScheduler.java
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/StateMachineProcedure.java
hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/ProcedureTestingUtility.java
hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureEvents.java
hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureRecovery.java
hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureReplayOrder.java
hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSuspended.java
hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureToString.java
hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureUtil.java
hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestYieldProcedures.java
hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/store/wal/TestWALProcedureStore.java
hbase-protocol-shaded/src/main/protobuf/LockService.proto
hbase-protocol-shaded/src/main/protobuf/Master.proto
hbase-protocol-shaded/src/main/protobuf/Procedure.proto
hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminServer.java
hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/MasterObserver.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/ExpiredMobFileCleanerChore.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterCoprocessorHost.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterMobCompactionThread.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterServices.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MobCompactionChore.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/GCMergedRegionsProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/GCRegionProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/MergeTableRegionsProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/MoveRegionProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/UnassignProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/locking/LockManager.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/locking/LockProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/AbstractStateMachineRegionProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/AddColumnFamilyProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CloneSnapshotProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CreateNamespaceProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CreateTableProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteColumnFamilyProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteNamespaceProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteTableProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DisableTableProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/EnableTableProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/MasterProcedureScheduler.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ModifyColumnFamilyProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ModifyNamespaceProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ModifyTableProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ProcedureDescriber.java [new file with mode: 0644]
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/RecoverMetaProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/RestoreSnapshotProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ServerCrashProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/TruncateTableProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.java
hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
hbase-server/src/main/resources/hbase-webapps/master/procedures.jsp
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin2.java
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcedureAdminApi.java
hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestMasterObserver.java
hbase-server/src/test/java/org/apache/hadoop/hbase/master/MockNoopMasterServices.java
hbase-server/src/test/java/org/apache/hadoop/hbase/master/locking/TestLockManager.java
hbase-server/src/test/java/org/apache/hadoop/hbase/master/locking/TestLockProcedure.java
hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestMasterProcedureScheduler.java
hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestProcedureAdmin.java
hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestProcedureDescriber.java [new file with mode: 0644]
hbase-server/src/test/java/org/apache/hadoop/hbase/protobuf/TestProtobufUtil.java
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
hbase-shell/src/main/ruby/hbase/admin.rb
hbase-shell/src/main/ruby/shell/commands/list_locks.rb
hbase-shell/src/main/ruby/shell/commands/list_procedures.rb
hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestReplicationShell.java
hbase-shell/src/test/java/org/apache/hadoop/hbase/client/procedure/ShellTestProcedure.java [new file with mode: 0644]
hbase-shell/src/test/ruby/shell/list_locks_test.rb
hbase-shell/src/test/ruby/shell/list_procedures_test.rb [new file with mode: 0644]