@Override protected void preCommitWritersInternal() throws IOException { if (LOG.isDebugEnabled()) { LOG.debug("Stopping with " + cellsInCurrentWriter + " kvs in last writer" + ((this.sourceScanner == null) ? "" : ("; observed estimated " + this.sourceScanner.getEstimatedNumberOfKvsScanned() + " KVs total"))); } if (lastCell != null) { sanityCheckRight(right, lastCell); } // When expired stripes were going to be merged into one, and if no writer was created during // the compaction, we need to create an empty file to preserve metadata. if (existingWriters.isEmpty() && 1 == targetCount) { if (LOG.isDebugEnabled()) { LOG.debug("Merge expired stripes into one, create an empty file to preserve metadata."); } boundaries.add(left); existingWriters.add(writerFactory.createWriter()); } this.boundaries.add(right); } }
if (this.sourceScanner != null) { cellsSeen = Math.max(cellsSeen, this.sourceScanner.getEstimatedNumberOfKvsScanned() - cellsSeenInPrevious);
@Override protected void commitWritersInternal() throws IOException { if (LOG.isDebugEnabled()) { LOG.debug("Stopping with " + cellsInCurrentWriter + " kvs in last writer" + ((this.sourceScanner == null) ? "" : ("; observed estimated " + this.sourceScanner.getEstimatedNumberOfKvsScanned() + " KVs total"))); } if (lastCell != null) { sanityCheckRight( right, lastCell.getRowArray(), lastCell.getRowOffset(), lastCell.getRowLength()); } // When expired stripes were going to be merged into one, and if no writer was created during // the compaction, we need to create an empty file to preserve metadata. if (existingWriters.isEmpty() && 1 == targetCount) { if (LOG.isDebugEnabled()) { LOG.debug("Merge expired stripes into one, create an empty file to preserve metadata."); } boundaries.add(left); existingWriters.add(writerFactory.createWriter()); } this.boundaries.add(right); } }
if (this.sourceScanner != null) { cellsSeen = Math.max(cellsSeen, this.sourceScanner.getEstimatedNumberOfKvsScanned() - cellsSeenInPrevious);