flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] azagrebin commented on a change in pull request #6782: [FLINK-9083][Cassandra Connector] Add async backpressure support to Cassandra Connector
Date Thu, 11 Oct 2018 15:12:22 GMT
azagrebin 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_r224475206
 
 

 ##########
 File path: flink-connectors/flink-connector-cassandra/src/main/java/org/apache/flink/streaming/connectors/cassandra/CassandraSink.java
 ##########
 @@ -354,6 +359,23 @@ protected Cluster buildCluster(Cluster.Builder builder) {
 			return this;
 		}
 
+		/**
+		 * Sets the maximum allowed number of concurrent requests for this sink.
+		 *
+		 * <p>This call has no effect if {@link CassandraSinkBuilder#enableWriteAheadLog()}
is called.
+		 *
+		 * @param maxConcurrentRequests maximum number of concurrent requests allowed
+		 * @param timeout timeout duration when acquiring a permit to execute
+		 * @param unit timeout unit when acquiring a permit to execute
+		 * @return this builder
+		 */
+		public CassandraSinkBuilder<IN> setMaxConcurrentRequests(int maxConcurrentRequests,
long timeout, TimeUnit unit) {
 
 Review comment:
   I would also add a short hand with default max timeout basically blocking the task thread:
   `setMaxConcurrentRequests(int maxConcurrentRequests);`
   In general, I think users would be more interested in blocking indefinitely case which
just propagates the back pressure upstream and it can be also seen in UI. As I understand,
now throwing TimeoutException will fail and job, it will be restarted, probably fail with
timeout again and so on. Then it is better just to block and avoid restarts.

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

Mime
View raw message