JeetKunDoug commented on code in PR #13:
URL:
https://github.com/apache/cassandra-analytics/pull/13#discussion_r1287705006
##########
cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/RecordWriter.java:
##########
@@ -114,16 +115,21 @@ public StreamResult write(Iterator<Tuple2<DecoratedKey,
Object[]>> sourceIterato
checkBatchSize(streamSession, partitionId, job);
}
- if (batchSize != 0)
+ if (sstableWriter != null)
{
- finalizeSSTable(streamSession, partitionId, sstableWriter,
batchNumber, batchSize);
+ finalizeSSTable(streamSession, partitionId, sstableWriter,
batchNumber, batchSize);
Review Comment:
Given this is essentially the last step before we're done with the
sstablewriter, we don't really need to set the sstablewriter to null here -
this RecordWriter instance should be collected as soon as the upload/commits
finish, and we close the sstablewriter on finalize so we should be good w/o
nulling it out.
--
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]