You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by br...@apache.org on 2019/03/24 06:08:55 UTC
[hbase] branch branch-2 updated: HBASE-22093 Combine
TestRestoreSnapshotFromClientWithRegionReplicas to
CloneSnapshotFromClientAfterSplittingRegionTestBase#testCloneSnapshotAfterSplittingRegion
This is an automated email from the ASF dual-hosted git repository.
brfrn169 pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new b11ab1c HBASE-22093 Combine TestRestoreSnapshotFromClientWithRegionReplicas to CloneSnapshotFromClientAfterSplittingRegionTestBase#testCloneSnapshotAfterSplittingRegion
b11ab1c is described below
commit b11ab1c4cfe21cc3330240d9ded97b0d4c86fe66
Author: Toshihiro Suzuki <br...@gmail.com>
AuthorDate: Sat Mar 23 15:24:33 2019 +0900
HBASE-22093 Combine TestRestoreSnapshotFromClientWithRegionReplicas to CloneSnapshotFromClientAfterSplittingRegionTestBase#testCloneSnapshotAfterSplittingRegion
Signed-off-by: Duo Zhang <zh...@apache.org>
---
...shotFromClientAfterSplittingRegionTestBase.java | 2 +
...estoreSnapshotFromClientWithRegionReplicas.java | 62 ----------------------
2 files changed, 2 insertions(+), 62 deletions(-)
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/CloneSnapshotFromClientAfterSplittingRegionTestBase.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/CloneSnapshotFromClientAfterSplittingRegionTestBase.java
index d1108c0..5ed100f 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/CloneSnapshotFromClientAfterSplittingRegionTestBase.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/CloneSnapshotFromClientAfterSplittingRegionTestBase.java
@@ -57,6 +57,8 @@ public class CloneSnapshotFromClientAfterSplittingRegionTestBase
admin.cloneSnapshot(snapshotName2, clonedTableName);
SnapshotTestingUtils.waitForTableToBeOnline(TEST_UTIL, clonedTableName);
+ verifyRowCount(TEST_UTIL, clonedTableName, snapshot1Rows);
+
RegionStates regionStates =
TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager().getRegionStates();
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestRestoreSnapshotFromClientWithRegionReplicas.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestRestoreSnapshotFromClientWithRegionReplicas.java
deleted file mode 100644
index ea47e9d..0000000
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestRestoreSnapshotFromClientWithRegionReplicas.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * 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.client;
-
-import java.io.IOException;
-import java.util.List;
-
-import org.apache.hadoop.hbase.HBaseClassTestRule;
-import org.apache.hadoop.hbase.TableName;
-import org.apache.hadoop.hbase.testclassification.ClientTests;
-import org.apache.hadoop.hbase.testclassification.LargeTests;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-@Category({ LargeTests.class, ClientTests.class })
-public class TestRestoreSnapshotFromClientWithRegionReplicas
- extends RestoreSnapshotFromClientTestBase {
-
- @ClassRule
- public static final HBaseClassTestRule CLASS_RULE =
- HBaseClassTestRule.forClass(TestRestoreSnapshotFromClientWithRegionReplicas.class);
-
- @Override
- protected int getNumReplicas() {
- return 3;
- }
-
- @Test
- public void testOnlineSnapshotAfterSplittingRegions() throws IOException, InterruptedException {
- List<RegionInfo> regionInfos = admin.getRegions(tableName);
- RegionReplicaUtil.removeNonDefaultRegions(regionInfos);
-
- // Split a region
- splitRegion(regionInfos.get(0));
-
- // Take a online snapshot
- admin.snapshot(snapshotName1, tableName);
-
- // Clone the snapshot to another table
- TableName clonedTableName =
- TableName.valueOf(name.getMethodName() + "-" + System.currentTimeMillis());
- admin.cloneSnapshot(snapshotName1, clonedTableName);
-
- verifyRowCount(TEST_UTIL, clonedTableName, snapshot1Rows);
- }
-}