Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5e84291
HBASE-22537 Split happened Replica region can not be deleted after de…
sreenivasulureddy Jun 14, 2019
cad5ec3
HBASE-22537 Minor suggestion to SREENIVASULU's original fix proposal
wchevreuil Jun 14, 2019
41da963
moved test to TestSplitOrMergeStatus, removed unused variables and co…
wchevreuil Jul 2, 2019
e8893c8
cleaning out imports changes introduced on this PR.
wchevreuil Jul 2, 2019
8bc7636
HBASE-22537 Split happened Replica region can not be deleted after de…
sreenivasulureddy Jun 14, 2019
b61ac0d
Merge branch 'HBASE-22537' of github.com:wchevreuil/hbase into HBASE-…
wchevreuil Jul 3, 2019
2273ace
reverting line break change on SplitTableRegionProcedure. Checkstyle …
wchevreuil Jul 3, 2019
5b7c87a
HBASE-22593 Added Jenv file to gitignore (#314)
HorizonNet Jun 17, 2019
0de4c4c
HBASE-22581 user with "CREATE" permission can grant, but not revoke p…
stoty Jun 14, 2019
a883f1d
HBASE-22344 Documented the deprecation of public and limited private …
HorizonNet Jun 17, 2019
be06209
HBASE-22561 modify HFilePrettyPrinter to accept non-rootdir directories
dbist Jun 18, 2019
1dc0a2b
HBASE-22596 [Chore] Separate the execution period between CompactionC…
Reidddddd Jun 18, 2019
85eb24a
HBASE-22605 Ref guide includes dev guidance only applicable to EOM ve…
liuml07 Jun 19, 2019
474cbc2
HBASE-22520 Avoid possible NPE while performing seekBefore in Hal… (#…
virajjasani Jun 6, 2019
96e3b3f
HBASE-22615 Make TestChoreService more robust to timing
busbey Jun 22, 2019
298f135
HBASE-22616 responseTooXXX logging for Multi should characterize the …
apurtell Jun 25, 2019
cef3727
HBASE-22617 Recovered WAL directories not getting cleaned up (#330)
Apache9 Jun 25, 2019
f9da07f
HBASE-22632 SplitTableRegionProcedure and MergeTableRegionsProcedure …
Apache9 Jun 27, 2019
0c0b3a1
HBASE-22595 Changed suppressions to full qualified class name
HorizonNet Jun 28, 2019
402e664
HBASE-22633 remove redundant substring call with append for ZKReplica…
virajjasani Jun 28, 2019
f56bd6c
HBASE-20368 Fix RIT stuck when a rsgroup has no online servers but AM…
sunhelly Apr 11, 2018
988c681
HBASE-22169 Open region failed cause memory leak
luffygod Jul 1, 2019
faf229b
HBASE-22477 Throwing exception when meta region is not in OPEN state …
Apache9 Jun 8, 2019
f5a4cd0
HBASE-21751 WAL creation fails during region open may cause region as…
luffygod Jul 2, 2019
fb02877
HBASE-22637 fix flaky test in TestMetaTableMetrics
symat Jul 2, 2019
765fe9e
HBASE-13798 TestFromClientSide* don't close the Table
anmolnar Jul 2, 2019
a001e00
HBASE-22652 Flakey TestLockManager; test timed out after 780 seconds
saintstack Jul 3, 2019
4109c13
HBASE-22604 fix the link in the docs to "Understanding HBase and BigT…
murtazahassan123 Jul 3, 2019
1b26f7e
Merge branch 'branch-2.1' into HBASE-22537
wchevreuil Jul 3, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ public void add(InlineChore chore) {
}

public void add(Procedure<TEnvironment> procedure) {
// On the assert, we expect WAITING_TIMEOUT but timing could make it so lock gets released by
// time we get here and in those cases the state could be back to RUNNABLE. Let it
assert procedure.getState() == ProcedureState.WAITING_TIMEOUT ||
procedure.getState() == ProcedureState.RUNNABLE;
LOG.info("ADDED {}; timeout={}, timestamp={}", procedure, procedure.getTimeout(),
procedure.getTimeoutTimestamp());
queue.add(new DelayedProcedure<>(procedure));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ protected void finishTransition(final MasterProcedureEnv env, final RegionStateN
} else {
// Remove from in-memory states
am.getRegionStates().deleteRegion(regionInfo);
am.getRegionStates().removeRegionFromServer(regionNode.getRegionLocation(), regionNode);
env.getMasterServices().getServerManager().removeRegion(regionInfo);
FavoredNodesManager fnm = env.getMasterServices().getFavoredNodesManager();
if (fnm != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,15 @@
import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.HBaseTestingUtility;
import org.apache.hadoop.hbase.HRegionInfo;
import org.apache.hadoop.hbase.ServerName;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.master.assignment.AssignmentTestingUtil;
import org.apache.hadoop.hbase.master.assignment.SplitTableRegionProcedure;
import org.apache.hadoop.hbase.master.procedure.DeleteTableProcedure;
import org.apache.hadoop.hbase.master.procedure.DisableTableProcedure;
import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv;
import org.apache.hadoop.hbase.procedure2.ProcedureExecutor;
import org.apache.hadoop.hbase.procedure2.ProcedureTestingUtility;
import org.apache.hadoop.hbase.testclassification.ClientTests;
import org.apache.hadoop.hbase.testclassification.MediumTests;
import org.apache.hadoop.hbase.util.Bytes;
Expand Down Expand Up @@ -162,6 +170,64 @@ public void testMultiSwitches() throws IOException {
admin.close();
}

@Test
public void testSplitRegionReplicaRitRecovery() throws Exception {
int startRowNum = 11;
int rowCount = 60;
final TableName tableName = TableName.valueOf(name.getMethodName());
final ProcedureExecutor<MasterProcedureEnv> procExec = getMasterProcedureExecutor();
TEST_UTIL.getAdmin().createTable(
TableDescriptorBuilder.newBuilder(tableName)
.setColumnFamily(ColumnFamilyDescriptorBuilder.of(FAMILY)).setRegionReplication(2)
.build());
TEST_UTIL.waitUntilAllRegionsAssigned(tableName);
ServerName serverName =
RegionReplicaTestHelper.getRSCarryingReplica(TEST_UTIL, tableName, 1).get();
List<RegionInfo> regions = TEST_UTIL.getAdmin().getRegions(tableName);
insertData(tableName, startRowNum, rowCount);
int splitRowNum = startRowNum + rowCount / 2;
byte[] splitKey = Bytes.toBytes("" + splitRowNum);
// Split region of the table
long procId =
procExec.submitProcedure(new SplitTableRegionProcedure(procExec.getEnvironment(), regions
.get(0), splitKey));
// Wait the completion
ProcedureTestingUtility.waitProcedure(procExec, procId);
// Disable the table
long procId1 =
procExec.submitProcedure(new DisableTableProcedure(procExec.getEnvironment(), tableName,
false));
// Wait the completion
ProcedureTestingUtility.waitProcedure(procExec, procId1);
//Delete Table
long procId2 =
procExec.submitProcedure(new DeleteTableProcedure(procExec.getEnvironment(), tableName));
// Wait the completion
ProcedureTestingUtility.waitProcedure(procExec, procId2);
AssignmentTestingUtil.killRs(TEST_UTIL, serverName);
Threads.sleepWithoutInterrupt(5000);
boolean hasRegionsInTransition =
TEST_UTIL.getMiniHBaseCluster().getMaster().getAssignmentManager().getRegionStates()
.hasRegionsInTransition();
assertEquals(false, hasRegionsInTransition);

}

private ProcedureExecutor<MasterProcedureEnv> getMasterProcedureExecutor() {
return TEST_UTIL.getHBaseCluster().getMaster().getMasterProcedureExecutor();
}

private void insertData(final TableName tableName, int startRow, int rowCount)
throws IOException {
Table t = TEST_UTIL.getConnection().getTable(tableName);
Put p;
for (int i= 0; i < rowCount; i++) {
p = new Put(Bytes.toBytes("" + (startRow + i)));
p.addColumn(FAMILY, Bytes.toBytes("q1"), Bytes.toBytes(i));
t.put(p);
}
}

private void initSwitchStatus(Admin admin) throws IOException {
if (!admin.isSplitOrMergeEnabled(MasterSwitchType.SPLIT)) {
admin.setSplitOrMergeEnabled(true, false, MasterSwitchType.SPLIT);
Expand Down