Examples of flushCommits()


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()

          put.add(COLUMNFAMILY, Bytes.toBytes("col_c"),
              ("Text_" + i).getBytes());
          table.put(put);
        }
      }
      table.flushCommits();
    }
  }

  /**
     * Helper to deal with fetching a result based on a cf:colname string spec
View Full Code Here

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

        table.put(put);
        if (LOG.isDebugEnabled()) {
          LOG.debug("PUT " + put.toString());
        }
      }
      table.flushCommits();
      ResponseBuilder response = Response.ok();
      return response.build();
    } catch (IOException e) {
      throw new WebApplicationException(e,
                  Response.Status.SERVICE_UNAVAILABLE);
View Full Code Here

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

      table = pool.getTable(this.table);
      table.put(put);
      if (LOG.isDebugEnabled()) {
        LOG.debug("PUT " + put.toString());
      }
      table.flushCommits();
      return Response.ok().build();
    } catch (IOException e) {
      throw new WebApplicationException(e,
                  Response.Status.SERVICE_UNAVAILABLE);
    } finally {
View Full Code Here

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

      table = pool.getTable(this.table);
      table.delete(delete);
      if (LOG.isDebugEnabled()) {
        LOG.debug("DELETE " + delete.toString());
      }
      table.flushCommits();
    } catch (IOException e) {
      throw new WebApplicationException(e,
                  Response.Status.SERVICE_UNAVAILABLE);
    } finally {
      if (table != null) {
View Full Code Here

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

    Put put = new Put(ROW);
    put.add(A, A, A);
    put.add(B, B, B);
    put.add(C, C, C);
    table.put(put);
    table.flushCommits();

    cluster.killRegionServer(rs1.getRegionServer().getServerName());
    Threads.sleep(20000); // just to be sure that the kill has fully started.
    util.waitUntilAllRegionsAssigned(tableName);
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()

      // above configuration on it; else we use the old one w/ 10 as default.
      HTable table = new HTable(new Configuration(util.getConfiguration()), tableName);

      // Load some data
      util.loadTable(table, fam);
      table.flushCommits();
      util.flush();
      util.countRows(table);

      // Kill the DFS cluster
      util.getDFSCluster().shutdownDataNodes();
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.HTableInterface.flushCommits()

   }

   @Test
   public void testFlushCommits() throws Exception {
       HTableInterface hTable = getHTable();
       hTable.flushCommits();
       assertMetricsUpdated(OpType.FLUSHCOMMITS);

   }

   @Test
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.