Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ protected void newBlock() throws IOException {
blockWriter.startWriting(BlockType.DATA);
firstCellInBlock = null;
if (lastCell != null) {
lastCellOfPreviousBlock = lastCell;
lastCellOfPreviousBlock = KeyValueUtil.toNewKeyCell(lastCell);
}
}

Expand Down Expand Up @@ -728,7 +728,7 @@ public void append(final Cell cell) throws IOException {
if (firstCellInBlock == null) {
// If cell is big, block will be closed and this firstCellInBlock reference will only last
// a short while.
firstCellInBlock = cell;
firstCellInBlock = KeyValueUtil.toNewKeyCell(cell);
}

// TODO: What if cell is 10MB and we write infrequently? We hold on to cell here indefinitely?
Expand All @@ -748,12 +748,6 @@ public void beforeShipped() throws IOException {
if (this.lastCell != null) {
this.lastCell = KeyValueUtil.toNewKeyCell(this.lastCell);
}
if (this.firstCellInBlock != null) {
this.firstCellInBlock = KeyValueUtil.toNewKeyCell(this.firstCellInBlock);
}
if (this.lastCellOfPreviousBlock != null) {
this.lastCellOfPreviousBlock = KeyValueUtil.toNewKeyCell(this.lastCellOfPreviousBlock);
}
}

public Cell getLastCell() {
Expand Down