yifan-c commented on code in PR #9:
URL: https://github.com/apache/cassandra-analytics/pull/9#discussion_r1247271478


##########
cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/CassandraClusterInfo.java:
##########
@@ -64,11 +65,18 @@ public class CassandraClusterInfo implements ClusterInfo, 
Closeable
     protected transient GossipInfoResponse gossipInfo;
     protected transient CassandraContext cassandraContext;
     protected transient NodeSettings nodeSettings;
+    protected final transient CompletableFuture<List<NodeSettings>> 
allNodeSettings;
 
     public CassandraClusterInfo(BulkSparkConf conf)
     {
         this.conf = conf;
         this.cassandraContext = buildCassandraContext();
+        this.allNodeSettings = CompletableFuture.supplyAsync(() -> {

Review Comment:
   I think it is wasting one thread that is only used to wait for the blocking 
code to complete. The blocking code is actually a future underlying. 
`Sidecar.allNodeSettingsBlocking` could be revised to return the future 
directly, and rename the method. 



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to