You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bu...@apache.org on 2016/09/29 06:57:24 UTC
[39/50] [abbrv] hbase git commit: HBASE-14439 Moved from
MasterFileSystem to MasterStorage abstract class for storage abstraction
layer.
http://git-wip-us.apache.org/repos/asf/hbase/blob/ab9e1512/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java
index e332c94..dc6e36b 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java
@@ -271,7 +271,7 @@ public class TestExportSnapshot {
conf.setInt("mapreduce.map.maxattempts", 3);
}
// Export Snapshot
- Path sourceDir = TEST_UTIL.getHBaseCluster().getMaster().getMasterFileSystem().getRootDir();
+ Path sourceDir = TEST_UTIL.getHBaseCluster().getMaster().getMasterStorage().getRootDir();
int res = ExportSnapshot.innerMain(conf, new String[] {
"-snapshot", Bytes.toString(snapshotName),
"-copy-from", sourceDir.toString(),
@@ -355,7 +355,7 @@ public class TestExportSnapshot {
}
private Path getHdfsDestinationDir() {
- Path rootDir = TEST_UTIL.getHBaseCluster().getMaster().getMasterFileSystem().getRootDir();
+ Path rootDir = TEST_UTIL.getHBaseCluster().getMaster().getMasterStorage().getRootDir();
Path path = new Path(new Path(rootDir, "export-test"), "export-" + System.currentTimeMillis());
LOG.info("HDFS export destination path: " + path);
return path;
http://git-wip-us.apache.org/repos/asf/hbase/blob/ab9e1512/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java
index a852547..d51b62a 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java
@@ -145,7 +145,7 @@ public class TestFlushSnapshotFromClient {
SnapshotTestingUtils.loadData(UTIL, TABLE_NAME, DEFAULT_NUM_ROWS, TEST_FAM);
LOG.debug("FS state before snapshot:");
- UTIL.getHBaseCluster().getMaster().getMasterFileSystem().logFileSystemState(LOG);
+ UTIL.getHBaseCluster().getMaster().getMasterStorage().logStorageState(LOG);
// take a snapshot of the enabled table
String snapshotString = "offlineTableSnapshot";
@@ -160,7 +160,7 @@ public class TestFlushSnapshotFromClient {
// make sure its a valid snapshot
LOG.debug("FS state after snapshot:");
- UTIL.getHBaseCluster().getMaster().getMasterFileSystem().logFileSystemState(LOG);
+ UTIL.getHBaseCluster().getMaster().getMasterStorage().logStorageState(LOG);
SnapshotTestingUtils.confirmSnapshotValid(UTIL,
ProtobufUtil.createHBaseProtosSnapshotDesc(snapshots.get(0)), TABLE_NAME, TEST_FAM);
@@ -181,7 +181,7 @@ public class TestFlushSnapshotFromClient {
UTIL.flush(TABLE_NAME);
LOG.debug("FS state before snapshot:");
- UTIL.getHBaseCluster().getMaster().getMasterFileSystem().logFileSystemState(LOG);
+ UTIL.getHBaseCluster().getMaster().getMasterStorage().logStorageState(LOG);
// take a snapshot of the enabled table
String snapshotString = "skipFlushTableSnapshot";
@@ -196,7 +196,7 @@ public class TestFlushSnapshotFromClient {
// make sure its a valid snapshot
LOG.debug("FS state after snapshot:");
- UTIL.getHBaseCluster().getMaster().getMasterFileSystem().logFileSystemState(LOG);
+ UTIL.getHBaseCluster().getMaster().getMasterStorage().logStorageState(LOG);
SnapshotTestingUtils.confirmSnapshotValid(UTIL,
ProtobufUtil.createHBaseProtosSnapshotDesc(snapshots.get(0)), TABLE_NAME, TEST_FAM);
@@ -220,7 +220,7 @@ public class TestFlushSnapshotFromClient {
SnapshotTestingUtils.loadData(UTIL, TABLE_NAME, DEFAULT_NUM_ROWS, TEST_FAM);
LOG.debug("FS state before snapshot:");
- UTIL.getHBaseCluster().getMaster().getMasterFileSystem().logFileSystemState(LOG);
+ UTIL.getHBaseCluster().getMaster().getMasterStorage().logStorageState(LOG);
// take a snapshot of the enabled table
String snapshotString = "offlineTableSnapshot";
@@ -239,7 +239,7 @@ public class TestFlushSnapshotFromClient {
// make sure its a valid snapshot
LOG.debug("FS state after snapshot:");
- UTIL.getHBaseCluster().getMaster().getMasterFileSystem().logFileSystemState(LOG);
+ UTIL.getHBaseCluster().getMaster().getMasterStorage().logStorageState(LOG);
SnapshotTestingUtils.confirmSnapshotValid(UTIL,
ProtobufUtil.createHBaseProtosSnapshotDesc(snapshots.get(0)), TABLE_NAME, TEST_FAM);
@@ -289,7 +289,7 @@ public class TestFlushSnapshotFromClient {
HMaster master = UTIL.getMiniHBaseCluster().getMaster();
SnapshotTestingUtils.waitForSnapshotToComplete(master, snapshot, 200);
LOG.info(" === Async Snapshot Completed ===");
- UTIL.getHBaseCluster().getMaster().getMasterFileSystem().logFileSystemState(LOG);
+ UTIL.getHBaseCluster().getMaster().getMasterStorage().logStorageState(LOG);
// make sure we get the snapshot
SnapshotTestingUtils.assertOneSnapshotThatMatches(admin, snapshot);
@@ -401,8 +401,8 @@ public class TestFlushSnapshotFromClient {
SnapshotTestingUtils.loadData(UTIL, TABLE_NAME, DEFAULT_NUM_ROWS, TEST_FAM);
String snapshotName = "flushSnapshotCreateListDestroy";
- FileSystem fs = UTIL.getHBaseCluster().getMaster().getMasterFileSystem().getFileSystem();
- Path rootDir = UTIL.getHBaseCluster().getMaster().getMasterFileSystem().getRootDir();
+ FileSystem fs = UTIL.getHBaseCluster().getMaster().getMasterStorage().getFileSystem();
+ Path rootDir = UTIL.getHBaseCluster().getMaster().getMasterStorage().getRootDir();
SnapshotTestingUtils.createSnapshotAndValidate(admin, TABLE_NAME, Bytes.toString(TEST_FAM),
snapshotName, rootDir, fs, true);
}
@@ -492,7 +492,7 @@ public class TestFlushSnapshotFromClient {
}
// dump for debugging
- UTIL.getHBaseCluster().getMaster().getMasterFileSystem().logFileSystemState(LOG);
+ UTIL.getHBaseCluster().getMaster().getMasterStorage().logStorageState(LOG);
List<SnapshotDescription> taken = admin.listSnapshots();
int takenSize = taken.size();
http://git-wip-us.apache.org/repos/asf/hbase/blob/ab9e1512/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestRestoreFlushSnapshotFromClient.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestRestoreFlushSnapshotFromClient.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestRestoreFlushSnapshotFromClient.java
index bf26c69..a32c747 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestRestoreFlushSnapshotFromClient.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestRestoreFlushSnapshotFromClient.java
@@ -207,7 +207,7 @@ public class TestRestoreFlushSnapshotFromClient {
// Helpers
// ==========================================================================
private void logFSTree() throws IOException {
- UTIL.getMiniHBaseCluster().getMaster().getMasterFileSystem().logFileSystemState(LOG);
+ UTIL.getMiniHBaseCluster().getMaster().getMasterStorage().logStorageState(LOG);
}
protected void verifyRowCount(final HBaseTestingUtility util, final TableName tableName,
http://git-wip-us.apache.org/repos/asf/hbase/blob/ab9e1512/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckOneRS.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckOneRS.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckOneRS.java
index e15609a..dd7f18e 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckOneRS.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckOneRS.java
@@ -422,7 +422,7 @@ public class TestHBaseFsckOneRS extends BaseTestHBaseFsck {
htdDisabled.addFamily(new HColumnDescriptor(FAM));
// Write the .tableinfo
- cluster.getMaster().getMasterFileSystem().createTableDescriptor(
+ cluster.getMaster().getMasterStorage().createTableDescriptor(
new TableDescriptor(htdDisabled), true);
List<HRegionInfo> disabledRegions =
TEST_UTIL.createMultiRegionsInMeta(conf, htdDisabled, SPLIT_KEYS);