You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2020/02/19 18:19:33 UTC

[GitHub] [cassandra] dcapwell opened a new pull request #449: CASSANDRA-15591 when we throw Invalid partitioner class add the cause to the exception and allow to log

dcapwell opened a new pull request #449: CASSANDRA-15591 when we throw Invalid partitioner class add the cause to the exception and allow to log
URL: https://github.com/apache/cassandra/pull/449
 
 
   

----------------------------------------------------------------
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: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] dcapwell closed pull request #449: CASSANDRA-15591 when we throw Invalid partitioner class add the cause to the exception and allow to log

Posted by GitBox <gi...@apache.org>.
dcapwell closed pull request #449: CASSANDRA-15591 when we throw Invalid partitioner class add the cause to the exception and allow to log
URL: https://github.com/apache/cassandra/pull/449
 
 
   

----------------------------------------------------------------
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: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] yifan-c commented on a change in pull request #449: CASSANDRA-15591 when we throw Invalid partitioner class add the cause to the exception and allow to log

Posted by GitBox <gi...@apache.org>.
yifan-c commented on a change in pull request #449: CASSANDRA-15591 when we throw Invalid partitioner class add the cause to the exception and allow to log
URL: https://github.com/apache/cassandra/pull/449#discussion_r381469444
 
 

 ##########
 File path: src/java/org/apache/cassandra/config/DatabaseDescriptor.java
 ##########
 @@ -1108,13 +1108,15 @@ public static void applyPartitioner()
         {
             throw new ConfigurationException("Missing directive: partitioner", false);
         }
+        String partitionerName = conf.partitioner;
         try
         {
-            partitioner = FBUtilities.newPartitioner(System.getProperty(Config.PROPERTY_PREFIX + "partitioner", conf.partitioner));
+            partitionerName = System.getProperty(Config.PROPERTY_PREFIX + "partitioner", conf.partitioner);
+            partitioner = FBUtilities.newPartitioner(partitionerName);
         }
         catch (Exception e)
         {
-            throw new ConfigurationException("Invalid partitioner class " + conf.partitioner, false);
+            throw new ConfigurationException("Invalid partitioner class " + partitionerName, e);
 
 Review comment:
   The change allows to
   1. Set the correct `partitionerName` in the exception message. Previously, the message just include the partitioner set in the conf and it could be wrong when system property is present. 
   2. Add the stack trace to the exception and enable logging. 

----------------------------------------------------------------
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: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org