[ 
https://issues.apache.org/jira/browse/BEAM-6773?focusedWorklogId=213659&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-213659
 ]

ASF GitHub Bot logged work on BEAM-6773:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 15/Mar/19 09:43
            Start Date: 15/Mar/19 09:43
    Worklog Time Spent: 10m 
      Work Description: iemejia commented on pull request #8024: [BEAM-6773] 
Add ValueProvider to CassandraIO.Read
URL: https://github.com/apache/beam/pull/8024#discussion_r265904713
 
 

 ##########
 File path: 
sdks/java/io/cassandra/src/main/java/org/apache/beam/sdk/io/cassandra/CassandraIO.java
 ##########
 @@ -1032,6 +1108,43 @@ private static Cluster getCluster(
     return builder.build();
   }
 
+  private static Cluster getCluster(
+      ValueProvider<String> hosts,
+      ValueProvider<Integer> port,
+      ValueProvider<String> username,
+      ValueProvider<String> password,
+      String encryptedPassword,
+      PasswordDecrypter passwordDecrypter,
+      ValueProvider<String> localDc,
+      ValueProvider<String> consistencyLevel) {
+    Cluster.Builder builder =
+        
Cluster.builder().addContactPoints(hosts.get().split(",")).withPort(port.get());
+
+    if (username != null) {
+      String passwordStr = null;
+      if (encryptedPassword != null && passwordDecrypter != null) {
 
 Review comment:
   @echauchot What is the rational on this extra 'password' should not this be 
simply the normal password and the logic be decided only with passwordDecrypter 
(if passwordDecrypter we decrypt the password?). It feels really weird to have 
two methods for the password.
 
----------------------------------------------------------------
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:
[email protected]


Issue Time Tracking
-------------------

            Worklog Id:     (was: 213659)
            Time Spent: 2h  (was: 1h 50m)
    Remaining Estimate: 22h  (was: 22h 10m)

> Add ValueProvider to CassandraIO
> --------------------------------
>
>                 Key: BEAM-6773
>                 URL: https://issues.apache.org/jira/browse/BEAM-6773
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-cassandra
>            Reporter: Radosław Stankiewicz
>            Assignee: Radosław Stankiewicz
>            Priority: Major
>              Labels: features, triaged
>   Original Estimate: 24h
>          Time Spent: 2h
>  Remaining Estimate: 22h
>
> I want to add ValueProviders in Cassandra, starting with Read.
> Write and Delete will be added later when I succeed with that.
> ValueProvider should be added for all primitive types which then is easy to 
> configure with DataflowTemplates.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to