You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@carbondata.apache.org by foryou2030 <gi...@git.apache.org> on 2016/09/20 01:07:22 UTC
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] add configurable on...
GitHub user foryou2030 opened a pull request:
https://github.com/apache/incubator-carbondata/pull/176
[CARBONDATA-208] add configurable on-off for query statistics
# Why raise this pr?
Currently there are many STATISTIC log for performance tuning purpose, but it should be configurable by the user.
# How to solve it?
Add configuration to carbon.properties, "enable.query.statistics" (default value is "false")
User can enable query statistics by setting it as true.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/foryou2030/incubator-carbondata statistic_switch
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-carbondata/pull/176.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #176
----
commit a3165a6686d371f2bd256a7a8fc3fec8a55b96e0
Author: foryou2030 <fo...@126.com>
Date: 2016-09-19T12:55:52Z
add configurable on-off for query statistics
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r80411022
--- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonTimeStatisticsFactory.java ---
@@ -52,12 +56,27 @@ public static LoadStatistics getLoadStatisticsInstance() {
return LoadStatisticsInstance;
}
- private static DriverQueryStatisticsRecorder genQueryStatisticsRecorderInstance() {
- return DriverQueryStatisticsRecorder.getInstance();
+ private static QueryStatisticsRecorder genQueryStatisticsRecorderInstance() {
--- End diff --
I think the function name of this function should be similar to `createDriverRecorder`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/incubator-carbondata/pull/176
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by foryou2030 <gi...@git.apache.org>.
Github user foryou2030 commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r80198494
--- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonTimeStatisticsFactory.java ---
@@ -17,13 +17,14 @@
package org.apache.carbondata.core.util;
-import org.apache.carbondata.core.carbon.querystatistics.DriverQueryStatisticsRecorder;
+import org.apache.carbondata.core.carbon.querystatistics.*;
import org.apache.carbondata.core.constants.CarbonCommonConstants;
public class CarbonTimeStatisticsFactory {
private static String LoadStatisticsInstanceType;
private static LoadStatistics LoadStatisticsInstance;
- private static DriverQueryStatisticsRecorder QueryStatisticsRecorderInstance;
+ private static String queryStatisticsRecorderInstanceType;
+ private static QueryStatisticsRecorder QueryStatisticsRecorderInstance;
--- End diff --
already initialized
```
static {
CarbonTimeStatisticsFactory.updateTimeStatisticsUtilStatus();
LoadStatisticsInstance = genLoadStatisticsInstance();
QueryStatisticsRecorderInstance = genQueryStatisticsRecorderInstance();
}
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r80410854
--- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonTimeStatisticsFactory.java ---
@@ -17,13 +17,14 @@
package org.apache.carbondata.core.util;
-import org.apache.carbondata.core.carbon.querystatistics.DriverQueryStatisticsRecorder;
+import org.apache.carbondata.core.carbon.querystatistics.*;
import org.apache.carbondata.core.constants.CarbonCommonConstants;
public class CarbonTimeStatisticsFactory {
private static String LoadStatisticsInstanceType;
private static LoadStatistics LoadStatisticsInstance;
- private static DriverQueryStatisticsRecorder QueryStatisticsRecorderInstance;
+ private static String queryStatisticsRecorderInstanceType;
+ private static QueryStatisticsRecorder QueryStatisticsRecorderInstance;
--- End diff --
for variable, first character should not be capital
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by foryou2030 <gi...@git.apache.org>.
Github user foryou2030 commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r80197104
--- Diff: hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonInputFormat.java ---
@@ -461,8 +459,15 @@ private Object getFilterPredicates(Configuration configuration) {
FilterExpressionProcessor filterExpressionProcessor,
AbsoluteTableIdentifier absoluteTableIdentifier, FilterResolverIntf resolver,
String segmentId) throws IndexBuilderException, IOException {
-
- QueryStatisticsRecorder recorder = new QueryStatisticsRecorder("");
+ String queryStatisticsRecorderInstanceType = CarbonProperties.getInstance()
--- End diff --
fixed
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r80179086
--- Diff: core/src/main/java/org/apache/carbondata/core/carbon/querystatistics/QueryStatisticsRecorderImpl.java ---
@@ -0,0 +1,172 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.carbondata.core.carbon.querystatistics;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.carbondata.common.logging.LogService;
+import org.apache.carbondata.common.logging.LogServiceFactory;
+
+import static org.apache.carbondata.core.util.CarbonUtil.printLine;
+
+/**
+ * Class will be used to record and log the query statistics
+ */
+public class QueryStatisticsRecorderImpl implements QueryStatisticsRecorder,Serializable {
+
+ private static final LogService LOGGER =
+ LogServiceFactory.getLogService(QueryStatisticsRecorderImpl.class.getName());
+
+ /**
+ * serialization version
+ */
+ private static final long serialVersionUID = -5719752001674467864L;
+
+ /**
+ * list for statistics to record time taken
+ * by each phase of the query for example aggregation
+ * scanning,block loading time etc.
+ */
+ private List<QueryStatistic> queryStatistics;
+
+ /**
+ * query with taskd
+ */
+ private String queryIWthTask;
+
+ /**
+ * lock for log statistics table
+ */
+ private static final Object lock = new Object();
+
+ public QueryStatisticsRecorderImpl(String queryId) {
+ queryStatistics = new ArrayList<QueryStatistic>();
+ this.queryIWthTask = queryId;
+ }
+
+ /**
+ * Below method will be used to add the statistics
+ *
+ * @param statistic
+ */
+ public synchronized void recordStatistics(QueryStatistic statistic) {
+ queryStatistics.add(statistic);
+ }
+
+ /**
+ * Below method will be used to log the statistic
+ */
+ public void logStatistics() {
+ for (QueryStatistic statistic : queryStatistics) {
+ LOGGER.statistic(statistic.getStatistics(queryIWthTask));
+ }
+ }
+
+ /**
+ * Below method will be used to show statistic log as table
+ */
+ public void logStatisticsAsTableExecutor() {
+ synchronized (lock) {
--- End diff --
Why this lock is required? It seems this is the only place lock is used?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by foryou2030 <gi...@git.apache.org>.
Github user foryou2030 commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r80208061
--- Diff: core/src/main/java/org/apache/carbondata/core/carbon/querystatistics/QueryStatisticsRecorderImpl.java ---
@@ -0,0 +1,172 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.carbondata.core.carbon.querystatistics;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.carbondata.common.logging.LogService;
+import org.apache.carbondata.common.logging.LogServiceFactory;
+
+import static org.apache.carbondata.core.util.CarbonUtil.printLine;
+
+/**
+ * Class will be used to record and log the query statistics
+ */
+public class QueryStatisticsRecorderImpl implements QueryStatisticsRecorder,Serializable {
+
+ private static final LogService LOGGER =
+ LogServiceFactory.getLogService(QueryStatisticsRecorderImpl.class.getName());
+
+ /**
+ * serialization version
+ */
+ private static final long serialVersionUID = -5719752001674467864L;
+
+ /**
+ * list for statistics to record time taken
+ * by each phase of the query for example aggregation
+ * scanning,block loading time etc.
+ */
+ private List<QueryStatistic> queryStatistics;
+
+ /**
+ * query with taskd
+ */
+ private String queryIWthTask;
+
+ /**
+ * lock for log statistics table
+ */
+ private static final Object lock = new Object();
+
+ public QueryStatisticsRecorderImpl(String queryId) {
+ queryStatistics = new ArrayList<QueryStatistic>();
+ this.queryIWthTask = queryId;
+ }
+
+ /**
+ * Below method will be used to add the statistics
+ *
+ * @param statistic
+ */
+ public synchronized void recordStatistics(QueryStatistic statistic) {
+ queryStatistics.add(statistic);
+ }
+
+ /**
+ * Below method will be used to log the statistic
+ */
+ public void logStatistics() {
+ for (QueryStatistic statistic : queryStatistics) {
+ LOGGER.statistic(statistic.getStatistics(queryIWthTask));
+ }
+ }
+
+ /**
+ * Below method will be used to show statistic log as table
+ */
+ public void logStatisticsAsTableExecutor() {
+ synchronized (lock) {
--- End diff --
yes, i think no need lock. For executor, one task one recorder.
what do u think? @Vimal-Das
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by foryou2030 <gi...@git.apache.org>.
Github user foryou2030 commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r80197172
--- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonTimeStatisticsFactory.java ---
@@ -52,12 +56,27 @@ public static LoadStatistics getLoadStatisticsInstance() {
return LoadStatisticsInstance;
}
- private static DriverQueryStatisticsRecorder genQueryStatisticsRecorderInstance() {
- return DriverQueryStatisticsRecorder.getInstance();
+ private static QueryStatisticsRecorder genQueryStatisticsRecorderInstance() {
+ if (queryStatisticsRecorderInstanceType.equalsIgnoreCase("true")) {
+ return DriverQueryStatisticsRecorderImpl.getInstance();
+ } else {
+ return DriverQueryStatisticsRecorderDummy.getInstance();
+ }
}
- public static DriverQueryStatisticsRecorder getQueryStatisticsRecorderInstance() {
+ public static QueryStatisticsRecorder getQueryStatisticsRecorderInstance() {
return QueryStatisticsRecorderInstance;
}
+ public static QueryStatisticsRecorder getQueryStatisticsRecorder(String queryId) {
--- End diff --
fixed
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r80179616
--- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonTimeStatisticsFactory.java ---
@@ -52,12 +56,27 @@ public static LoadStatistics getLoadStatisticsInstance() {
return LoadStatisticsInstance;
}
- private static DriverQueryStatisticsRecorder genQueryStatisticsRecorderInstance() {
- return DriverQueryStatisticsRecorder.getInstance();
+ private static QueryStatisticsRecorder genQueryStatisticsRecorderInstance() {
--- End diff --
rename all the factory function in this class to `createXXX`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r79554930
--- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonTimeStatisticsFactory.java ---
@@ -52,12 +56,27 @@ public static LoadStatistics getLoadStatisticsInstance() {
return LoadStatisticsInstance;
}
- private static DriverQueryStatisticsRecorder genQueryStatisticsRecorderInstance() {
- return DriverQueryStatisticsRecorder.getInstance();
+ private static QueryStatisticsRecorder genQueryStatisticsRecorderInstance() {
+ if (queryStatisticsRecorderInstanceType.equalsIgnoreCase("true")) {
+ return DriverQueryStatisticsRecorderImpl.getInstance();
+ } else {
+ return DriverQueryStatisticsRecorderDummy.getInstance();
+ }
}
- public static DriverQueryStatisticsRecorder getQueryStatisticsRecorderInstance() {
+ public static QueryStatisticsRecorder getQueryStatisticsRecorderInstance() {
return QueryStatisticsRecorderInstance;
}
+ public static QueryStatisticsRecorder getQueryStatisticsRecorder(String queryId) {
--- End diff --
I think rename it to createRecorder is better than 'get'
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r80179589
--- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonTimeStatisticsFactory.java ---
@@ -17,13 +17,14 @@
package org.apache.carbondata.core.util;
-import org.apache.carbondata.core.carbon.querystatistics.DriverQueryStatisticsRecorder;
+import org.apache.carbondata.core.carbon.querystatistics.*;
import org.apache.carbondata.core.constants.CarbonCommonConstants;
public class CarbonTimeStatisticsFactory {
private static String LoadStatisticsInstanceType;
private static LoadStatistics LoadStatisticsInstance;
- private static DriverQueryStatisticsRecorder QueryStatisticsRecorderInstance;
+ private static String queryStatisticsRecorderInstanceType;
+ private static QueryStatisticsRecorder QueryStatisticsRecorderInstance;
--- End diff --
And seems it is not initialized but returned in `getQueryStatisticsRecorderInstance` function?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r79549321
--- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonTimeStatisticsFactory.java ---
@@ -52,11 +58,18 @@ public static LoadStatistics getLoadStatisticsInstance() {
return LoadStatisticsInstance;
}
- private static DriverQueryStatisticsRecorder genQueryStatisticsRecorderInstance() {
- return DriverQueryStatisticsRecorder.getInstance();
+ private static QueryStatisticsRecorder genQueryStatisticsRecorderInstance() {
+ switch (queryStatisticsRecorderInstanceType.toLowerCase()) {
--- End diff --
change to if else statement, then no need for default branch
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by foryou2030 <gi...@git.apache.org>.
Github user foryou2030 commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r79550295
--- Diff: integration/spark/src/main/scala/org/apache/spark/sql/CarbonDictionaryDecoder.scala ---
@@ -158,7 +159,16 @@ case class CarbonDictionaryDecoder(
val carbonTable = relation.carbonRelation.carbonRelation.metaData.carbonTable
(carbonTable.getFactTableName, carbonTable.getAbsoluteTableIdentifier)
}.toMap
- val recorder = new QueryStatisticsRecorder(queryId)
+ val queryStatisticsRecorderInstanceType = CarbonProperties.getInstance()
--- End diff --
ok
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r80179688
--- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonTimeStatisticsFactory.java ---
@@ -17,13 +17,14 @@
package org.apache.carbondata.core.util;
-import org.apache.carbondata.core.carbon.querystatistics.DriverQueryStatisticsRecorder;
+import org.apache.carbondata.core.carbon.querystatistics.*;
import org.apache.carbondata.core.constants.CarbonCommonConstants;
public class CarbonTimeStatisticsFactory {
--- End diff --
This class is the factory class for `QueryStatisticsRecorder`, so rename it to `QueryStatisticsRecorderFactory`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r79549615
--- Diff: hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonInputFormat.java ---
@@ -461,8 +459,15 @@ private Object getFilterPredicates(Configuration configuration) {
FilterExpressionProcessor filterExpressionProcessor,
AbsoluteTableIdentifier absoluteTableIdentifier, FilterResolverIntf resolver,
String segmentId) throws IndexBuilderException, IOException {
-
- QueryStatisticsRecorder recorder = new QueryStatisticsRecorder("");
+ String queryStatisticsRecorderInstanceType = CarbonProperties.getInstance()
--- End diff --
can we move this creation logic to the factory class?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by Zhangshunyu <gi...@git.apache.org>.
Github user Zhangshunyu commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r80374297
--- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonTimeStatisticsFactory.java ---
@@ -17,47 +17,51 @@
package org.apache.carbondata.core.util;
-import org.apache.carbondata.core.carbon.querystatistics.DriverQueryStatisticsRecorder;
+import org.apache.carbondata.core.carbon.querystatistics.*;
import org.apache.carbondata.core.constants.CarbonCommonConstants;
public class CarbonTimeStatisticsFactory {
private static String LoadStatisticsInstanceType;
- private static LoadStatistics LoadStatisticsInstance;
--- End diff --
dont modify here\uff0cso that load instsnce can just judge once\uff0cif you modify here\uff0cit would judge many times.
so\uff0c pls set it back.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r79549670
--- Diff: integration/spark/src/main/scala/org/apache/spark/sql/CarbonDictionaryDecoder.scala ---
@@ -158,7 +159,16 @@ case class CarbonDictionaryDecoder(
val carbonTable = relation.carbonRelation.carbonRelation.metaData.carbonTable
(carbonTable.getFactTableName, carbonTable.getAbsoluteTableIdentifier)
}.toMap
- val recorder = new QueryStatisticsRecorder(queryId)
+ val queryStatisticsRecorderInstanceType = CarbonProperties.getInstance()
--- End diff --
same, move it to factory class
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r80410923
--- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonTimeStatisticsFactory.java ---
@@ -17,13 +17,14 @@
package org.apache.carbondata.core.util;
-import org.apache.carbondata.core.carbon.querystatistics.DriverQueryStatisticsRecorder;
+import org.apache.carbondata.core.carbon.querystatistics.*;
import org.apache.carbondata.core.constants.CarbonCommonConstants;
public class CarbonTimeStatisticsFactory {
private static String LoadStatisticsInstanceType;
private static LoadStatistics LoadStatisticsInstance;
- private static DriverQueryStatisticsRecorder QueryStatisticsRecorderInstance;
+ private static String queryStatisticsRecorderInstanceType;
+ private static QueryStatisticsRecorder QueryStatisticsRecorderInstance;
--- End diff --
Is queryStatisticsRecorderInstanceType used somewhere? Why this is required?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r80411176
--- Diff: integration/spark/src/main/scala/org/apache/spark/sql/CarbonDictionaryDecoder.scala ---
@@ -158,7 +158,8 @@ case class CarbonDictionaryDecoder(
val carbonTable = relation.carbonRelation.carbonRelation.metaData.carbonTable
(carbonTable.getFactTableName, carbonTable.getAbsoluteTableIdentifier)
}.toMap
- val recorder = new QueryStatisticsRecorder(queryId)
+
+ val recorder = CarbonTimeStatisticsFactory.createRecorder(queryId);
--- End diff --
This should be task/executor side recorder, right? Why not name it createTaskRecorder or createExecutorRecorder
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r80179516
--- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonTimeStatisticsFactory.java ---
@@ -17,13 +17,14 @@
package org.apache.carbondata.core.util;
-import org.apache.carbondata.core.carbon.querystatistics.DriverQueryStatisticsRecorder;
+import org.apache.carbondata.core.carbon.querystatistics.*;
import org.apache.carbondata.core.constants.CarbonCommonConstants;
public class CarbonTimeStatisticsFactory {
private static String LoadStatisticsInstanceType;
private static LoadStatistics LoadStatisticsInstance;
- private static DriverQueryStatisticsRecorder QueryStatisticsRecorderInstance;
+ private static String queryStatisticsRecorderInstanceType;
+ private static QueryStatisticsRecorder QueryStatisticsRecorderInstance;
--- End diff --
`QueryStatisticsRecorderInstance` is not comply to the coding standard
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by foryou2030 <gi...@git.apache.org>.
Github user foryou2030 commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r80197685
--- Diff: hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonInputFormat.java ---
@@ -461,8 +460,8 @@ private Object getFilterPredicates(Configuration configuration) {
FilterExpressionProcessor filterExpressionProcessor,
AbsoluteTableIdentifier absoluteTableIdentifier, FilterResolverIntf resolver,
String segmentId) throws IndexBuilderException, IOException {
-
- QueryStatisticsRecorder recorder = new QueryStatisticsRecorder("");
+ QueryStatisticsRecorder recorder =
+ CarbonTimeStatisticsFactory.getQueryStatisticsRecorderInstance();
--- End diff --
already fixed
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by foryou2030 <gi...@git.apache.org>.
Github user foryou2030 commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r79826568
--- Diff: hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonInputFormat.java ---
@@ -461,8 +460,7 @@ private Object getFilterPredicates(Configuration configuration) {
FilterExpressionProcessor filterExpressionProcessor,
AbsoluteTableIdentifier absoluteTableIdentifier, FilterResolverIntf resolver,
String segmentId) throws IndexBuilderException, IOException {
-
- QueryStatisticsRecorder recorder = new QueryStatisticsRecorder("");
+ QueryStatisticsRecorder recorder = CarbonTimeStatisticsFactory.getQueryStatisticsRecorder("");
--- End diff --
ok
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r80179757
--- Diff: hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonInputFormat.java ---
@@ -461,8 +460,8 @@ private Object getFilterPredicates(Configuration configuration) {
FilterExpressionProcessor filterExpressionProcessor,
AbsoluteTableIdentifier absoluteTableIdentifier, FilterResolverIntf resolver,
String segmentId) throws IndexBuilderException, IOException {
-
- QueryStatisticsRecorder recorder = new QueryStatisticsRecorder("");
+ QueryStatisticsRecorder recorder =
+ CarbonTimeStatisticsFactory.getQueryStatisticsRecorderInstance();
--- End diff --
can we get the queryId here?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by Zhangshunyu <gi...@git.apache.org>.
Github user Zhangshunyu commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r80413220
--- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonTimeStatisticsFactory.java ---
@@ -17,13 +17,14 @@
package org.apache.carbondata.core.util;
-import org.apache.carbondata.core.carbon.querystatistics.DriverQueryStatisticsRecorder;
+import org.apache.carbondata.core.carbon.querystatistics.*;
import org.apache.carbondata.core.constants.CarbonCommonConstants;
public class CarbonTimeStatisticsFactory {
private static String LoadStatisticsInstanceType;
private static LoadStatistics LoadStatisticsInstance;
- private static DriverQueryStatisticsRecorder QueryStatisticsRecorderInstance;
+ private static String queryStatisticsRecorderInstanceType;
+ private static QueryStatisticsRecorder QueryStatisticsRecorderInstance;
--- End diff --
@jackylk instanceType is used to detemine the instance is Dummy or Impl recording to the configuration, it is proper.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-carbondata pull request #176: [CARBONDATA-208] Add configuration e...
Posted by jackylk <gi...@git.apache.org>.
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/176#discussion_r79555228
--- Diff: hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonInputFormat.java ---
@@ -461,8 +460,7 @@ private Object getFilterPredicates(Configuration configuration) {
FilterExpressionProcessor filterExpressionProcessor,
AbsoluteTableIdentifier absoluteTableIdentifier, FilterResolverIntf resolver,
String segmentId) throws IndexBuilderException, IOException {
-
- QueryStatisticsRecorder recorder = new QueryStatisticsRecorder("");
+ QueryStatisticsRecorder recorder = CarbonTimeStatisticsFactory.getQueryStatisticsRecorder("");
--- End diff --
no queryId in driver side?
can we set it in job.configuration?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---