Package org.apache.hadoop.hbase.client

Examples of org.apache.hadoop.hbase.client.Table.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();

      // Remove daughters from regionStates
      RegionStates regionStates = TEST_UTIL.getMiniHBaseCluster().getMaster().
        getAssignmentManager().getRegionStates();
      regionStates.deleteRegion(daughters.getFirst());
View Full Code Here


    // 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.getTableName());
    List<HRegion> regions = rs.getOnlineRegions(desc.getTableName());
    assertEquals("More than 1 region serving test table with 1 row", 1, regions.size());
    HRegion region = regions.get(0);
View Full Code Here

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

    // run a compaction, which normally would should get rid of the data
    // wait for the compaction checker to complete
    latch.await();
View Full Code Here

            d = new Delete(row1);
            d.setCellVisibility(new CellVisibility(SECRET + "&" + TOPSECRET));
            d.deleteColumns(fam, qual);
            table.delete(d);
            table.flushCommits();

            d = new Delete(row1);
            d.setCellVisibility(new CellVisibility("(" + PRIVATE + "&" + CONFIDENTIAL + ")|("
                + SECRET + "&" + TOPSECRET + ")"));
            d.deleteColumns(fam, qual);
View Full Code Here

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

  /**
 
View Full Code Here

      Collection<ServerName> var = TEST_UTIL.getHBaseAdmin().getClusterStatus().getServers();
      ServerName sn = var.toArray(new ServerName[var.size()])[0];
      //add a location with replicaId as 2 (since we already have replicas with replicaid 0 and 1)
      MetaTableAccessor.addLocation(put, sn, sn.getStartcode(), 2);
      meta.put(put);
      meta.flushCommits();
      // assign the new replica
      HBaseFsckRepair.fixUnassigned(TEST_UTIL.getHBaseAdmin(), newHri);
      HBaseFsckRepair.waitUntilAssigned(TEST_UTIL.getHBaseAdmin(), newHri);
      // now reset the meta row to its original value
      Delete delete = new Delete(metaKey);
View Full Code Here

      Delete delete = new Delete(metaKey);
      delete.deleteColumns(HConstants.CATALOG_FAMILY, MetaTableAccessor.getServerColumn(2));
      delete.deleteColumns(HConstants.CATALOG_FAMILY, MetaTableAccessor.getStartCodeColumn(2));
      delete.deleteColumns(HConstants.CATALOG_FAMILY, MetaTableAccessor.getSeqNumColumn(2));
      meta.delete(delete);
      meta.flushCommits();
      meta.close();
      // check that problem exists
      HBaseFsck hbck = doFsck(conf, false);
      assertErrors(hbck, new ERROR_CODE[]{ERROR_CODE.NOT_IN_META});
      // fix the problem
View Full Code Here

      hri.setOffline(true);
      hri.setSplit(true);

      MetaTableAccessor.addRegionToMeta(meta, hri, a, b);
      meta.flushCommits();
      TEST_UTIL.getHBaseAdmin().flush(TableName.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

      put.setCellVisibility(new CellVisibility("(" + SECRET + "|" + CONFIDENTIAL + ")" + "&" + "!"
          + TOPSECRET));
      table.put(put);
      count++;
    }
    table.flushCommits();
    return count;
  }

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

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

  static int countCellSet(CellSetModel model) {
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.