Package org.apache.hadoop.hbase.client

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


    BatchUpdate b = new BatchUpdate(row);
    info.setOffline(onlineOffline);
    b.put(HConstants.COL_REGIONINFO, Writables.getBytes(info));
    b.delete(HConstants.COL_SERVER);
    b.delete(HConstants.COL_STARTCODE);
    t.commit(b);
  }
 
  /**
   * Offline version of the online TableOperation,
   * org.apache.hadoop.hbase.master.AddColumn.
 
View Full Code Here


   
    BatchUpdate update = new BatchUpdate(oldRegionInfo.getRegionName());
    update.put(COL_REGIONINFO, Writables.getBytes(oldRegionInfo));
    update.put(COL_SPLITA, Writables.getBytes(newRegions[0].getRegionInfo()));
    update.put(COL_SPLITB, Writables.getBytes(newRegions[1].getRegionInfo()));
    t.commit(update);
   
    // Add new regions to META
    for (int i = 0; i < newRegions.length; i++) {
      update = new BatchUpdate(newRegions[i].getRegionName());
      update.put(COL_REGIONINFO, Writables.getBytes(
View Full Code Here

    // Add new regions to META
    for (int i = 0; i < newRegions.length; i++) {
      update = new BatchUpdate(newRegions[i].getRegionName());
      update.put(COL_REGIONINFO, Writables.getBytes(
        newRegions[i].getRegionInfo()));
      t.commit(update);
    }
       
    // Now tell the master about the new regions
    server.reportSplit(oldRegionInfo, newRegions[0].getRegionInfo(),
      newRegions[1].getRegionInfo());
View Full Code Here

            batchUpdate.delete(m.column);
          } else {
            batchUpdate.put(m.column, m.value);
          }
        }
        table.commit(batchUpdate);
      } catch (IOException e) {
        throw new IOError(e.getMessage());
      } catch (IllegalArgumentException e) {
        throw new IllegalArgument(e.getMessage());
      }
View Full Code Here

      }

      HTable table = null;
      try {
        table = getTable(tableName);
        table.commit(batchUpdates);
      } catch (IOException e) {
        throw new IOError(e.getMessage());
      } catch (IllegalArgumentException e) {
        throw new IllegalArgument(e.getMessage());
      }
View Full Code Here

            batchUpdate = new BatchUpdate(Bytes.toBytes(
                "00".substring(v.length()) + v));
            batchUpdate.put(TESTCOLUMN_A, Bytes.toBytes(v));
            batchUpdate.put(TESTCOLUMN_B, Bytes.toBytes(v));
            batchUpdate.put(TESTCOLUMN_C, Bytes.toBytes("TEXT" + i));
            table.commit(batchUpdate);
        }
    }
   
    private void deleteTable() throws IOException {
        // delete the table
View Full Code Here

    for (Map.Entry<byte [], SortedMap<byte [], Cell>> row: values.entrySet()) {
      BatchUpdate b = new BatchUpdate(row.getKey());
      for (Map.Entry<byte [], Cell> val: row.getValue().entrySet()) {
        b.put(val.getKey(), val.getValue().getValue());
      }
      table.commit(b);
    }

    HRegion region = null;
    try {
      Collection<HRegion> regions =
View Full Code Here

    BatchUpdate b = new BatchUpdate(row);
    info.setOffline(onlineOffline);
    b.put(HConstants.COL_REGIONINFO, Writables.getBytes(info));
    b.delete(HConstants.COL_SERVER);
    b.delete(HConstants.COL_STARTCODE);
    t.commit(b);
  }
 
  /**
   * Offline version of the online TableOperation,
   * org.apache.hadoop.hbase.master.AddColumn.
 
View Full Code Here

   
    BatchUpdate update = new BatchUpdate(oldRegionInfo.getRegionName());
    update.put(COL_REGIONINFO, Writables.getBytes(oldRegionInfo));
    update.put(COL_SPLITA, Writables.getBytes(newRegions[0].getRegionInfo()));
    update.put(COL_SPLITB, Writables.getBytes(newRegions[1].getRegionInfo()));
    t.commit(update);
   
    // Add new regions to META
    for (int i = 0; i < newRegions.length; i++) {
      update = new BatchUpdate(newRegions[i].getRegionName());
      update.put(COL_REGIONINFO, Writables.getBytes(
View Full Code Here

    // Add new regions to META
    for (int i = 0; i < newRegions.length; i++) {
      update = new BatchUpdate(newRegions[i].getRegionName());
      update.put(COL_REGIONINFO, Writables.getBytes(
        newRegions[i].getRegionInfo()));
      t.commit(update);
    }
       
    // Now tell the master about the new regions
    server.reportSplit(oldRegionInfo, newRegions[0].getRegionInfo(),
      newRegions[1].getRegionInfo());
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.