Examples of flushCommits()


Examples of org.apache.hadoop.hbase.client.HTable.flushCommits()

            getValue(batchId, i, j));
      }
      put.setDurability(Durability.SKIP_WAL);
      table.put(put);
    }
    table.flushCommits();
    table.close();
  }

  static void verifyTestDataBatch(Configuration conf, String tableName,
      int batchId) throws Exception {
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTable.flushCommits()

      p.add(HConstants.CATALOG_FAMILY, HConstants.SPLITA_QUALIFIER,
        Writables.getBytes(a));
      p.add(HConstants.CATALOG_FAMILY, HConstants.SPLITB_QUALIFIER,
        Writables.getBytes(b));
      meta.put(p);
      meta.flushCommits();
      TEST_UTIL.getHBaseAdmin().flush(HConstants.META_TABLE_NAME);

      HBaseFsck hbck = doFsck(conf, false);
      assertErrors(hbck, new ERROR_CODE[] {
        ERROR_CODE.LINGERING_SPLIT_PARENT, ERROR_CODE.HOLE_IN_REGION_CHAIN});
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTable.flushCommits()

      undeployRegion(admin, hris.get(daughters.getFirst()), daughters.getFirst());
      undeployRegion(admin, hris.get(daughters.getSecond()), daughters.getSecond());

      meta.delete(new Delete(daughters.getFirst().getRegionName()));
      meta.delete(new Delete(daughters.getSecond().getRegionName()));
      meta.flushCommits();

      HBaseFsck hbck = doFsck(conf, false);
      assertErrors(hbck, new ERROR_CODE[] {ERROR_CODE.NOT_IN_META_OR_DEPLOYED,
          ERROR_CODE.NOT_IN_META_OR_DEPLOYED, ERROR_CODE.HOLE_IN_REGION_CHAIN}); //no LINGERING_SPLIT_PARENT
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTable.flushCommits()

    HTable table = new HTable(UTIL.getConfiguration(), "primary");
    Put p = new Put(new byte[] { 'a' });
    p.add(family, null, new byte[] { 'a' });
    table.put(p);
    table.flushCommits();
    table.close();

    HTable target = new HTable(UTIL.getConfiguration(), otherTable);
    assertTrue("Didn't complete update to target table!", completeCheck[0]);
    assertEquals("Didn't find inserted row", 1, getKeyValueCount(target));
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTable.flushCommits()

    // put a row and flush it to disk
    Put put = new Put(ROW);
    put.add(A, A, A);
    table.put(put);
    table.flushCommits();

    HRegionServer rs = UTIL.getRSForFirstRegionInTable(desc.getName());
    List<HRegion> regions = rs.getOnlineRegions(desc.getName());
    assertEquals("More than 1 region serving test table with 1 row", 1, regions.size());
    HRegion region = regions.get(0);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTable.flushCommits()

    // put another row and flush that too
    put = new Put(Bytes.toBytes("anotherrow"));
    put.add(A, A, A);
    table.put(put);
    table.flushCommits();
    admin.flush(region.getRegionName());

    // run a compaction, which normally would should get rid of the data
    Store s = region.getStores().get(A);
    CompactionRequest request = new CompactionRequest(region, s, Store.PRIORITY_USER);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTable.flushCommits()

      put = new Put(ROW_2);
      put.add(COLUMN_1, QUALIFIER_1, TS_1, VALUE_1);
      put.add(COLUMN_1, QUALIFIER_1, TS_2, VALUE_2);
      put.add(COLUMN_2, QUALIFIER_2, TS_2, VALUE_2);
      table.put(put);
      table.flushCommits();
    } finally {
      if (null != table) table.close();
    }
    remoteTable = new RemoteHTable(
      new Client(new Cluster().add("localhost",
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTable.flushCommits()

        if (!del.isEmpty()) {
          table.delete(del);
        }
      }
      LOG.info("Initiating flush #" + iFlush + " for table " + tableName);
      table.flushCommits();
      if (hbaseCluster != null) {
        getMiniHBaseCluster().flushcache(table.getName());
      }
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTable.flushCommits()

    key = 0;
    key = put(joinTable, key, "zebra");
    key = put(joinTable, key, "donkey");
    key = put(joinTable, key, "bird");
    key = put(joinTable, key, "horse");
    joinTable.flushCommits();

    Scan joinScan = new Scan();
    joinScan.addFamily(WORD_COLFAM);
    PTable<ImmutableBytesWritable, Result> other = pipeline.read(FromHBase.table(joinTableName, joinScan));
    PCollection<String> joined = words.join(other).parallelDo(new StringifyFn(), Writables.strings());
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTable.flushCommits()

        = new org.apache.hadoop.hbase.client.Delete(Bytes.toBytes(val));

      HTable table = new HTable(getConf(), getTableName(getConf()));

      table.delete(delete);
      table.flushCommits();
      table.close();

      System.out.println("Delete successful");
      return 0;
    }
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.