Package org.apache.hadoop.hbase.client

Examples of org.apache.hadoop.hbase.client.RowLock


    }

    startRegionOperation();
    this.writeRequestsCount.increment();
    try {
      RowLock lock = isPut ? ((Put)w).getRowLock() : ((Delete)w).getRowLock();
      Get get = new Get(row, lock);
      checkFamily(family);
      get.addColumn(family, qualifier);

      // Lock row
View Full Code Here


    byte[] qf1 = "qf1".getBytes();

    long ts = System.currentTimeMillis();
    int maxVersions = 2;
    long lockid = 5;
    RowLock rowLock = new RowLock(lockid);

    Get get = new Get(row, rowLock);
    get.addColumn(fam, qf1);
    get.setTimeRange(ts, ts+1);
    get.setMaxVersions(maxVersions);
View Full Code Here

    byte[] qf1 = "qf1".getBytes();

    long ts = System.currentTimeMillis();
    int maxVersions = 2;
    long lockid = 5;
    RowLock rowLock = new RowLock(lockid);

    Get get = new Get(row, rowLock);
    get.addColumn(fam, qf1);
    get.setTimeRange(ts, ts+1);
    get.setMaxVersions(maxVersions);
View Full Code Here

    if (!isPut && !(w instanceof Delete))
      throw new IOException("Action must be Put or Delete");

    startRegionOperation();
    try {
      RowLock lock = isPut ? ((Put)w).getRowLock() : ((Delete)w).getRowLock();
      Get get = new Get(row, lock);
      checkFamily(family);
      get.addColumn(family, qualifier);

      // Lock row
View Full Code Here

      throw new DoNotRetryIOException("Action's getRow must match the passed row");
    }

    startRegionOperation();
    try {
      RowLock lock = isPut ? ((Put)w).getRowLock() : ((Delete)w).getRowLock();
      Get get = new Get(row, lock);
      checkFamily(family);
      get.addColumn(family, qualifier);

      // Lock row
View Full Code Here

    startRegionOperation();
    this.writeRequestsCount.increment();
    this.opMetrics.setWriteRequestCountMetrics(this.writeRequestsCount.get());
    try {
      RowLock lock = isPut ? ((Put)w).getRowLock() : ((Delete)w).getRowLock();
      Get get = new Get(row, lock);
      checkFamily(family);
      get.addColumn(family, qualifier);

      // Lock row
View Full Code Here

    startRegionOperation();
    this.writeRequestsCount.increment();
    this.opMetrics.setWriteRequestCountMetrics(this.writeRequestsCount.get());
    try {
      RowLock lock = isPut ? ((Put)w).getRowLock() : ((Delete)w).getRowLock();
      Get get = new Get(row, lock);
      checkFamily(family);
      get.addColumn(family, qualifier);

      // Lock row
View Full Code Here

    byte[] qf1 = "qf1".getBytes();
   
    long ts = System.currentTimeMillis();
    int maxVersions = 2;
    long lockid = 5;
    RowLock rowLock = new RowLock(lockid);
   
    Get get = new Get(row, rowLock);
    get.addColumn(fam, qf1);
    get.setTimeRange(ts, ts+1);
    get.setMaxVersions(maxVersions);
View Full Code Here

      LOG.info("Updated row [" + Bytes.toString(update.getRow()) + "] val: ["
          + Bytes.toString(valueA) + "]");
  }

  private void updateLockedRow(int row, int newValue) throws IOException {
      RowLock lock = table.lockRow(PerformanceEvaluation.format(row));
      Put update = new Put(PerformanceEvaluation.format(row), lock);
      byte[] valueA = PerformanceEvaluation.format(newValue);
      update.add(FAMILY, QUAL_A, valueA);
      LOG.info("Updating row [" + Bytes.toString(update.getRow()) + "] val: ["
          + Bytes.toString(valueA) + "]");
View Full Code Here

  }

  private void updateLockedRowNoAutoFlush(int row, int newValue) throws IOException {
      table.flushCommits();
      table.setAutoFlush(false);
      RowLock lock = table.lockRow(PerformanceEvaluation.format(row));
      Put update = new Put(PerformanceEvaluation.format(row), lock);
      byte[] valueA = PerformanceEvaluation.format(newValue);
      update.add(FAMILY, QUAL_A, valueA);
      LOG.info("Updating row [" + Bytes.toString(update.getRow()) + "] val: ["
          + Bytes.toString(valueA) + "]");
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.client.RowLock

Copyright © 2018 www.massapicom. 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.