You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by si...@apache.org on 2020/05/31 04:10:57 UTC
[incubator-pinot] branch hotfix-0530 updated: Check
aggregateMetrics from RealtimeSegmentConfig
This is an automated email from the ASF dual-hosted git repository.
siddteotia pushed a commit to branch hotfix-0530
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
The following commit(s) were added to refs/heads/hotfix-0530 by this push:
new 7a18f68 Check aggregateMetrics from RealtimeSegmentConfig
7a18f68 is described below
commit 7a18f68d0220fe8e4ff7ade1c214e82876ae9772
Author: Siddharth Teotia <st...@steotia-mn1.linkedin.biz>
AuthorDate: Sat May 30 21:10:30 2020 -0700
Check aggregateMetrics from RealtimeSegmentConfig
---
.../apache/pinot/core/indexsegment/mutable/MutableSegmentImpl.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pinot-core/src/main/java/org/apache/pinot/core/indexsegment/mutable/MutableSegmentImpl.java b/pinot-core/src/main/java/org/apache/pinot/core/indexsegment/mutable/MutableSegmentImpl.java
index 0e24664..527572f 100644
--- a/pinot-core/src/main/java/org/apache/pinot/core/indexsegment/mutable/MutableSegmentImpl.java
+++ b/pinot-core/src/main/java/org/apache/pinot/core/indexsegment/mutable/MutableSegmentImpl.java
@@ -219,7 +219,7 @@ public class MutableSegmentImpl implements MutableSegment {
FieldSpec.DataType dataType = fieldSpec.getDataType();
boolean isFixedWidthColumn = dataType.isFixedWidth();
int forwardIndexColumnSize = -1;
- if (isNoDictionaryColumn(noDictionaryColumns, invertedIndexColumns, fieldSpec, column)) {
+ if (isNoDictionaryColumn(noDictionaryColumns, invertedIndexColumns, fieldSpec, column, config)) {
// no dictionary
// each forward index entry will be equal to size of data for that row
// For INT, LONG, FLOAT, DOUBLE it is equal to the number of fixed bytes used to store the value,
@@ -329,7 +329,7 @@ public class MutableSegmentImpl implements MutableSegment {
* @return true if column is no-dictionary, false if dictionary encoded
*/
private boolean isNoDictionaryColumn(Set<String> noDictionaryColumns, Set<String> invertedIndexColumns,
- FieldSpec fieldSpec, String column) {
+ FieldSpec fieldSpec, String column, RealtimeSegmentConfig config) {
FieldSpec.DataType dataType = fieldSpec.getDataType();
if (noDictionaryColumns.contains(column)) {
// Earlier we didn't support noDict in consuming segments for STRING and BYTES columns.
@@ -342,7 +342,7 @@ public class MutableSegmentImpl implements MutableSegment {
// of noDict on STRING/BYTES. Without metrics aggregation, memory pressure increases.
// So to continue aggregating metrics for such cases, we will create dictionary even
// if the column is part of noDictionary set from table config
- if (fieldSpec instanceof DimensionFieldSpec && _aggregateMetrics && (dataType == FieldSpec.DataType.STRING ||
+ if (fieldSpec instanceof DimensionFieldSpec && config.aggregateMetrics() && (dataType == FieldSpec.DataType.STRING ||
dataType == FieldSpec.DataType.BYTES)) {
_logger.info("Not creating dictionary in consuming segment for column {} of type {}", column, dataType.toString());
return false;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org