Examples of startUpdate()


Examples of org.apache.hadoop.hbase.io.BatchUpdate.startUpdate()

   */
  static void offlineRegionInMETA(final HRegionInterface srvr,
      final Text metaRegionName, final HRegionInfo info)
  throws IOException {
    BatchUpdate b = new BatchUpdate(rand.nextLong());
    long lockid = b.startUpdate(info.getRegionName());
    info.setOffline(true);
    b.put(lockid, COL_REGIONINFO, Writables.getBytes(info));
    b.delete(lockid, COL_SERVER);
    b.delete(lockid, COL_STARTCODE);
    // If carrying splits, they'll be in place when we show up on new
View Full Code Here

Examples of org.apache.hadoop.hbase.io.BatchUpdate.startUpdate()

    protected void updateRegionInfo(HRegionInterface server, Text regionName,
        HRegionInfo i) throws IOException {

      BatchUpdate b = new BatchUpdate(rand.nextLong());
      long lockid = b.startUpdate(i.regionName);
      b.put(lockid, COL_REGIONINFO, Writables.getBytes(i));
      server.batchUpdate(regionName, System.currentTimeMillis(), b);
      if (LOG.isDebugEnabled()) {
        LOG.debug("updated columns in row: " + i.regionName);
      }
View Full Code Here

Examples of org.apache.hadoop.hbase.io.BatchUpdate.startUpdate()

      // 3. Insert into meta
         
      HRegionInfo info = region.getRegionInfo();
      Text regionName = region.getRegionName();
      BatchUpdate b = new BatchUpdate(rand.nextLong());
      long lockid = b.startUpdate(regionName);
      b.put(lockid, COL_REGIONINFO, Writables.getBytes(info));
      server.batchUpdate(metaRegionName, System.currentTimeMillis(), b);

      // 4. Close the new region to flush it to disk.  Close its log file too.
     
View Full Code Here

Examples of org.apache.hadoop.hbase.io.BatchUpdate.startUpdate()

        if (!HRegion.deleteRegion(fs, dir, parent.getRegionName())) {
          LOG.warn("Deletion of " + parent.getRegionName() + " failed");
        }
       
        BatchUpdate b = new BatchUpdate(rand.nextLong());
        long lockid = b.startUpdate(parent.getRegionName());
        b.delete(lockid, COL_REGIONINFO);
        b.delete(lockid, COL_SERVER);
        b.delete(lockid, COL_STARTCODE);
        srvr.batchUpdate(metaRegionName, System.currentTimeMillis(), b);
        result = true;
View Full Code Here

Examples of org.apache.hadoop.hbase.io.BatchUpdate.startUpdate()

        LOG.debug(split.getRegionName().toString()
            +" no longer has references to " + parent.toString());
      }
     
      BatchUpdate b = new BatchUpdate(rand.nextLong());
      long lockid = b.startUpdate(parent);
      b.delete(lockid, splitColumn);
      srvr.batchUpdate(metaRegionName, System.currentTimeMillis(), b);
       
      return result;
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.io.BatchUpdate.startUpdate()

      }

      // Remove server from root/meta entries
      for (ToDoEntry e: toDoList) {
        BatchUpdate b = new BatchUpdate(rand.nextLong());
        long lockid = b.startUpdate(e.row);
        if (e.deleteRegion) {
          b.delete(lockid, COL_REGIONINFO);
        } else if (e.regionOffline) {
          e.info.offLine = true;
          b.put(lockid, COL_REGIONINFO, Writables.getBytes(e.info));
View Full Code Here

Examples of org.apache.hadoop.hbase.io.BatchUpdate.startUpdate()

          server = connection.getHRegionConnection(r.getServer());
        }

        try {
          BatchUpdate b = new BatchUpdate(rand.nextLong());
          long lockid = b.startUpdate(regionInfo.regionName);

          if (deleteRegion) {
            b.delete(lockid, COL_REGIONINFO);

          } else if (!reassignRegion ) {
View Full Code Here

Examples of org.apache.hadoop.hbase.io.BatchUpdate.startUpdate()

          metaRegionName + " with startcode " +
          Writables.bytesToLong(this.startCode) + " and server "+
          serverAddress.toString());
        try {
          BatchUpdate b = new BatchUpdate(rand.nextLong());
          long lockid = b.startUpdate(region.getRegionName());
          b.put(lockid, COL_SERVER,
            Writables.stringToBytes(serverAddress.toString()));
          b.put(lockid, COL_STARTCODE, startCode);
          server.batchUpdate(metaRegionName, System.currentTimeMillis(), b);
          if (region.tableDesc.getName().equals(META_TABLE_NAME)) {
View Full Code Here

Examples of org.apache.hadoop.hbase.io.BatchUpdate.startUpdate()

        if (LOG.isDebugEnabled()) {
          LOG.debug("updating columns in row: " + i.regionName);
        }

        BatchUpdate b = new BatchUpdate(rand.nextLong());
        lockid = b.startUpdate(i.regionName);
        updateRegionInfo(b, i);
        b.delete(lockid, COL_SERVER);
        b.delete(lockid, COL_STARTCODE);
        server.batchUpdate(m.getRegionName(), System.currentTimeMillis(), b);
        if (LOG.isDebugEnabled()) {
View Full Code Here

Examples of org.apache.hadoop.hbase.io.BatchUpdate.startUpdate()

   */
  static void removeRegionFromMETA(final HRegionInterface srvr,
      final Text metaRegionName, final Text regionName)
  throws IOException {
    BatchUpdate b = new BatchUpdate(rand.nextLong());
    long lockid = b.startUpdate(regionName);
    for (int i = 0; i < ALL_META_COLUMNS.length; i++) {
      b.delete(lockid, ALL_META_COLUMNS[i]);
    }
    srvr.batchUpdate(metaRegionName, System.currentTimeMillis(), b);
  }
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.