Package org.apache.hadoop.hbase.client

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


          put.add(famAndQf[0], famAndQf[1], k);
          table.put(put);
        }
      }
    }
    table.flushCommits();
    // get the initial layout (should just be one region)
    Map<HRegionInfo,HServerAddress> m = table.getRegionsInfo();
    assertEquals(m.size(), 1);
    // tell the master to split the table
    admin.split(TABLE);
View Full Code Here


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

            count++;
          }
        }
      }
    }
    table.flushCommits();
    return count;
  }

  private static int countCellSet(CellSetModel model) {
    int count = 0;
View Full Code Here

    // add to meta.
    Put put = new Put(hri.getRegionName());
    put.add(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER,
        Writables.getBytes(hri));
    meta.put(put);
    meta.flushCommits();
    return hri;
  }

  protected void wipeOutMeta() throws IOException {
    // Mess it up by blowing up meta.
View Full Code Here

      Delete d = new Delete(r.getRow());
      dels.add(d);
      admin.unassign(r.getRow(), true);
    }
    meta.delete(dels);
    meta.flushCommits();
    scanner.close();
    meta.close();
  }

  /**
 
View Full Code Here

     
      HTable table = new HTable(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

            count++;
          }
        }
      }
    }
    table.flushCommits();
    return count;
  }

  private static int countCellSet(CellSetModel model) {
    int count = 0;
View Full Code Here

      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

        if (!del.isEmpty()) {
          table.delete(del);
        }
      }
      LOG.info("Initiating flush #" + iFlush + " for table " + tableName);
      table.flushCommits();
      hbaseCluster.flushcache(tableNameBytes);
    }

    return table;
  }
View Full Code Here

    put.add(hcd.getName(), Bytes.toBytes("q1"), Bytes.toBytes("v1"));
    mainTable.put(put);
    put = new Put(Bytes.toBytes("r5"));
    put.add(hcd.getName(), Bytes.toBytes("q1"), Bytes.toBytes("v1"));
    mainTable.put(put);
    mainTable.flushCommits();
    admin.flush(tableName);
    Delete del = new Delete(Bytes.toBytes("r3"));
    del.deleteFamily(hcd.getName());
    mainTable.delete(del);
    List<Delete> indexDelete = IndexMapReduceUtil.getIndexDelete(del, admin.getConfiguration());
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.