kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lid...@apache.org
Subject [40/50] [abbrv] kylin git commit: KYLIN-1560 add ‘index_path’ on CubeSegment
Date Fri, 22 Apr 2016 04:12:09 GMT
KYLIN-1560 add ‘index_path’ on CubeSegment

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

Branch: refs/heads/1.5.x-HBase1.1.3
Commit: c6412c4a751afd8f2077cf277f959fcd988f5fc1
Parents: e6e29bb
Author: shaofengshi <shaofengshi@apache.org>
Authored: Thu Apr 7 13:30:17 2016 +0800
Committer: shaofengshi <shaofengshi@apache.org>
Committed: Thu Apr 7 13:30:39 2016 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/kylin/cube/CubeSegment.java | 11 +++++++++++
 .../org/apache/kylin/engine/mr/JobBuilderSupport.java    |  8 ++++++++
 2 files changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/c6412c4a/core-cube/src/main/java/org/apache/kylin/cube/CubeSegment.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/CubeSegment.java b/core-cube/src/main/java/org/apache/kylin/cube/CubeSegment.java
index 90fa292..10642c4 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/CubeSegment.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/CubeSegment.java
@@ -91,6 +91,9 @@ public class CubeSegment implements Comparable<CubeSegment>, IRealizationSegment
     @JsonProperty("snapshots")
     private ConcurrentHashMap<String, String> snapshots; // table name ==> snapshot
resource path
 
+    @JsonProperty("index_path")
+    private String indexPath;
+
     private volatile Map<Long, Short> cuboidBaseShards = Maps.newHashMap();//cuboid
id ==> base(starting) shard for this cuboid
 
     public CubeDesc getCubeDesc() {
@@ -446,4 +449,12 @@ public class CubeSegment implements Comparable<CubeSegment>, IRealizationSegment
         return new CubeJoinedFlatTableDesc(this.getCubeDesc(), this);
     }
 
+    public String getIndexPath() {
+        return indexPath;
+    }
+
+    public void setIndexPath(String indexPath) {
+        this.indexPath = indexPath;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/c6412c4a/engine-mr/src/main/java/org/apache/kylin/engine/mr/JobBuilderSupport.java
----------------------------------------------------------------------
diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/JobBuilderSupport.java b/engine-mr/src/main/java/org/apache/kylin/engine/mr/JobBuilderSupport.java
index 7463fe0..d5fceeb 100644
--- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/JobBuilderSupport.java
+++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/JobBuilderSupport.java
@@ -156,6 +156,14 @@ public class JobBuilderSupport {
         return getCuboidRootPath(seg.getLastBuildJobID());
     }
 
+    public String getSecondaryIndexPath(CubeSegment seg) {
+        return getSecondaryIndexPath(seg.getLastBuildJobID());
+    }
+
+    public String getSecondaryIndexPath(String jobId) {
+        return getRealizationRootPath(jobId) + "/secondary_index/";
+    }
+
     public void appendMapReduceParameters(StringBuilder buf, DataModelDesc modelDesc) {
         try {
             String jobConf = config.getHadoopJobConfFilePath(modelDesc.getCapacity());


Mime
View raw message