public Object call() throws IOException { try { doValidationCompaction(cfStore, validator); } catch (Throwable e) { // we need to inform the remote end of our failure, otherwise it will hang on repair forever validator.fail(); throw e; } return this; } };
/** * Called (in order) for every row present in the CF. * Hashes the row, and adds it to the tree being built. * * @param partition Partition to add hash */ public void add(UnfilteredRowIterator partition) { assert Range.isInRanges(partition.partitionKey().getToken(), desc.ranges) : partition.partitionKey().getToken() + " is not contained in " + desc.ranges; assert lastKey == null || lastKey.compareTo(partition.partitionKey()) < 0 : "partition " + partition.partitionKey() + " received out of order wrt " + lastKey; lastKey = partition.partitionKey(); if (range == null) range = ranges.next(); // generate new ranges as long as case 1 is true if (!findCorrectRange(lastKey.getToken())) { // add the empty hash, and move to the next range ranges = trees.invalids(); findCorrectRange(lastKey.getToken()); } assert range.contains(lastKey.getToken()) : "Token not in MerkleTree: " + lastKey.getToken(); // case 3 must be true: mix in the hashed row RowHash rowHash = rowHash(partition); if (rowHash != null) { range.addHash(rowHash); } }
/** * Registers the newly created tree for rendezvous in Stage.ANTIENTROPY. */ public void complete() { completeTree(); StageManager.getStage(Stage.ANTI_ENTROPY).execute(this); if (logger.isDebugEnabled()) { // log distribution of rows in tree logger.debug("Validated {} partitions for {}. Partitions per leaf are:", validated, desc.sessionId); trees.logRowCountPerLeaf(logger); logger.debug("Validated {} partitions for {}. Partition sizes are:", validated, desc.sessionId); trees.logRowSizePerLeaf(logger); } }
Validator validator = new Validator(desc, message.from, validationRequest.gcBefore); CompactionManager.instance.submitValidation(store, validator); break;
/** * Called (in order) for every row present in the CF. * Hashes the row, and adds it to the tree being built. * * @param row Row to add hash */ public void add(AbstractCompactedRow row) { assert desc.range.contains(row.key.getToken()) : row.key.getToken() + " is not contained in " + desc.range; assert lastKey == null || lastKey.compareTo(row.key) < 0 : "row " + row.key + " received out of order wrt " + lastKey; lastKey = row.key; if (range == null) range = ranges.next(); // generate new ranges as long as case 1 is true while (!range.contains(row.key.getToken())) { // add the empty hash, and move to the next range range.ensureHashInitialised(); range = ranges.next(); } // case 3 must be true: mix in the hashed row RowHash rowHash = rowHash(row); if (rowHash != null) { range.addHash(rowHash); } }
/** * Called (in order) for every row present in the CF. * Hashes the row, and adds it to the tree being built. * * @param partition Partition to add hash */ public void add(UnfilteredRowIterator partition) { assert Range.isInRanges(partition.partitionKey().getToken(), desc.ranges) : partition.partitionKey().getToken() + " is not contained in " + desc.ranges; assert lastKey == null || lastKey.compareTo(partition.partitionKey()) < 0 : "partition " + partition.partitionKey() + " received out of order wrt " + lastKey; lastKey = partition.partitionKey(); if (range == null) range = ranges.next(); // generate new ranges as long as case 1 is true if (!findCorrectRange(lastKey.getToken())) { // add the empty hash, and move to the next range ranges = trees.invalids(); findCorrectRange(lastKey.getToken()); } assert range.contains(lastKey.getToken()) : "Token not in MerkleTree: " + lastKey.getToken(); // case 3 must be true: mix in the hashed row RowHash rowHash = rowHash(partition); if (rowHash != null) { range.addHash(rowHash); } }
/** * Registers the newly created tree for rendezvous in Stage.ANTIENTROPY. */ public void complete() { completeTree(); StageManager.getStage(Stage.ANTI_ENTROPY).execute(this); if (logger.isDebugEnabled()) { // log distribution of rows in tree logger.debug("Validated {} partitions for {}. Partitions per leaf are:", validated, desc.sessionId); trees.logRowCountPerLeaf(logger); logger.debug("Validated {} partitions for {}. Partition sizes are:", validated, desc.sessionId); trees.logRowSizePerLeaf(logger); } }
Validator validator = new Validator(desc, message.from, validationRequest.gcBefore); CompactionManager.instance.submitValidation(store, validator); break;
/** * Called (in order) for every row present in the CF. * Hashes the row, and adds it to the tree being built. * * @param partition Partition to add hash */ public void add(UnfilteredRowIterator partition) { assert Range.isInRanges(partition.partitionKey().getToken(), desc.ranges) : partition.partitionKey().getToken() + " is not contained in " + desc.ranges; assert lastKey == null || lastKey.compareTo(partition.partitionKey()) < 0 : "partition " + partition.partitionKey() + " received out of order wrt " + lastKey; lastKey = partition.partitionKey(); if (range == null) range = ranges.next(); // generate new ranges as long as case 1 is true if (!findCorrectRange(lastKey.getToken())) { // add the empty hash, and move to the next range ranges = trees.invalids(); findCorrectRange(lastKey.getToken()); } assert range.contains(lastKey.getToken()) : "Token not in MerkleTree: " + lastKey.getToken(); // case 3 must be true: mix in the hashed row RowHash rowHash = rowHash(partition); if (rowHash != null) { range.addHash(rowHash); } }
public Object call() throws IOException { try { doValidationCompaction(cfStore, validator); } catch (Throwable e) { // we need to inform the remote end of our failure, otherwise it will hang on repair forever validator.fail(); throw e; } return this; } };
/** * Registers the newly created tree for rendezvous in Stage.ANTIENTROPY. */ public void complete() { completeTree(); StageManager.getStage(Stage.ANTI_ENTROPY).execute(this); if (logger.isDebugEnabled()) { // log distribution of rows in tree logger.debug("Validated {} partitions for {}. Partitions per leaf are:", validated, desc.sessionId); trees.logRowCountPerLeaf(logger); logger.debug("Validated {} partitions for {}. Partition sizes are:", validated, desc.sessionId); trees.logRowSizePerLeaf(logger); } }
Validator validator = new Validator(desc, message.from, validationRequest.gcBefore); CompactionManager.instance.submitValidation(store, validator); break;
public Object call() throws IOException { try { doValidationCompaction(cfStore, validator); } catch (Throwable e) { // we need to inform the remote end of our failure, otherwise it will hang on repair forever validator.fail(); throw e; } return this; } };
/** * Registers the newly created tree for rendezvous in Stage.ANTIENTROPY. */ public void complete() { completeTree(); StageManager.getStage(Stage.ANTI_ENTROPY).execute(this); if (logger.isDebugEnabled()) { // log distribution of rows in tree logger.debug("Validated {} partitions for {}. Partitions per leaf are:", validated, desc.sessionId); tree.histogramOfRowCountPerLeaf().log(logger); logger.debug("Validated {} partitions for {}. Partition sizes are:", validated, desc.sessionId); tree.histogramOfRowSizePerLeaf().log(logger); } }
Validator validator = new Validator(desc, message.from, validationRequest.gcBefore); CompactionManager.instance.submitValidation(store, validator); break;
public Object call() throws IOException { try { doValidationCompaction(cfStore, validator); } catch (Throwable e) { // we need to inform the remote end of our failure, otherwise it will hang on repair forever validator.fail(); throw e; } return this; } };