Search in sources :

Example 6 with Reference

use of org.apache.hadoop.hbase.io.Reference in project hbase by apache.

the class LoadIncrementalHFiles method splitStoreFile.

/**
   * Split a storefile into a top and bottom half, maintaining
   * the metadata, recreating bloom filters, etc.
   */
static void splitStoreFile(Configuration conf, Path inFile, HColumnDescriptor familyDesc, byte[] splitKey, Path bottomOut, Path topOut) throws IOException {
    // Open reader with no block cache, and not in-memory
    Reference topReference = Reference.createTopReference(splitKey);
    Reference bottomReference = Reference.createBottomReference(splitKey);
    copyHFileHalf(conf, inFile, topOut, topReference, familyDesc);
    copyHFileHalf(conf, inFile, bottomOut, bottomReference, familyDesc);
}
Also used : Reference(org.apache.hadoop.hbase.io.Reference)

Aggregations

Reference (org.apache.hadoop.hbase.io.Reference)6 Path (org.apache.hadoop.fs.Path)5 FileSystem (org.apache.hadoop.fs.FileSystem)2 InputStream (java.io.InputStream)1 OutputStream (java.io.OutputStream)1 Cell (org.apache.hadoop.hbase.Cell)1 HBaseTestingUtility (org.apache.hadoop.hbase.HBaseTestingUtility)1 HColumnDescriptor (org.apache.hadoop.hbase.HColumnDescriptor)1 HRegionInfo (org.apache.hadoop.hbase.HRegionInfo)1 HTableDescriptor (org.apache.hadoop.hbase.HTableDescriptor)1 Result (org.apache.hadoop.hbase.client.Result)1 RegionActionResult (org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.RegionActionResult)1 Test (org.junit.Test)1