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: fix typo issues of integration/ presto
Date Sun, 02 Apr 2017 02:47:31 GMT
Repository: incubator-carbondata
Updated Branches:
  refs/heads/presto a4307dffb -> 1797aa4ab


fix typo issues of integration/ presto


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

Branch: refs/heads/presto
Commit: e1a4a2fff8e19b70a08685ca304ce7a82184b376
Parents: a4307df
Author: chenliang613 <chenliang613@huawei.com>
Authored: Sun Apr 2 07:57:12 2017 +0530
Committer: chenliang613 <chenliang613@huawei.com>
Committed: Sun Apr 2 07:57:12 2017 +0530

----------------------------------------------------------------------
 .../presto/CarbondataColumnHandle.java          | 10 +++--
 .../carbondata/presto/CarbondataMetadata.java   |  2 +-
 .../presto/impl/CarbonLocalInputSplit.java      |  1 +
 .../presto/impl/CarbonTableConfig.java          | 11 ++---
 .../presto/impl/CarbonTableReader.java          | 45 ++++++++------------
 5 files changed, 31 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/e1a4a2ff/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataColumnHandle.java
----------------------------------------------------------------------
diff --git a/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataColumnHandle.java
b/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataColumnHandle.java
index 972a59c..cc10165 100755
--- a/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataColumnHandle.java
+++ b/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataColumnHandle.java
@@ -67,10 +67,12 @@ public class CarbondataColumnHandle implements ColumnHandle {
   public String getColumnUniqueId() {
     return columnUniqueId;
   }
-    /* ordinalPosition of a columnhandle is the -> number of the column in the entire
list of columns of this table
-        IT DOESNT DEPEND ON THE QUERY (select clm3, clm0, clm1  from tablename)
-        The columnhandle of clm3 : has ordinalposition = 3
-     */
+
+  /**
+   * ordinalPosition of a columnhandle is the -> number of the column in the entire list
of columns of this table
+   * IT DOESNT DEPEND ON THE QUERY (select clm3, clm0, clm1  from tablename)
+   * The columnhandle of clm3 : has ordinalposition = 3
+   */
 
   @JsonCreator public CarbondataColumnHandle(@JsonProperty("connectorId") String connectorId,
       @JsonProperty("columnName") String columnName, @JsonProperty("columnType") Type columnType,

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/e1a4a2ff/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataMetadata.java
----------------------------------------------------------------------
diff --git a/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataMetadata.java
b/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataMetadata.java
index 2c4e217..d2c5ab6 100755
--- a/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataMetadata.java
+++ b/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataMetadata.java
@@ -135,7 +135,7 @@ public class CarbondataMetadata implements ConnectorMetadata {
       spiCols.add(spiCol);
     }
 
-    //封装carbonTable
+    //carbondata connector's table metadata
     return new ConnectorTableMetadata(tableName, spiCols);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/e1a4a2ff/integration/presto/src/main/java/org/apache/carbondata/presto/impl/CarbonLocalInputSplit.java
----------------------------------------------------------------------
diff --git a/integration/presto/src/main/java/org/apache/carbondata/presto/impl/CarbonLocalInputSplit.java
b/integration/presto/src/main/java/org/apache/carbondata/presto/impl/CarbonLocalInputSplit.java
index 9940061..ba8d9b5 100755
--- a/integration/presto/src/main/java/org/apache/carbondata/presto/impl/CarbonLocalInputSplit.java
+++ b/integration/presto/src/main/java/org/apache/carbondata/presto/impl/CarbonLocalInputSplit.java
@@ -31,6 +31,7 @@ public class CarbonLocalInputSplit {
   private long length;
   private List<String> locations;
   private short version;
+
   /**
    * Number of BlockLets in a block
    */

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/e1a4a2ff/integration/presto/src/main/java/org/apache/carbondata/presto/impl/CarbonTableConfig.java
----------------------------------------------------------------------
diff --git a/integration/presto/src/main/java/org/apache/carbondata/presto/impl/CarbonTableConfig.java
b/integration/presto/src/main/java/org/apache/carbondata/presto/impl/CarbonTableConfig.java
index a2b0a8c..a0ef63f 100755
--- a/integration/presto/src/main/java/org/apache/carbondata/presto/impl/CarbonTableConfig.java
+++ b/integration/presto/src/main/java/org/apache/carbondata/presto/impl/CarbonTableConfig.java
@@ -22,17 +22,18 @@ import io.airlift.configuration.Config;
 import javax.validation.constraints.NotNull;
 
 public class CarbonTableConfig {
+
   //read from config
-  private String dbPtah;
+  private String dbPath;
   private String tablePath;
   private String storePath;
 
-  @NotNull public String getDbPtah() {
-    return dbPtah;
+  @NotNull public String getDbPath() {
+    return dbPath;
   }
 
-  @Config("carbondata-store") public CarbonTableConfig setDbPtah(String dbPtah) {
-    this.dbPtah = dbPtah;
+  @Config("carbondata-store") public CarbonTableConfig setDbPath(String dbPath) {
+    this.dbPath = dbPath;
     return this;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/e1a4a2ff/integration/presto/src/main/java/org/apache/carbondata/presto/impl/CarbonTableReader.java
----------------------------------------------------------------------
diff --git a/integration/presto/src/main/java/org/apache/carbondata/presto/impl/CarbonTableReader.java
b/integration/presto/src/main/java/org/apache/carbondata/presto/impl/CarbonTableReader.java
index 1d0eeed..14ecfbc 100755
--- a/integration/presto/src/main/java/org/apache/carbondata/presto/impl/CarbonTableReader.java
+++ b/integration/presto/src/main/java/org/apache/carbondata/presto/impl/CarbonTableReader.java
@@ -14,6 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.carbondata.presto.impl;
 
 import com.facebook.presto.spi.SchemaTableName;
@@ -67,46 +68,35 @@ import java.util.*;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+
 import static java.util.Objects.requireNonNull;
 
 public class CarbonTableReader {
-  //CarbonTableReader will be a facade of these utils
-  //[
-  // 1:CarbonMetadata,(logic table)
-  // 2:FileFactory, (physic table file)
-  // 3:CarbonCommonFactory, (offer some )
-  // 4:DictionaryFactory, (parse dictionary util)
-  //]
+
+  /** CarbonTableReader will be a facade of these utils
+   *
+   * 1:CarbonMetadata,(logic table)
+   * 2:FileFactory, (physic table file)
+   * 3:CarbonCommonFactory, (offer some )
+   * 4:DictionaryFactory, (parse dictionary util)
+   */
 
   private CarbonTableConfig config;
   private List<SchemaTableName> tableList;
   private CarbonFile dbStore;
   private FileFactory.FileType fileType;
 
+  //as a cache for Carbon reader
   private ConcurrentHashMap<SchemaTableName, CarbonTableCacheModel> cc;
-      //as a cache for Carbon reader
 
   @Inject public CarbonTableReader(CarbonTableConfig config) {
     this.config = requireNonNull(config, "CarbonTableConfig is null");
     this.cc = new ConcurrentHashMap<>();
   }
 
+  //for worker node to initialize carbon metastore
   public CarbonTableCacheModel getCarbonCache(SchemaTableName table) {
-    if (!cc.containsKey(table))//for worker node to initalize carbon metastore
-    {
+    if (!cc.containsKey(table)) {
       try (ThreadContextClassLoader ignored = new ThreadContextClassLoader(
           FileFactory.class.getClassLoader())) {
         if (dbStore == null) {
@@ -123,7 +113,7 @@ public class CarbonTableReader {
     }
 
     if (cc.containsKey(table)) return cc.get(table);
-    else return null;//need to reload?*/
+    else return null;
   }
 
   public List<String> getSchemaNames() {
@@ -213,11 +203,10 @@ public class CarbonTableReader {
 
   /**
    * parse carbon metadata into cc(CarbonTableReader cache)
-   **/
+   */
   public CarbonTable parseCarbonMetadata(SchemaTableName table) {
     CarbonTable result = null;
     try {
-      //这个应该放在StoreFactory
       CarbonTableCacheModel cache = cc.getOrDefault(table, new CarbonTableCacheModel());
       if (cache.isValid()) return cache.carbonTable;
 
@@ -243,14 +232,14 @@ public class CarbonTableReader {
           (org.apache.carbondata.format.TableInfo) thriftReader.read();
       thriftReader.close();
 
-      //Format Level的TableInfo, 需要转换成Code Level的TableInfo
+      //Format Level TableInfo, need transfer to Code Level TableInfo
       SchemaConverter schemaConverter = new ThriftWrapperSchemaConverterImpl();
       TableInfo wrapperTableInfo = schemaConverter
           .fromExternalToWrapperTableInfo(tableInfo, table.getSchemaName(), table.getTableName(),
               storePath);
       wrapperTableInfo.setMetaDataFilepath(
           CarbonTablePath.getFolderContainingFile(cache.carbonTablePath.getSchemaFilePath()));
-      //加载到CarbonMetadata仓库
+      //load metadata info into CarbonMetadata
       CarbonMetadata.getInstance().loadTableMetadata(wrapperTableInfo);
 
       cache.tableInfo = wrapperTableInfo;


Mime
View raw message