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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to