public PartitionStats call()

in spark-job/src/main/java/org/apache/cassandra/diff/PartitionComparator.java [51:84]


    public PartitionStats call() {
        PartitionStats partitionStats = new PartitionStats();

        if (source == null || target == null) {
            logger.error("Skipping partition because one result was null (timeout despite retries)");
            partitionStats.skipped = true;
            return partitionStats;
        }

        while (hasNextRow(Type.SOURCE) && hasNextRow(Type.TARGET)) {

            Row sourceRow = getNextRow(Type.SOURCE);
            Row targetRow = getNextRow(Type.TARGET);

            // if primary keys don't match don't proceed any further, just mark the
            // partition as mismatched and be done
            if (!clusteringsEqual(sourceRow, targetRow)) {
                partitionStats.allClusteringsMatch = false;
                return partitionStats;
            }

            partitionStats.matchedRows++;

            // if the rows match, but there are mismatching values in the regular columns
            // we can continue processing the partition, so just flag it as mismatched and continue
            checkRegularColumnEquality(partitionStats, sourceRow, targetRow);
        }

        // if one of the iterators isn't exhausted, then there's a mismatch at the partition level
        if (hasNextRow(Type.SOURCE) || hasNextRow(Type.TARGET))
            partitionStats.allClusteringsMatch = false;

        return partitionStats;
    }