[GitHub] [pulsar] srkukarni commented on a change in pull request #3770: Allow users to update everything in inputspecs except for isregexpattern

2019-03-06 Thread GitBox
srkukarni commented on a change in pull request #3770: Allow users to update 
everything in inputspecs except for isregexpattern
URL: https://github.com/apache/pulsar/pull/3770#discussion_r263119829
 
 

 ##
 File path: 
pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/SinkConfigUtils.java
 ##
 @@ -416,7 +416,7 @@ public static SinkConfig validateUpdate(SinkConfig 
existingConfig, SinkConfig ne
 if (!existingConfig.getInputSpecs().containsKey(topicName)) {
 throw new IllegalArgumentException("Input Topics cannot be 
altered");
 }
-if 
(!consumerConfig.equals(existingConfig.getInputSpecs().get(topicName))) {
+if (consumerConfig.isRegexPattern() != 
existingConfig.getInputSpecs().get(topicName).isRegexPattern()) {
 throw new IllegalArgumentException("Input Specs mismatch");
 
 Review comment:
   Changed


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [pulsar] srkukarni commented on a change in pull request #3770: Allow users to update everything in inputspecs except for isregexpattern

2019-03-06 Thread GitBox
srkukarni commented on a change in pull request #3770: Allow users to update 
everything in inputspecs except for isregexpattern
URL: https://github.com/apache/pulsar/pull/3770#discussion_r263119861
 
 

 ##
 File path: 
pulsar-functions/utils/src/test/java/org/apache/pulsar/functions/utils/FunctionConfigUtilsTest.java
 ##
 @@ -157,6 +157,15 @@ public void testMergeDifferentInputs() {
 FunctionConfigUtils.validateUpdate(functionConfig, newFunctionConfig);
 }
 
+@Test(expectedExceptions = IllegalArgumentException.class, 
expectedExceptionsMessageRegExp = "Input Specs mismatch")
 
 Review comment:
   added


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:
us...@infra.apache.org


With regards,
Apache Git Services