Java Code Examples for org.apache.hadoop.hbase.KeyValueUtil#toNewKeyCell()

The following examples show how to use org.apache.hadoop.hbase.KeyValueUtil#toNewKeyCell() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StoreScanner.java    From hbase with Apache License 2.0 6 votes vote down vote up
@Override
public void shipped() throws IOException {
  if (prevCell != null) {
    // Do the copy here so that in case the prevCell ref is pointing to the previous
    // blocks we can safely release those blocks.
    // This applies to blocks that are got from Bucket cache, L1 cache and the blocks
    // fetched from HDFS. Copying this would ensure that we let go the references to these
    // blocks so that they can be GCed safely(in case of bucket cache)
    prevCell = KeyValueUtil.toNewKeyCell(this.prevCell);
  }
  matcher.beforeShipped();
  // There wont be further fetch of Cells from these scanners. Just close.
  clearAndClose(scannersForDelayedClose);
  if (this.heap != null) {
    this.heap.shipped();
    // When switching from pread to stream, we will open a new scanner for each store file, but
    // the old scanner may still track the HFileBlocks we have scanned but not sent back to client
    // yet. If we close the scanner immediately then the HFileBlocks may be messed up by others
    // before we serialize and send it back to client. The HFileBlocks will be released in shipped
    // method, so we here will also open new scanners and close old scanners in shipped method.
    // See HBASE-18055 for more details.
    trySwitchToStreamRead();
  }
}
 
Example 2
Source File: UserScanQueryMatcher.java    From hbase with Apache License 2.0 5 votes vote down vote up
@Override
public void beforeShipped() throws IOException {
  super.beforeShipped();
  if (curColCell != null) {
    this.curColCell = KeyValueUtil.toNewKeyCell(this.curColCell);
  }
}
 
Example 3
Source File: HFileWriterImpl.java    From hbase with Apache License 2.0 5 votes vote down vote up
@Override
public void beforeShipped() throws IOException {
  this.blockWriter.beforeShipped();
  // Add clone methods for every cell
  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);
  }
}
 
Example 4
Source File: ScanWildcardColumnTracker.java    From hbase with Apache License 2.0 4 votes vote down vote up
@Override
public void beforeShipped() {
  if (columnCell != null) {
    this.columnCell = KeyValueUtil.toNewKeyCell(this.columnCell);
  }
}
 
Example 5
Source File: ScanDeleteTracker.java    From hbase with Apache License 2.0 4 votes vote down vote up
@Override
public void beforeShipped() throws IOException {
  if (deleteCell != null) {
    deleteCell = KeyValueUtil.toNewKeyCell(deleteCell);
  }
}
 
Example 6
Source File: CompoundBloomFilterWriter.java    From hbase with Apache License 2.0 4 votes vote down vote up
@Override
public void beforeShipped() throws IOException {
  if (this.prevCell != null) {
    this.prevCell = KeyValueUtil.toNewKeyCell(this.prevCell);
  }
}
 
Example 7
Source File: RowIndexEncoderV1.java    From hbase with Apache License 2.0 4 votes vote down vote up
void beforeShipped() {
  if (this.lastCell != null) {
    this.lastCell = KeyValueUtil.toNewKeyCell(this.lastCell);
  }
}