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:39:31 UTC

[GitHub] [incubator-pinot] jackjlli commented on a change in pull request #4463: Ensuring partition config is valid during Hadoop preprocess

jackjlli commented on a change in pull request #4463: Ensuring partition config is valid during Hadoop preprocess
URL: https://github.com/apache/incubator-pinot/pull/4463#discussion_r306522140
 
 

 ##########
 File path: pinot-hadoop/src/main/java/org/apache/pinot/hadoop/job/SegmentPreprocessingJob.java
 ##########
 @@ -286,6 +287,12 @@ private void validateConfigsAgainstSchema(Schema schema) {
           .format("Partition column: %s is not found from the schema of input files.", _partitionColumn));
       Preconditions.checkArgument(_numberOfPartitions > 0, String.format("Number of partitions should be positive. Current value: %s", _numberOfPartitions));
       Preconditions.checkArgument(_partitionFunction != null, "Partition function should not be null!");
+      try {
+        PartitionFunctionFactory.PartitionFunctionType.fromString(_partitionFunction);
+      } catch (IllegalArgumentException e) {
+        _logger.info("Partition function needs to be one of Modulo, Murmur, ByteArray, HashCode");
 
 Review comment:
   It'd be good to print out the current value of the setting in 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