Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
0.5.0
-----
* Downgrade noisy TokenPartitioner partition/range maps to DEBUG (CASSANALYTICS-52)
* Make BulkWriterConfig extensible (CASSANALYTICS-168)

0.4.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,17 @@ private void calculateTokenRangeMap()
validateCompleteRangeCoverage();
validateRangesDoNotOverlap();

LOGGER.info("Number of partitions {}", reversePartitionMap.size());
LOGGER.info("Partition map " + partitionMap);
LOGGER.info("Reverse partition map " + reversePartitionMap);
LOGGER.debug("Number of partitions {}", reversePartitionMap.size());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have found this information useful when debugging jobs in the past. I do agree that these log messages are not needed in the majority of case. I wonder if there's a better way to control when to log this information.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably a JavaDoc comment on calculateTokenRangeMap()?

LOGGER.debug("Partition map {}", partitionMap);
LOGGER.debug("Reverse partition map {}", reversePartitionMap);
}

private static int calculateSplits(CassandraRing ring, int defaultParallelism, Integer cores)
{
int tasksToRun = Math.max(cores, defaultParallelism);
LOGGER.info("Tasks to run: {}", tasksToRun);
Map<Range<BigInteger>, List<CassandraInstance>> rangeListMap = ring.rangeMap().asMapOfRanges();
LOGGER.info("Initial ranges: {}", rangeListMap);
LOGGER.debug("Initial ranges: {}", rangeListMap);
int ranges = rangeListMap.size();
LOGGER.info("Number of ranges: {}", ranges);
int calculatedSplits = TokenPartitioner.divCeil(tasksToRun, ranges);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ public TokenPartitioner(TokenRangeMapping<RingInstance> tokenRangeMapping,

private void logPartitionInfo()
{
LOGGER.info("Number of partitions: {}", nrPartitions);
LOGGER.info("Partition map: {}", partitionMap);
LOGGER.info("Reverse partition map: {}", reversePartitionMap);
LOGGER.debug("Number of partitions: {}", nrPartitions);
LOGGER.debug("Partition map: {}", partitionMap);
LOGGER.debug("Reverse partition map: {}", reversePartitionMap);
}

/**
Expand Down Expand Up @@ -278,7 +278,7 @@ public int calculateSplits(TokenRangeMapping<RingInstance> tokenRangeMapping,
}
int tasksToRun = Math.max(cores, defaultParallelism);
Map<Range<BigInteger>, List<RingInstance>> rangeListMap = tokenRangeMapping.getRangeMap().asMapOfRanges();
LOGGER.info("Initial ranges: {}", rangeListMap);
LOGGER.debug("Initial ranges: {}", rangeListMap);
int ranges = rangeListMap.size();
LOGGER.info("Number of ranges: {}", ranges);
int calculatedSplits = divCeil(tasksToRun, ranges);
Expand Down