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


##########
cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/DirectStreamSession.java:
##########
@@ -85,12 +85,17 @@ protected void onSSTablesProduced(Set<SSTableDescriptor> 
sstables)
                 // 3. send the sstables to all replicas
                 // 4. remove the sstables once sent
                 Map<Path, Digest> fileDigests = 
sstableWriter.prepareSStablesToSend(writerContext, sstables);
-                recordStreamedFiles(fileDigests.keySet());
-                fileDigests.keySet()
-                           .stream()
-                           .filter(p -> 
p.getFileName().toString().endsWith(FileType.DATA.getFileSuffix()))
-                           .forEach(this::sendSStableToReplicas);
-                LOGGER.info("[{}]: Sent SSTables. sstables={}", sessionID, 
sstableWriter.sstableCount());
+                // retain only the SSTable data components
+                Set<Path> newSSTables = fileDigests.keySet()

Review Comment:
   yep. it works better. 
   I am actually using `org.apache.cassandra.util.IntWrapper` as the counter, 
as there is no concurrency requirement. 



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