carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chenliang...@apache.org
Subject [1/2] incubator-carbondata git commit: CARBONDATA-355 Remove unnecessary method argument columnIdentifier of PathService.getCarbonTablePath
Date Wed, 02 Nov 2016 15:33:13 GMT
Repository: incubator-carbondata
Updated Branches:
  refs/heads/master 94ffcdd20 -> 8efab652e


CARBONDATA-355 Remove unnecessary method argument columnIdentifier of PathService.getCarbonTablePath

CARBONDATA-355 Remove unnecessary method argument columnIdentifier of PathService.getCarbonTablePath

CARBONDATA-355 Update comment of PathService#getCarbonTablePath


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

Branch: refs/heads/master
Commit: 77c90b80bd4ce889ca4a2e1205253aa0635094db
Parents: 94ffcdd
Author: hexiaoqiao <hexiaoqiao@meituan.com>
Authored: Wed Nov 2 01:05:48 2016 +0800
Committer: chenliang613 <chenliang613@apache.org>
Committed: Wed Nov 2 23:22:19 2016 +0800

----------------------------------------------------------------------
 .../java/org/apache/carbondata/common/ext/PathFactory.java     | 4 +---
 .../core/cache/dictionary/AbstractDictionaryCache.java         | 6 ++----
 .../core/reader/CarbonDictionaryMetadataReaderImpl.java        | 2 +-
 .../carbondata/core/reader/CarbonDictionaryReaderImpl.java     | 2 +-
 .../reader/sortindex/CarbonDictionarySortIndexReaderImpl.java  | 2 +-
 .../java/org/apache/carbondata/core/service/PathService.java   | 5 +----
 .../carbondata/core/writer/CarbonDictionaryWriterImpl.java     | 2 +-
 .../writer/sortindex/CarbonDictionarySortIndexWriterImpl.java  | 2 +-
 .../carbondata/spark/rdd/CarbonGlobalDictionaryRDD.scala       | 3 +--
 .../spark/util/GlobalDictionaryUtilConcurrentTestCase.scala    | 2 +-
 10 files changed, 11 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/77c90b80/core/src/main/java/org/apache/carbondata/common/ext/PathFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/common/ext/PathFactory.java b/core/src/main/java/org/apache/carbondata/common/ext/PathFactory.java
index e5ff83a..cbf5613 100644
--- a/core/src/main/java/org/apache/carbondata/common/ext/PathFactory.java
+++ b/core/src/main/java/org/apache/carbondata/common/ext/PathFactory.java
@@ -19,7 +19,6 @@
 package org.apache.carbondata.common.ext;
 
 import org.apache.carbondata.core.carbon.CarbonTableIdentifier;
-import org.apache.carbondata.core.carbon.ColumnIdentifier;
 import org.apache.carbondata.core.carbon.path.CarbonStorePath;
 import org.apache.carbondata.core.carbon.path.CarbonTablePath;
 import org.apache.carbondata.core.service.PathService;
@@ -32,12 +31,11 @@ public class PathFactory implements PathService {
   private static PathService pathService = new PathFactory();
 
   /**
-   * @param columnIdentifier
    * @param storeLocation
    * @param tableIdentifier
    * @return store path related to tables
    */
-  @Override public CarbonTablePath getCarbonTablePath(ColumnIdentifier columnIdentifier,
+  @Override public CarbonTablePath getCarbonTablePath(
       String storeLocation, CarbonTableIdentifier tableIdentifier) {
     return CarbonStorePath.getCarbonTablePath(storeLocation, tableIdentifier);
   }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/77c90b80/core/src/main/java/org/apache/carbondata/core/cache/dictionary/AbstractDictionaryCache.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/cache/dictionary/AbstractDictionaryCache.java
b/core/src/main/java/org/apache/carbondata/core/cache/dictionary/AbstractDictionaryCache.java
index 01dd269..e3e6532 100644
--- a/core/src/main/java/org/apache/carbondata/core/cache/dictionary/AbstractDictionaryCache.java
+++ b/core/src/main/java/org/apache/carbondata/core/cache/dictionary/AbstractDictionaryCache.java
@@ -94,8 +94,7 @@ public abstract class AbstractDictionaryCache<K extends DictionaryColumnUniqueId
   protected boolean isFileExistsForGivenColumn(
       DictionaryColumnUniqueIdentifier dictionaryColumnUniqueIdentifier) {
     PathService pathService = CarbonCommonFactory.getPathService();
-    CarbonTablePath carbonTablePath = pathService
-        .getCarbonTablePath(dictionaryColumnUniqueIdentifier.getColumnIdentifier(), carbonStorePath,
+    CarbonTablePath carbonTablePath = pathService.getCarbonTablePath(carbonStorePath,
             dictionaryColumnUniqueIdentifier.getCarbonTableIdentifier());
 
     String dictionaryFilePath =
@@ -157,8 +156,7 @@ public abstract class AbstractDictionaryCache<K extends DictionaryColumnUniqueId
   private CarbonFile getDictionaryMetaCarbonFile(
       DictionaryColumnUniqueIdentifier dictionaryColumnUniqueIdentifier) {
     PathService pathService = CarbonCommonFactory.getPathService();
-    CarbonTablePath carbonTablePath = pathService
-        .getCarbonTablePath(dictionaryColumnUniqueIdentifier.getColumnIdentifier(), carbonStorePath,
+    CarbonTablePath carbonTablePath = pathService.getCarbonTablePath(carbonStorePath,
             dictionaryColumnUniqueIdentifier.getCarbonTableIdentifier());
     String dictionaryFilePath =
         carbonTablePath.getDictionaryMetaFilePath(dictionaryColumnUniqueIdentifier

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/77c90b80/core/src/main/java/org/apache/carbondata/core/reader/CarbonDictionaryMetadataReaderImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/reader/CarbonDictionaryMetadataReaderImpl.java
b/core/src/main/java/org/apache/carbondata/core/reader/CarbonDictionaryMetadataReaderImpl.java
index 05c76ef..8c03100 100644
--- a/core/src/main/java/org/apache/carbondata/core/reader/CarbonDictionaryMetadataReaderImpl.java
+++ b/core/src/main/java/org/apache/carbondata/core/reader/CarbonDictionaryMetadataReaderImpl.java
@@ -157,7 +157,7 @@ public class CarbonDictionaryMetadataReaderImpl implements CarbonDictionaryMetad
   protected void initFileLocation() {
     PathService pathService = CarbonCommonFactory.getPathService();
     CarbonTablePath carbonTablePath =
-        pathService.getCarbonTablePath(columnIdentifier, this.hdfsStorePath, carbonTableIdentifier);
+        pathService.getCarbonTablePath(this.hdfsStorePath, carbonTableIdentifier);
     this.columnDictionaryMetadataFilePath =
         carbonTablePath.getDictionaryMetaFilePath(columnIdentifier.getColumnId());
   }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/77c90b80/core/src/main/java/org/apache/carbondata/core/reader/CarbonDictionaryReaderImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/reader/CarbonDictionaryReaderImpl.java
b/core/src/main/java/org/apache/carbondata/core/reader/CarbonDictionaryReaderImpl.java
index d3f9f31..0e1bf6d 100644
--- a/core/src/main/java/org/apache/carbondata/core/reader/CarbonDictionaryReaderImpl.java
+++ b/core/src/main/java/org/apache/carbondata/core/reader/CarbonDictionaryReaderImpl.java
@@ -222,7 +222,7 @@ public class CarbonDictionaryReaderImpl implements CarbonDictionaryReader
{
    */
   protected void initFileLocation() {
     PathService pathService = CarbonCommonFactory.getPathService();
-    CarbonTablePath carbonTablePath = pathService.getCarbonTablePath(columnIdentifier,
+    CarbonTablePath carbonTablePath = pathService.getCarbonTablePath(
                 this.hdfsStorePath, carbonTableIdentifier);
     this.columnDictionaryFilePath = carbonTablePath
         .getDictionaryFilePath(columnIdentifier.getColumnId());

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/77c90b80/core/src/main/java/org/apache/carbondata/core/reader/sortindex/CarbonDictionarySortIndexReaderImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/reader/sortindex/CarbonDictionarySortIndexReaderImpl.java
b/core/src/main/java/org/apache/carbondata/core/reader/sortindex/CarbonDictionarySortIndexReaderImpl.java
index 70628b3..c573f91 100644
--- a/core/src/main/java/org/apache/carbondata/core/reader/sortindex/CarbonDictionarySortIndexReaderImpl.java
+++ b/core/src/main/java/org/apache/carbondata/core/reader/sortindex/CarbonDictionarySortIndexReaderImpl.java
@@ -154,7 +154,7 @@ public class CarbonDictionarySortIndexReaderImpl implements CarbonDictionarySort
   protected void initPath() {
     PathService pathService = CarbonCommonFactory.getPathService();
     CarbonTablePath carbonTablePath =
-        pathService.getCarbonTablePath(columnIdentifier, carbonStorePath, carbonTableIdentifier);
+        pathService.getCarbonTablePath(carbonStorePath, carbonTableIdentifier);
     try {
       CarbonDictionaryColumnMetaChunk chunkMetaObjectForLastSegmentEntry =
           getChunkMetaObjectForLastSegmentEntry();

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/77c90b80/core/src/main/java/org/apache/carbondata/core/service/PathService.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/service/PathService.java b/core/src/main/java/org/apache/carbondata/core/service/PathService.java
index d3295f5..0a27dd4 100644
--- a/core/src/main/java/org/apache/carbondata/core/service/PathService.java
+++ b/core/src/main/java/org/apache/carbondata/core/service/PathService.java
@@ -19,7 +19,6 @@
 package org.apache.carbondata.core.service;
 
 import org.apache.carbondata.core.carbon.CarbonTableIdentifier;
-import org.apache.carbondata.core.carbon.ColumnIdentifier;
 import org.apache.carbondata.core.carbon.path.CarbonTablePath;
 
 /**
@@ -28,11 +27,9 @@ import org.apache.carbondata.core.carbon.path.CarbonTablePath;
 public interface PathService {
 
   /**
-   * @param columnIdentifier
    * @param storeLocation
    * @param tableIdentifier
    * @return store path related to tables
    */
-  CarbonTablePath getCarbonTablePath(ColumnIdentifier columnIdentifier, String storeLocation,
-      CarbonTableIdentifier tableIdentifier);
+  CarbonTablePath getCarbonTablePath(String storeLocation, CarbonTableIdentifier tableIdentifier);
 }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/77c90b80/core/src/main/java/org/apache/carbondata/core/writer/CarbonDictionaryWriterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/writer/CarbonDictionaryWriterImpl.java
b/core/src/main/java/org/apache/carbondata/core/writer/CarbonDictionaryWriterImpl.java
index fab8db4..31f022d 100644
--- a/core/src/main/java/org/apache/carbondata/core/writer/CarbonDictionaryWriterImpl.java
+++ b/core/src/main/java/org/apache/carbondata/core/writer/CarbonDictionaryWriterImpl.java
@@ -252,7 +252,7 @@ public class CarbonDictionaryWriterImpl implements CarbonDictionaryWriter
{
 
   protected void initPaths() {
     PathService pathService = CarbonCommonFactory.getPathService();
-    CarbonTablePath carbonTablePath = pathService.getCarbonTablePath(columnIdentifier,
+    CarbonTablePath carbonTablePath = pathService.getCarbonTablePath(
             this.hdfsStorePath, carbonTableIdentifier);
     this.dictionaryFilePath = carbonTablePath.getDictionaryFilePath(columnIdentifier.getColumnId());
     this.dictionaryMetaFilePath =

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/77c90b80/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImpl.java
b/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImpl.java
index b6df97d..7072edd 100644
--- a/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImpl.java
+++ b/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImpl.java
@@ -153,7 +153,7 @@ public class CarbonDictionarySortIndexWriterImpl implements CarbonDictionarySort
   protected void initPath() {
     PathService pathService = CarbonCommonFactory.getPathService();
     CarbonTablePath carbonTablePath = pathService
-        .getCarbonTablePath(columnIdentifier, carbonStorePath, carbonTableIdentifier);
+        .getCarbonTablePath(carbonStorePath, carbonTableIdentifier);
     String dictionaryPath = carbonTablePath.getDictionaryFilePath(columnIdentifier.getColumnId());
     long dictOffset = CarbonUtil.getFileSize(dictionaryPath);
     this.sortIndexFilePath =

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/77c90b80/integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonGlobalDictionaryRDD.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonGlobalDictionaryRDD.scala
b/integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonGlobalDictionaryRDD.scala
index 4c0c79b..8b4b74a 100644
--- a/integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonGlobalDictionaryRDD.scala
+++ b/integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonGlobalDictionaryRDD.scala
@@ -296,8 +296,7 @@ class CarbonGlobalDictionaryGenerateRDD(
       var dictionaryForSortIndexWriting: org.apache.carbondata.core.cache.dictionary.Dictionary
= _
       var dictionaryForDistinctValueLookUpCleared: Boolean = false
       val pathService = CarbonCommonFactory.getPathService
-      val carbonTablePath = pathService.getCarbonTablePath(model.columnIdentifier(split.index),
-          model.hdfsLocation, model.table)
+      val carbonTablePath = pathService.getCarbonTablePath(model.hdfsLocation, model.table)
       if (StringUtils.isNotBlank(model.hdfsTempLocation )) {
          CarbonProperties.getInstance.addProperty(CarbonCommonConstants.HDFS_TEMP_LOCATION,
            model.hdfsTempLocation)

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/77c90b80/integration/spark/src/test/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtilConcurrentTestCase.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/test/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtilConcurrentTestCase.scala
b/integration/spark/src/test/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtilConcurrentTestCase.scala
index cd88547..179d0f6 100644
--- a/integration/spark/src/test/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtilConcurrentTestCase.scala
+++ b/integration/spark/src/test/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtilConcurrentTestCase.scala
@@ -139,7 +139,7 @@ class GlobalDictionaryUtilConcurrentTestCase extends QueryTest with BeforeAndAft
     val carbonTableIdentifier = sampleRelation.tableMeta.carbonTable.getCarbonTableIdentifier
     val columnIdentifier = sampleRelation.tableMeta.carbonTable.getDimensionByName("employee",
"empid").getColumnIdentifier
     val carbonTablePath = PathFactory.getInstance()
-        .getCarbonTablePath(columnIdentifier, sampleRelation.tableMeta.storePath, carbonTableIdentifier);
+        .getCarbonTablePath(sampleRelation.tableMeta.storePath, carbonTableIdentifier);
     val dictPath = carbonTablePath.getDictionaryFilePath(columnIdentifier.getColumnId)
     val dictFile = FileFactory.getCarbonFile(dictPath, FileFactory.getFileType(dictPath))
     val offSet = dictFile.getSize


Mime
View raw message