Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-4155

Make possible to authenticate user when loading data to Cassandra with BulkRecordWriter.



    • Type: Improvement
    • Status: Resolved
    • Priority: Low
    • Resolution: Fixed
    • Fix Version/s: 1.1.1
    • Component/s: None
    • Labels:


      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


        1. trunk-4155-updated-1.txt
          5 kB
          Michał Michalski
        2. trunk-4155-nicer-version.txt
          5 kB
          Michał Michalski
        3. trunk-4155.txt
          5 kB
          Michał Michalski



            • Assignee:
              michalm Michał Michalski
              michalm Michał Michalski
              Michał Michalski
              Brandon Williams
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: