jberragan commented on code in PR #206:
URL:
https://github.com/apache/cassandra-analytics/pull/206#discussion_r3659735685
##########
cassandra-four-zero-bridge/src/main/java/org/apache/cassandra/spark/reader/SummaryDbUtils.java:
##########
@@ -113,9 +119,17 @@ static Summary readSummary(InputStream summaryStream,
try (DataInputStream is = new DataInputStream(summaryStream))
{
IndexSummary indexSummary =
IndexSummary.serializer.deserialize(is, partitioner, minIndexInterval,
maxIndexInterval);
- DecoratedKey firstKey =
partitioner.decorateKey(ByteBufferUtil.readWithLength(is));
- DecoratedKey lastKey =
partitioner.decorateKey(ByteBufferUtil.readWithLength(is));
- return new Summary(indexSummary, firstKey, lastKey);
+ try
+ {
+ DecoratedKey firstKey =
partitioner.decorateKey(ByteBufferUtil.readWithLength(is));
+ DecoratedKey lastKey =
partitioner.decorateKey(ByteBufferUtil.readWithLength(is));
+ return new Summary(indexSummary, firstKey, lastKey);
+ }
+ catch (IOException | RuntimeException exception)
+ {
+ indexSummary.close();
Review Comment:
This is a separate known issue, I think it is already being fixed in
https://github.com/apache/cassandra-analytics/pull/138.
Please don't call `indexSummary.close()`, iirc it resulted in in seg. faults
(SIGSEGV) due to the way Casandra references tracks.
--
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]