Examples of HFileContextBuilder


Examples of org.apache.hadoop.hbase.io.hfile.HFileContextBuilder

        "regionname"), "familyname");
    HFileSystem hfs = (HFileSystem)util.getTestFileSystem();
    FaultyFileSystem faultyfs = new FaultyFileSystem(hfs.getBackingFs());
    FileSystem fs = new HFileSystem(faultyfs);
    CacheConfig cacheConf = new CacheConfig(util.getConfiguration());
    HFileContext meta = new HFileContextBuilder().withBlockSize(2 * 1024).build();
    StoreFile.Writer writer = new StoreFile.WriterBuilder(
        util.getConfiguration(), cacheConf, hfs)
            .withOutputDir(hfilePath)
            .withFileContext(meta)
            .build();
View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.HFileContextBuilder

        "regionname"), "familyname");
    HFileSystem hfs = (HFileSystem)util.getTestFileSystem();
    FaultyFileSystem faultyfs = new FaultyFileSystem(hfs.getBackingFs());
    HFileSystem fs = new HFileSystem(faultyfs);
    CacheConfig cacheConf = new CacheConfig(util.getConfiguration());
    HFileContext meta = new HFileContextBuilder().withBlockSize(2 * 1024).build();
    StoreFile.Writer writer = new StoreFile.WriterBuilder(
        util.getConfiguration(), cacheConf, hfs)
            .withOutputDir(hfilePath)
            .withFileContext(meta)
            .build();
View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.HFileContextBuilder

        byte[] startKey, byte[] endKey, int numRows) throws IOException {

      HFile.Writer writer = null;
      long now = System.currentTimeMillis();
      try {
        HFileContext context = new HFileContextBuilder().build();
        writer = HFile.getWriterFactory(conf, new CacheConfig(conf))
            .withPath(fs, path)
            .withFileContext(context)
            .create();
        // subtract 2 since numRows doesn't include boundary keys
View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.HFileContextBuilder

  /**
   * Create an HFile with the given number of rows with a specified value.
   */
  public static void createHFile(FileSystem fs, Path path, byte[] family,
      byte[] qualifier, byte[] value, int numRows) throws IOException {
    HFileContext context = new HFileContextBuilder().withBlockSize(BLOCKSIZE)
                            .withCompression(COMPRESSION)
                            .build();
    HFile.Writer writer = HFile
        .getWriterFactory(conf, new CacheConfig(conf))
        .withPath(fs, path)
View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.HFileContextBuilder

    Path hfilePath = new Path(new Path(
        TEST_UTIL.getDataTestDir("testReversibleStoreFileScanner"),
        "regionname"), "familyname");
    CacheConfig cacheConf = new CacheConfig(TEST_UTIL.getConfiguration());
    for (DataBlockEncoding encoding : DataBlockEncoding.values()) {
      HFileContextBuilder hcBuilder = new HFileContextBuilder();
      hcBuilder.withBlockSize(2 * 1024);
      hcBuilder.withDataBlockEncoding(encoding);
      HFileContext hFileContext = hcBuilder.build();
      StoreFile.Writer writer = new StoreFile.WriterBuilder(
          TEST_UTIL.getConfiguration(), cacheConf, fs).withOutputDir(hfilePath)
          .withFileContext(hFileContext).build();
      writeStoreFile(writer);

View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.HFileContextBuilder

    FileSystem fs = TEST_UTIL.getTestFileSystem();
    Path hfilePath = new Path(new Path(
        TEST_UTIL.getDataTestDir("testReversibleKeyValueHeap"), "regionname"),
        "familyname");
    CacheConfig cacheConf = new CacheConfig(TEST_UTIL.getConfiguration());
    HFileContextBuilder hcBuilder = new HFileContextBuilder();
    hcBuilder.withBlockSize(2 * 1024);
    HFileContext hFileContext = hcBuilder.build();
    StoreFile.Writer writer1 = new StoreFile.WriterBuilder(
        TEST_UTIL.getConfiguration(), cacheConf, fs).withOutputDir(
        hfilePath).withFileContext(hFileContext).build();
    StoreFile.Writer writer2 = new StoreFile.WriterBuilder(
        TEST_UTIL.getConfiguration(), cacheConf, fs).withOutputDir(
View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.HFileContextBuilder

    FileSystem fs = TEST_UTIL.getTestFileSystem();
    Path hfilePath = new Path(new Path(
        TEST_UTIL.getDataTestDir("testReversibleStoreScanner"), "regionname"),
        "familyname");
    CacheConfig cacheConf = new CacheConfig(TEST_UTIL.getConfiguration());
    HFileContextBuilder hcBuilder = new HFileContextBuilder();
    hcBuilder.withBlockSize(2 * 1024);
    HFileContext hFileContext = hcBuilder.build();
    StoreFile.Writer writer1 = new StoreFile.WriterBuilder(
        TEST_UTIL.getConfiguration(), cacheConf, fs).withOutputDir(
        hfilePath).withFileContext(hFileContext).build();
    StoreFile.Writer writer2 = new StoreFile.WriterBuilder(
        TEST_UTIL.getConfiguration(), cacheConf, fs).withOutputDir(
View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.HFileContextBuilder

    StoreFile f = this.store.getStorefiles().iterator().next();
    Path storedir = f.getPath().getParent();
    long seqid = f.getMaxSequenceId();
    Configuration c = HBaseConfiguration.create();
    FileSystem fs = FileSystem.get(c);
    HFileContext meta = new HFileContextBuilder().withBlockSize(BLOCKSIZE_SMALL).build();
    StoreFile.Writer w = new StoreFile.WriterBuilder(c, new CacheConfig(c),
        fs)
            .withOutputDir(storedir)
            .withFileContext(meta)
            .build();
View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.HFileContextBuilder

    StoreFile f = this.store.getStorefiles().iterator().next();
    Path storedir = f.getPath().getParent();
    long seqid = this.store.getMaxSequenceId();
    Configuration c = TEST_UTIL.getConfiguration();
    FileSystem fs = FileSystem.get(c);
    HFileContext fileContext = new HFileContextBuilder().withBlockSize(BLOCKSIZE_SMALL).build();
    StoreFile.Writer w = new StoreFile.WriterBuilder(c, new CacheConfig(c),
        fs)
            .withOutputDir(storedir)
            .withFileContext(fileContext)
            .build();
View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.HFileContextBuilder

    final HRegionInfo hri =
        new HRegionInfo(TableName.valueOf("testBasicHalfMapFileTb"));
    HRegionFileSystem regionFs = HRegionFileSystem.createRegionOnFileSystem(
      conf, fs, new Path(this.testDir, hri.getTable().getNameAsString()), hri);

    HFileContext meta = new HFileContextBuilder().withBlockSize(2*1024).build();
    StoreFile.Writer writer = new StoreFile.WriterBuilder(conf, cacheConf, this.fs)
            .withFilePath(regionFs.createTempName())
            .withFileContext(meta)
            .build();
    writeStoreFile(writer);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.