You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/07/23 20:37:56 UTC

[GitHub] [incubator-pinot] jackjlli commented on a change in pull request #4462: Time-aware resizing

jackjlli commented on a change in pull request #4462: Time-aware resizing
URL: https://github.com/apache/incubator-pinot/pull/4462#discussion_r306520586
 
 

 ##########
 File path: pinot-hadoop/src/main/java/org/apache/pinot/hadoop/job/mappers/SegmentPreprocessingMapper.java
 ##########
 @@ -61,6 +87,19 @@ public void setup(final Context context) {
   @Override
   public void map(AvroKey<GenericRecord> record, NullWritable value, final Context context)
       throws IOException, InterruptedException {
+
+    if (_isAppend) {
+      // Normalize time column value and check against sample value
+      String timeColumnValue = (String) record.datum().get(_timeColumn);
+      String normalizedTimeColumnValue = _normalizedDateSegmentNameGenerator.getNormalizedDate(timeColumnValue);
+
+      if (!normalizedTimeColumnValue.equals(_sampleNormalizedTimeColumnValue)) {
+        // TODO: Create a custom exception and gracefully catch this exception outside, changing what the path to input
+        // into segment creation should be
+        throw new IllegalArgumentException("");
 
 Review comment:
   We should add more meat to the exception message

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org