Examples of batchMutate()


Examples of org.apache.hadoop.hbase.regionserver.HRegion.batchMutate()

    if (puts == null) {
      LOG.fatal("Problem encountered when creating new hbase:meta entries.  " +
        "You may need to restore the previously sidelined hbase:meta");
      return false;
    }
    meta.batchMutate(puts.toArray(new Put[0]));
    HRegion.closeHRegion(meta);
    LOG.info("Success! hbase:meta table rebuilt.");
    LOG.info("Old hbase:meta is moved into " + backupDir);
    return true;
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.HRegion.batchMutate()

                KeyValue newCurrentValueKV = KeyValueUtil.newKeyValue(row, currentValueKV.getFamily(), currentValueKV.getQualifier(), currentValueKV.getTimestamp(), valueBuffer);
                put.add(newCurrentValueKV);
                @SuppressWarnings("unchecked")
                Pair<Mutation,Integer>[] mutations = new Pair[1];
                mutations[0] = new Pair<Mutation,Integer>(put, lid);
                region.batchMutate(mutations);
                return Sequence.replaceCurrentValueKV(result, newCurrentValueKV);
            } finally {
                region.releaseRowLock(lid);
            }
        } catch (Throwable t) {
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.HRegion.batchMutate()

                    }
                }
                @SuppressWarnings("unchecked")
                Pair<Mutation,Integer>[] mutations = new Pair[1];
                mutations[0] = new Pair<Mutation,Integer>(m, lid);
                region.batchMutate(mutations);
                long serverTimestamp = MetaDataUtil.getClientTimeStamp(m);
                // Return result with single KeyValue. The only piece of information
                // the client cares about is the timestamp, which is the timestamp of
                // when the mutation was actually performed (useful in the case of .
                return new Result(Collections.singletonList(KeyValueUtil.newKeyValue(row, PhoenixDatabaseMetaData.SEQUENCE_FAMILY_BYTES, QueryConstants.EMPTY_COLUMN_BYTES, serverTimestamp, SUCCESS_VALUE)));
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.HRegion.batchMutate()

    if (puts == null) {
      LOG.fatal("Problem encountered when creating new hbase:meta entries.  " +
        "You may need to restore the previously sidelined hbase:meta");
      return false;
    }
    meta.batchMutate(puts.toArray(new Put[0]));
    HRegion.closeHRegion(meta);
    LOG.info("Success! hbase:meta table rebuilt.");
    LOG.info("Old hbase:meta is moved into " + backupDir);
    return true;
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.HRegion.batchMutate()

    if (puts == null) {
      LOG.fatal("Problem encountered when creating new hbase:meta entries.  " +
        "You may need to restore the previously sidelined hbase:meta");
      return false;
    }
    meta.batchMutate(puts.toArray(new Put[puts.size()]));
    HRegion.closeHRegion(meta);
    LOG.info("Success! hbase:meta table rebuilt.");
    LOG.info("Old hbase:meta is moved into " + backupDir);
    return true;
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.HRegion.batchMutate()

          KeyValue newLimitReachedKV = createKeyValue(row, PhoenixDatabaseMetaData.LIMIT_REACHED_FLAG_BYTES, limitReached, timestamp);
                put.add(newLimitReachedKV);
                }
                // update the KeyValues on the server
                Mutation[] mutations = new Mutation[]{put};
                region.batchMutate(mutations);
                // return a Result with the updated KeyValues
                return Result.create(cells);
            } finally {
                region.releaseRowLocks(locks);
            }
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.HRegion.batchMutate()

                            ((KeyValue)kv).updateLatestStamp(clientTimestampBuf);
                        }
                    }
                }
                Mutation[] mutations = new Mutation[]{m};
                region.batchMutate(mutations);
                long serverTimestamp = MetaDataUtil.getClientTimeStamp(m);
                // Return result with single KeyValue. The only piece of information
                // the client cares about is the timestamp, which is the timestamp of
                // when the mutation was actually performed (useful in the case of .
                return Result.create(Collections.singletonList(
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.HRegion.batchMutate()

    if (puts == null) {
      LOG.fatal("Problem encountered when creating new hbase:meta entries.  " +
        "You may need to restore the previously sidelined hbase:meta");
      return false;
    }
    meta.batchMutate(puts.toArray(new Put[0]));
    HRegion.closeHRegion(meta);
    LOG.info("Success! hbase:meta table rebuilt.");
    LOG.info("Old hbase:meta is moved into " + backupDir);
    return true;
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.HRegion.batchMutate()

          Mutation[] deleteArr = new Mutation[deleteRows.size()];
          int i = 0;
          for (List<Cell> deleteRow : deleteRows) {
            deleteArr[i++] = createDeleteMutation(deleteRow, deleteType, timestamp);
          }
          OperationStatus[] opStatus = region.batchMutate(deleteArr);
          for (i = 0; i < opStatus.length; i++) {
            if (opStatus[i].getOperationStatusCode() != OperationStatusCode.SUCCESS) {
              break;
            }
            totalRowsDeleted++;
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.HRegion.batchMutate()

                        try {
                            if (tableReference.getTableName().startsWith(MetaDataUtil.LOCAL_INDEX_TABLE_PREFIX)) {
                                HRegion indexRegion = IndexUtil.getIndexRegion(env);
                                if (indexRegion != null) {
                                    throwFailureIfDone();
                                    indexRegion.batchMutate(mutations.toArray(new Mutation[mutations.size()]));
                                    return null;
                                }
                            }
                        } catch (IOException ignord) {
                            // when it's failed we fall back to the standard & slow way
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.