yifan-c commented on code in PR #183:
URL:
https://github.com/apache/cassandra-analytics/pull/183#discussion_r2975959891
##########
cassandra-four-zero-bridge/src/main/java/org/apache/cassandra/spark/reader/CompactionStreamScanner.java:
##########
@@ -117,15 +118,16 @@ protected void handleCellTombstoneInComplex(BigInteger
token, Cell<?> cell)
@Override
UnfilteredPartitionIterator initializePartitions()
{
- int nowInSec = timeProvider.referenceEpochInSeconds();
+ long nowInSec = timeProvider.referenceEpochInSeconds();
Keyspace keyspace = Keyspace.openWithoutSSTables(metadata.keyspace);
ColumnFamilyStore cfStore =
keyspace.getColumnFamilyStore(metadata.name);
controller = new PurgingCompactionController(cfStore,
CompactionParams.TombstoneOption.NONE);
List<ISSTableScanner> scannerList = toCompact.stream()
.map(Scannable::scanner)
.collect(Collectors.toList());
scanners = new AbstractCompactionStrategy.ScannerList(scannerList);
- ci = new CompactionIterator(OperationType.COMPACTION,
scanners.scanners, controller, nowInSec, taskId);
+ // C* 4.0 CompactionIterator requires int for nowInSec; checked cast
will throw after Y2038
+ ci = new CompactionIterator(OperationType.COMPACTION,
scanners.scanners, controller, Ints.checkedCast(nowInSec), taskId);
Review Comment:
Right. My point is that the method is **unnecessary**, not **incorrect**.
CDC consumes live valid data from Cassandra. So it is already guaranteed by the
upstream system the data is valid.
--
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]