From 33d0903cc8b8c6bb7c9ac68b71015f3ef43864cb Mon Sep 17 00:00:00 2001 From: kangkaisen Date: Thu, 25 May 2017 20:45:19 +0800 Subject: [PATCH] KYLIN-2647 Should get FileSystem from HBaseConfiguration in HBaseResourceStore --- .../java/org/apache/kylin/storage/hbase/HBaseResourceStore.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseResourceStore.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseResourceStore.java index a2e02293c..25db27dae 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseResourceStore.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseResourceStore.java @@ -56,7 +56,6 @@ import org.apache.kylin.common.persistence.ResourceStore; import org.apache.kylin.common.persistence.StringEntity; import org.apache.kylin.common.util.Bytes; import org.apache.kylin.common.util.BytesUtil; -import org.apache.kylin.common.util.HadoopUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -243,7 +242,7 @@ public class HBaseResourceStore extends ResourceStore { byte[] value = r.getValue(B_FAMILY, B_COLUMN); if (value.length == 0) { Path redirectPath = bigCellHDFSPath(resPath); - FileSystem fileSystem = HadoopUtil.getWorkingFileSystem(); + FileSystem fileSystem = FileSystem.get(HBaseConnection.getCurrentHBaseConfiguration()); return fileSystem.open(redirectPath); } else { @@ -329,7 +328,7 @@ public class HBaseResourceStore extends ResourceStore { if (hdfsResourceExist) { // remove hdfs cell value Path redirectPath = bigCellHDFSPath(resPath); - FileSystem fileSystem = HadoopUtil.getWorkingFileSystem(); + FileSystem fileSystem = FileSystem.get(HBaseConnection.getCurrentHBaseConfiguration()); if (fileSystem.exists(redirectPath)) { fileSystem.delete(redirectPath, true); @@ -376,7 +375,7 @@ public class HBaseResourceStore extends ResourceStore { private Path writeLargeCellToHdfs(String resPath, byte[] largeColumn, Table table) throws IOException { Path redirectPath = bigCellHDFSPath(resPath); - FileSystem fileSystem = HadoopUtil.getWorkingFileSystem(); + FileSystem fileSystem = FileSystem.get(HBaseConnection.getCurrentHBaseConfiguration()); if (fileSystem.exists(redirectPath)) { fileSystem.delete(redirectPath, true); -- 2.11.0 (Apple Git-81)