You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@carbondata.apache.org by ch...@apache.org on 2017/04/02 02:47:31 UTC
[1/2] incubator-carbondata git commit: fix typo issues of
integration/ presto
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 <ch...@huawei.com>
Authored: Sun Apr 2 07:57:12 2017 +0530
Committer: chenliang613 <ch...@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);
}
- //\u5c01\u88c5carbonTable
+ //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 {
- //\u8fd9\u4e2a\u5e94\u8be5\u653e\u5728StoreFactory
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\u7684TableInfo\uff0c \u9700\u8981\u8f6c\u6362\u6210Code Level\u7684TableInfo
+ //Format Level TableInfo\uff0c 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()));
- //\u52a0\u8f7d\u5230CarbonMetadata\u4ed3\u5e93
+ //load metadata info into CarbonMetadata
CarbonMetadata.getInstance().loadTableMetadata(wrapperTableInfo);
cache.tableInfo = wrapperTableInfo;
[2/2] incubator-carbondata git commit: Fix typo issues of
integration/ presto This closes #721
Posted by ch...@apache.org.
Fix typo issues of integration/ presto This closes #721
Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/1797aa4a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/1797aa4a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/1797aa4a
Branch: refs/heads/presto
Commit: 1797aa4ab0d30dc7c060172d981cba0109502923
Parents: a4307df e1a4a2f
Author: chenliang613 <ch...@huawei.com>
Authored: Sun Apr 2 08:16:58 2017 +0530
Committer: chenliang613 <ch...@huawei.com>
Committed: Sun Apr 2 08:16:58 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(-)
----------------------------------------------------------------------