Search in sources :

Example 6 with StoreFileScanner

use of org.apache.hadoop.hbase.regionserver.StoreFileScanner in project hbase by apache.

the class TestMobFile method testGetScanner.

@Test
public void testGetScanner() throws Exception {
    Path testDir = TEST_UTIL.getDataTestDir();
    FileSystem fs = testDir.getFileSystem(conf);
    HFileContext meta = new HFileContextBuilder().withBlockSize(8 * 1024).build();
    StoreFileWriter writer = new StoreFileWriter.Builder(conf, cacheConf, fs).withOutputDir(testDir).withFileContext(meta).build();
    MobTestUtil.writeStoreFile(writer, getName());
    MobFile mobFile = new MobFile(new StoreFile(fs, writer.getPath(), conf, cacheConf, BloomType.NONE));
    assertNotNull(mobFile.getScanner());
    assertTrue(mobFile.getScanner() instanceof StoreFileScanner);
}
Also used : Path(org.apache.hadoop.fs.Path) StoreFileWriter(org.apache.hadoop.hbase.regionserver.StoreFileWriter) FileSystem(org.apache.hadoop.fs.FileSystem) StoreFile(org.apache.hadoop.hbase.regionserver.StoreFile) HFileContextBuilder(org.apache.hadoop.hbase.io.hfile.HFileContextBuilder) HFileContext(org.apache.hadoop.hbase.io.hfile.HFileContext) StoreFileScanner(org.apache.hadoop.hbase.regionserver.StoreFileScanner) Test(org.junit.Test)

Aggregations

StoreFileScanner (org.apache.hadoop.hbase.regionserver.StoreFileScanner)6 ArrayList (java.util.ArrayList)5 InternalScanner (org.apache.hadoop.hbase.regionserver.InternalScanner)4 ScanType (org.apache.hadoop.hbase.regionserver.ScanType)4 List (java.util.List)3 Configuration (org.apache.hadoop.conf.Configuration)3 FileSystem (org.apache.hadoop.fs.FileSystem)3 HBaseConfiguration (org.apache.hadoop.hbase.HBaseConfiguration)3 HColumnDescriptor (org.apache.hadoop.hbase.HColumnDescriptor)3 HRegionInfo (org.apache.hadoop.hbase.HRegionInfo)3 Store (org.apache.hadoop.hbase.regionserver.Store)3 StoreFile (org.apache.hadoop.hbase.regionserver.StoreFile)3 ScanInfo (org.apache.hadoop.hbase.regionserver.ScanInfo)2 Scanner (org.apache.hadoop.hbase.regionserver.compactions.TestCompactor.Scanner)2 ImmutableList (com.google.common.collect.ImmutableList)1 IOException (java.io.IOException)1 InterruptedIOException (java.io.InterruptedIOException)1 Path (org.apache.hadoop.fs.Path)1 Cell (org.apache.hadoop.hbase.Cell)1 HFileContext (org.apache.hadoop.hbase.io.hfile.HFileContext)1