[ 
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


Reply via email to