You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/11/19 22:06:56 UTC

[GitHub] vtkstef commented on a change in pull request #6782: [FLINK-9083][Cassandra Connector] Add async backpressure support to Cassandra Connector

vtkstef commented on a change in pull request #6782: [FLINK-9083][Cassandra Connector] Add async backpressure support to Cassandra Connector
URL: https://github.com/apache/flink/pull/6782#discussion_r234799715
 
 

 ##########
 File path: flink-connectors/flink-connector-cassandra/src/main/java/org/apache/flink/streaming/connectors/cassandra/CassandraSinkBase.java
 ##########
 @@ -45,73 +48,63 @@
  */
 public abstract class CassandraSinkBase<IN, V> extends RichSinkFunction<IN> implements CheckpointedFunction {
 	protected final Logger log = LoggerFactory.getLogger(getClass());
+
+	// --------------------------- Cassandra Fields ---------------------------
+
+	private final ClusterBuilder builder;
+
 	protected transient Cluster cluster;
 	protected transient Session session;
 
-	protected transient volatile Throwable exception;
-	protected transient FutureCallback<V> callback;
+	// ------------------------ Synchronization Fields ------------------------
 
-	private final ClusterBuilder builder;
+	private AtomicReference<Throwable> throwable;
+	private Semaphore semaphore;
+	private Phaser phaser;
 
 Review comment:
   Have you considered Guava's rate limiter? If so, I am curious, what made you choose using Phaser and semaphore together instead of the rate limiter? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services