[ https://issues.apache.org/jira/browse/CASSANDRA-4155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13256237#comment-13256237 ]
Michał Michalski commented on CASSANDRA-4155: --------------------------------------------- Thanks for quick response and review, Brandon! I like your idea so I'll modify the patch this way. It can be even done better - as ConfigHelper (of Configuration, to be more precise) returns null if value was not set, I don't have to do any "if" in BulkRecordWriter.prepareWriter() - I can just retrieve the values from config (null if not set) and pass them, so the only "if" will be in ExternalClient.init(). I'll change it and submit a new patch as soon as I get my Hadoop-to-Cassandra bulkload work once again, as I suffer some "(...)ib-1-Data.db is not compatible with current version hc" problem after moving to RC1, so I could test it, just to be 100% sure it's OK :) > Make possible to authenticate user when loading data to Cassandra with > BulkRecordWriter. > ---------------------------------------------------------------------------------------- > > Key: CASSANDRA-4155 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4155 > Project: Cassandra > Issue Type: Improvement > Reporter: Michał Michalski > Priority: Minor > Fix For: 1.1.1 > > Attachments: trunk-4155-nicer-version.txt, trunk-4155.txt > > > I need to use the authorization feature (i.e. provided by SimpleAuthenticator > and SimpleAuthority). The problem is that it's impossible now to pass the > credentials (cassandra.output.keyspace.username and > cassandra.output.keyspace.passwd) to org.apache.cassandra.hadoop.ConfigHelper > because of no setters for these variables. Moreover, even if they could be > passed, nothing will change because they are unused - ExternalClient class > from org.apache.cassandra.hadoop.BulkRecordWriter is not making use of them; > it's not even receiving them and no authorization is provided. > The proposed improvement is to make it possible to authenticate user when > loading data to Cassandra with BulkRecordWriter by adding appropriate setters > to ConfigHelper and then passing credentials to ExternalClient class so it > could use it for authorization request. > I have created a patch for this which I attach. > This improvement was made in the way that does not charm existing > ExternalClient interface usage, but I think that it would be a bit nicer way > to call the new constructor every time (optionally with username and password > set to null) in this code and keeping the old one, instead of having and > using two different constructors in two different cases in one method. > However, it's my first patch for Cassandra, so I submit a less "agressive" > one and I'm waiting for suggestions for to modify it :) -- 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