You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Michał Michalski (Created JIRA)" <ji...@apache.org> on 2012/04/20 09:36:42 UTC
[jira] [Created] (CASSANDRA-4177) Little improvement on the
messages of the exceptions thrown by ExternalClient
Little improvement on the messages of the exceptions thrown by ExternalClient
-----------------------------------------------------------------------------
Key: CASSANDRA-4177
URL: https://issues.apache.org/jira/browse/CASSANDRA-4177
Project: Cassandra
Issue Type: Improvement
Reporter: Michał Michalski
Priority: Trivial
After adding BulkRecordWriter (or actually ExternalClient) the ability to make use of authentication I've noticed that exceptions that are thrown on login failure are very misguiding - there's always a "Could not retrieve endpoint ranges" RuntimeException being thrown, no matter what really happens. This "hides" the real reason of all authentication problems. I've changed this line a bit, so all the messages are passed without any change, so now I get - for example - "AuthenticationException(why:Given password in password mode MD5 could not be validated for user operator)" or - in worst case - "Unexpected authentication problem", which is waaay more helpful, so I submit this trivial, but useful improvement.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4177) Little improvement on the
messages of the exceptions thrown by ExternalClient
Posted by "Michał Michalski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498669#comment-13498669 ]
Michał Michalski commented on CASSANDRA-4177:
---------------------------------------------
Oh, I almost forgot about this issue! Thanks for reply and yes - as I look at this issue again - it seems invalid even for me now ;)
> Little improvement on the messages of the exceptions thrown by ExternalClient
> -----------------------------------------------------------------------------
>
> Key: CASSANDRA-4177
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4177
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Michał Michalski
> Assignee: Michał Michalski
> Priority: Trivial
> Attachments: trunk-4177.txt
>
>
> After adding BulkRecordWriter (or actually ExternalClient) the ability to make use of authentication I've noticed that exceptions that are thrown on login failure are very misguiding - there's always a "Could not retrieve endpoint ranges" RuntimeException being thrown, no matter what really happens. This "hides" the real reason of all authentication problems. I've changed this line a bit, so all the messages are passed without any change, so now I get - for example - "AuthenticationException(why:Given password in password mode MD5 could not be validated for user operator)" or - in worst case - "Unexpected authentication problem", which is waaay more helpful, so I submit this trivial, but useful improvement.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CASSANDRA-4177) Little improvement on the
messages of the exceptions thrown by ExternalClient
Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brandon Williams resolved CASSANDRA-4177.
-----------------------------------------
Resolution: Won't Fix
> Little improvement on the messages of the exceptions thrown by ExternalClient
> -----------------------------------------------------------------------------
>
> Key: CASSANDRA-4177
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4177
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Michał Michalski
> Assignee: Michał Michalski
> Priority: Trivial
> Attachments: trunk-4177.txt
>
>
> After adding BulkRecordWriter (or actually ExternalClient) the ability to make use of authentication I've noticed that exceptions that are thrown on login failure are very misguiding - there's always a "Could not retrieve endpoint ranges" RuntimeException being thrown, no matter what really happens. This "hides" the real reason of all authentication problems. I've changed this line a bit, so all the messages are passed without any change, so now I get - for example - "AuthenticationException(why:Given password in password mode MD5 could not be validated for user operator)" or - in worst case - "Unexpected authentication problem", which is waaay more helpful, so I submit this trivial, but useful improvement.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4177) Little improvement on the
messages of the exceptions thrown by ExternalClient
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-4177:
--------------------------------------
Reviewer: brandon.williams
> Little improvement on the messages of the exceptions thrown by ExternalClient
> -----------------------------------------------------------------------------
>
> Key: CASSANDRA-4177
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4177
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Michał Michalski
> Assignee: Michał Michalski
> Priority: Trivial
> Attachments: trunk-4177.txt
>
>
> After adding BulkRecordWriter (or actually ExternalClient) the ability to make use of authentication I've noticed that exceptions that are thrown on login failure are very misguiding - there's always a "Could not retrieve endpoint ranges" RuntimeException being thrown, no matter what really happens. This "hides" the real reason of all authentication problems. I've changed this line a bit, so all the messages are passed without any change, so now I get - for example - "AuthenticationException(why:Given password in password mode MD5 could not be validated for user operator)" or - in worst case - "Unexpected authentication problem", which is waaay more helpful, so I submit this trivial, but useful improvement.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4177) Little improvement on the
messages of the exceptions thrown by ExternalClient
Posted by "Jonathan Ellis (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13258267#comment-13258267 ]
Jonathan Ellis commented on CASSANDRA-4177:
-------------------------------------------
Don't you get a "Caused by" later on in the stack trace with the original approach?
> Little improvement on the messages of the exceptions thrown by ExternalClient
> -----------------------------------------------------------------------------
>
> Key: CASSANDRA-4177
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4177
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Michał Michalski
> Assignee: Michał Michalski
> Priority: Trivial
> Attachments: trunk-4177.txt
>
>
> After adding BulkRecordWriter (or actually ExternalClient) the ability to make use of authentication I've noticed that exceptions that are thrown on login failure are very misguiding - there's always a "Could not retrieve endpoint ranges" RuntimeException being thrown, no matter what really happens. This "hides" the real reason of all authentication problems. I've changed this line a bit, so all the messages are passed without any change, so now I get - for example - "AuthenticationException(why:Given password in password mode MD5 could not be validated for user operator)" or - in worst case - "Unexpected authentication problem", which is waaay more helpful, so I submit this trivial, but useful improvement.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4177) Little improvement on the
messages of the exceptions thrown by ExternalClient
Posted by "Michał Michalski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13263412#comment-13263412 ]
Michał Michalski commented on CASSANDRA-4177:
---------------------------------------------
Good point. This is what I get:
{noformat}12/04/27 08:58:05 INFO mapred.JobClient: Task Id : attempt_201204100823_2167_m_000000_0, Status : FAILED
java.lang.RuntimeException: Could not retrieve endpoint ranges:
at org.apache.cassandra.hadoop.BulkRecordWriter$ExternalClient.init(BulkRecordWriter.java:263)
at org.apache.cassandra.io.sstable.SSTableLoader.stream(SSTableLoader.java:117)
at org.apache.cassandra.io.sstable.SSTableLoader.stream(SSTableLoader.java:112)
at org.apache.cassandra.hadoop.BulkRecordWriter.close(BulkRecordWriter.java:193)
at org.apache.cassandra.hadoop.BulkRecordWriter.close(BulkRecordWriter.java:178)
at org.apache.hadoop.mapred.MapTask$NewDirectOutputCollector.close(MapTask.java:540)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:649)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:323)
at org.apache.hadoop.mapred.Child$4.run(Child.java:270)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1127)
at org.apache.hadoop.mapred.Child.main(Child.java:264)
Caus
{noformat}
So, I guess that this "Caus" in the end is what you are asking about, but for some reason it's truncated. Of course I bet that it's because of my app, but I will have to investigate it a bit.
Anyway, I still think that the exception with a fixed message like this is inappriopriate and misguiding in some way if we can get more detailed Exceptions of many kinds here. I've checked how does it looks like in other classes with authentication and what I found is that i.e. in ColumnFamilyRecordReader.java it's made in the way I proposed (throw new RuntimeException(e);). So, I'm not arguing that it's a kind of a must-have thing, but I still think it's a bit more "proper" way of handling this case :)
However, answering your question - yes, you're right :)
> Little improvement on the messages of the exceptions thrown by ExternalClient
> -----------------------------------------------------------------------------
>
> Key: CASSANDRA-4177
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4177
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Michał Michalski
> Assignee: Michał Michalski
> Priority: Trivial
> Attachments: trunk-4177.txt
>
>
> After adding BulkRecordWriter (or actually ExternalClient) the ability to make use of authentication I've noticed that exceptions that are thrown on login failure are very misguiding - there's always a "Could not retrieve endpoint ranges" RuntimeException being thrown, no matter what really happens. This "hides" the real reason of all authentication problems. I've changed this line a bit, so all the messages are passed without any change, so now I get - for example - "AuthenticationException(why:Given password in password mode MD5 could not be validated for user operator)" or - in worst case - "Unexpected authentication problem", which is waaay more helpful, so I submit this trivial, but useful improvement.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4177) Little improvement on the
messages of the exceptions thrown by ExternalClient
Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498088#comment-13498088 ]
Brandon Williams commented on CASSANDRA-4177:
---------------------------------------------
This patch isn't really going to solve anything for you, except remove the "Could not retrieve endpoint ranges" prefix, which is still technically correct.
> Little improvement on the messages of the exceptions thrown by ExternalClient
> -----------------------------------------------------------------------------
>
> Key: CASSANDRA-4177
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4177
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Michał Michalski
> Assignee: Michał Michalski
> Priority: Trivial
> Attachments: trunk-4177.txt
>
>
> After adding BulkRecordWriter (or actually ExternalClient) the ability to make use of authentication I've noticed that exceptions that are thrown on login failure are very misguiding - there's always a "Could not retrieve endpoint ranges" RuntimeException being thrown, no matter what really happens. This "hides" the real reason of all authentication problems. I've changed this line a bit, so all the messages are passed without any change, so now I get - for example - "AuthenticationException(why:Given password in password mode MD5 could not be validated for user operator)" or - in worst case - "Unexpected authentication problem", which is waaay more helpful, so I submit this trivial, but useful improvement.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4177) Little improvement on the
messages of the exceptions thrown by ExternalClient
Posted by "Michał Michalski (Updated JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michał Michalski updated CASSANDRA-4177:
----------------------------------------
Attachment: trunk-4177.txt
Patch
> Little improvement on the messages of the exceptions thrown by ExternalClient
> -----------------------------------------------------------------------------
>
> Key: CASSANDRA-4177
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4177
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Michał Michalski
> Priority: Trivial
> Attachments: trunk-4177.txt
>
>
> After adding BulkRecordWriter (or actually ExternalClient) the ability to make use of authentication I've noticed that exceptions that are thrown on login failure are very misguiding - there's always a "Could not retrieve endpoint ranges" RuntimeException being thrown, no matter what really happens. This "hides" the real reason of all authentication problems. I've changed this line a bit, so all the messages are passed without any change, so now I get - for example - "AuthenticationException(why:Given password in password mode MD5 could not be validated for user operator)" or - in worst case - "Unexpected authentication problem", which is waaay more helpful, so I submit this trivial, but useful improvement.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira