kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaofeng...@apache.org
Subject [09/19] incubator-kylin git commit: bulk load with Hbase configurations
Date Thu, 05 Nov 2015 01:33:32 GMT
bulk load with Hbase configurations


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

Branch: refs/heads/KYLIN-1112-2
Commit: 2189c2f124ce029b96721fffb531b4a8ce51a2dd
Parents: ed2784a
Author: shaofengshi <shaofengshi@apache.org>
Authored: Mon Nov 2 15:28:38 2015 +0800
Committer: shaofengshi <shaofengshi@apache.org>
Committed: Thu Nov 5 09:24:17 2015 +0800

----------------------------------------------------------------------
 .../apache/kylin/storage/hbase/ii/IIBulkLoadJob.java   | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/2189c2f1/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 4098797..8cf921a 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
@@ -19,18 +19,15 @@
 package org.apache.kylin.storage.hbase.ii;
 
 import org.apache.commons.cli.Options;
+import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.permission.FsPermission;
 import org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles;
 import org.apache.hadoop.util.ToolRunner;
-import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.engine.mr.common.AbstractHadoopJob;
-import org.apache.kylin.invertedindex.IIInstance;
-import org.apache.kylin.invertedindex.IIManager;
-import org.apache.kylin.invertedindex.IISegment;
 import org.apache.kylin.invertedindex.model.IIDesc;
-import org.apache.kylin.metadata.model.SegmentStatusEnum;
+import org.apache.kylin.storage.hbase.HBaseConnection;
 
 /**
  */
@@ -49,7 +46,9 @@ public class IIBulkLoadJob extends AbstractHadoopJob {
             String tableName = getOptionValue(OPTION_HTABLE_NAME).toUpperCase();
             String input = getOptionValue(OPTION_INPUT_PATH);
 
-            FileSystem fs = FileSystem.get(getConf());
+            Configuration conf = HBaseConnection.getCurrentHBaseConfiguration();
+            FileSystem fs = FileSystem.get(conf);
+
             Path columnFamilyPath = new Path(input, IIDesc.HBASE_FAMILY);
 
             // File may have already been auto-loaded (in the case of MapR DB)
@@ -58,7 +57,7 @@ public class IIBulkLoadJob extends AbstractHadoopJob {
                 fs.setPermission(columnFamilyPath, permission);
             }
 
-            return ToolRunner.run(new LoadIncrementalHFiles(getConf()), new String[] { input,
tableName });
+            return ToolRunner.run(new LoadIncrementalHFiles(conf), new String[] { input,
tableName });
 
         } catch (Exception e) {
             printUsage(options);


Mime
View raw message