You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2015/11/02 07:34:03 UTC

incubator-kylin git commit: check whether path exists before set permission

Repository: incubator-kylin
Updated Branches:
  refs/heads/KYLIN-1112 0f932072a -> e28ff06c5


check whether path exists before set permission

Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/e28ff06c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/e28ff06c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/e28ff06c

Branch: refs/heads/KYLIN-1112
Commit: e28ff06c5848f45ad23925c107ac67551862c541
Parents: 0f93207
Author: shaofengshi <sh...@apache.org>
Authored: Mon Nov 2 14:33:44 2015 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Mon Nov 2 14:33:44 2015 +0800

----------------------------------------------------------------------
 .../org/apache/kylin/storage/hbase/ii/IIBulkLoadJob.java | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/e28ff06c/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/IIBulkLoadJob.java
----------------------------------------------------------------------
diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/IIBulkLoadJob.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/IIBulkLoadJob.java
index 149791b..4098797 100644
--- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/IIBulkLoadJob.java
+++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/IIBulkLoadJob.java
@@ -46,12 +46,17 @@ public class IIBulkLoadJob extends AbstractHadoopJob {
             options.addOption(OPTION_II_NAME);
             parseOptions(options, args);
 
-            String tableName = getOptionValue(OPTION_HTABLE_NAME);
+            String tableName = getOptionValue(OPTION_HTABLE_NAME).toUpperCase();
             String input = getOptionValue(OPTION_INPUT_PATH);
 
             FileSystem fs = FileSystem.get(getConf());
-            FsPermission permission = new FsPermission((short) 0777);
-            fs.setPermission(new Path(input, IIDesc.HBASE_FAMILY), permission);
+            Path columnFamilyPath = new Path(input, IIDesc.HBASE_FAMILY);
+
+            // File may have already been auto-loaded (in the case of MapR DB)
+            if (fs.exists(columnFamilyPath)) {
+                FsPermission permission = new FsPermission((short) 0777);
+                fs.setPermission(columnFamilyPath, permission);
+            }
 
             return ToolRunner.run(new LoadIncrementalHFiles(getConf()), new String[] { input, tableName });