This is an automated email from the ASF dual-hosted git repository.
jackie pushed a commit to branch time_boundary
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
The following commit(s) were added to refs/heads/time_boundary by this push:
new 2bd709e Address comments
2bd709e is described below
commit 2bd709ee61ed17d14aef3dadf325db36778e2118
Author: Jackie (Xiaotian) Jiang <[email protected]>
AuthorDate: Tue Apr 23 12:05:11 2019 -0700
Address comments
---
.../HelixExternalViewBasedTimeBoundaryService.java | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git
a/pinot-broker/src/main/java/org/apache/pinot/broker/routing/HelixExternalViewBasedTimeBoundaryService.java
b/pinot-broker/src/main/java/org/apache/pinot/broker/routing/HelixExternalViewBasedTimeBoundaryService.java
index 10de2ff..b574358 100644
---
a/pinot-broker/src/main/java/org/apache/pinot/broker/routing/HelixExternalViewBasedTimeBoundaryService.java
+++
b/pinot-broker/src/main/java/org/apache/pinot/broker/routing/HelixExternalViewBasedTimeBoundaryService.java
@@ -57,18 +57,20 @@ public class HelixExternalViewBasedTimeBoundaryService
implements TimeBoundarySe
Set<String> offlineSegmentsServing = externalView.getPartitionSet();
if (offlineSegmentsServing.isEmpty()) {
- LOGGER.warn("Skip updating time boundary for table: '{}' with no offline
segment", tableNameWithType);
+ LOGGER.warn("Skipping updating time boundary for table: '{}' with no
offline segment", tableNameWithType);
return;
}
Schema schema = ZKMetadataProvider.getTableSchema(_propertyStore,
tableNameWithType);
assert schema != null;
+ // TODO: when we start using dateTime, pick the time column from table
config, and use the DateTimeFieldSpec from
+ // the schema to determine the time unit
// TODO: support SDF
String timeColumn = schema.getTimeColumnName();
TimeUnit tableTimeUnit = schema.getOutgoingTimeUnit();
if (timeColumn == null || tableTimeUnit == null) {
- LOGGER
- .error("Skip updating time boundary for table: '{}' because time
column/unit is not set", tableNameWithType);
+ LOGGER.error("Skipping updating time boundary for table: '{}' because
time column/unit is not set",
+ tableNameWithType);
return;
}
@@ -82,7 +84,7 @@ public class HelixExternalViewBasedTimeBoundaryService
implements TimeBoundarySe
// Only consider segments in the external view
if (!offlineSegmentsServing.contains(segmentName)) {
- LOGGER.warn("Skip processing segment: '{}' for table: '{}' because it
does not exist in the external view",
+ LOGGER.warn("Skipping processing segment: '{}' for table: '{}' because
it does not exist in the external view",
segmentName, tableNameWithType);
continue;
}
@@ -91,15 +93,16 @@ public class HelixExternalViewBasedTimeBoundaryService
implements TimeBoundarySe
TimeUnit segmentTimeUnit = segmentZKMetadata.getTimeUnit();
if (segmentTimeUnit != tableTimeUnit) {
LOGGER.error(
- "Skip processing segment: '{}' for table: '{}' because the segment
time unit: {} does not match the table time unit: {}",
+ "Skipping processing segment: '{}' for table: '{}' because the
segment time unit: {} does not match the table time unit: {}",
segmentName, tableNameWithType, segmentTimeUnit, tableTimeUnit);
continue;
}
long segmentEndTime = segmentZKMetadata.getEndTime();
if (segmentEndTime <= 0) {
- LOGGER.error("Skip processing segment: '{}' for table: '{}' because
the end time: {} is illegal", segmentName,
- tableNameWithType, segmentEndTime);
+ LOGGER
+ .error("Skipping processing segment: '{}' for table: '{}' because
the end time: {} is illegal", segmentName,
+ tableNameWithType, segmentEndTime);
continue;
}
@@ -107,12 +110,12 @@ public class HelixExternalViewBasedTimeBoundaryService
implements TimeBoundarySe
}
if (maxTimeValue == -1L) {
- LOGGER.error("Skip updating time boundary for table: '{}' because no
segment contains valid end time",
+ LOGGER.error("Skipping updating time boundary for table: '{}' because no
segment contains valid end time",
tableNameWithType);
return;
}
- // Use (maxTimeValue - 1 day) as the time boundary
+ // Use (maxTimeValue - 1 DAY) as the time boundary
long timeBoundary = maxTimeValue - tableTimeUnit.convert(1L,
TimeUnit.DAYS);
LOGGER.info("Updated time boundary for table: '{}' to: {} {}",
tableNameWithType, timeBoundary, tableTimeUnit);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]