cameronlee314 commented on a change in pull request #951: SAMZA-2127: Upgrade 
to Kafka 2.0
URL: https://github.com/apache/samza/pull/951#discussion_r268901338
 
 

 ##########
 File path: 
samza-kafka/src/main/java/org/apache/samza/system/kafka/KafkaSystemAdmin.java
 ##########
 @@ -594,7 +593,13 @@ public void deleteMessages(Map<SystemStreamPartition, 
String> offsets) {
           .collect(Collectors.toMap(entry ->
               new TopicPartition(entry.getKey().getStream(), 
entry.getKey().getPartition().getPartitionId()),
               entry -> 
RecordsToDelete.beforeOffset(Long.parseLong(entry.getValue()) + 1)));
-      adminClient.deleteRecords(recordsToDelete);
+
+      adminClient.deleteRecords(recordsToDelete).all().whenComplete((ignored, 
exception) -> {
+        if (exception != null) {
+          LOG.error("Delete message failed for SSPs {} due to {}", 
offsets.keySet(), exception);
 
 Review comment:
   I think this will end up not printing out the stack trace. I think you need 
to use the `LOG.error(String, Exception)` instead.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to