Examples of checkAndPut()


Examples of org.apache.hadoop.hbase.client.HTableInterface.checkAndPut()

  @Override
  public boolean checkAndPut(ByteBuffer table, ByteBuffer row, ByteBuffer family,
      ByteBuffer qualifier, ByteBuffer value, TPut put) throws TIOError, TException {
    HTableInterface htable = getTable(table);
    try {
      return htable.checkAndPut(byteBufferToByteArray(row), byteBufferToByteArray(family),
        byteBufferToByteArray(qualifier), (value == null) ? null : byteBufferToByteArray(value),
        putFromThrift(put));
    } catch (IOException e) {
      throw getTIOError(e);
    } finally {
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTableInterface.checkAndPut()

      }
      put.add(valueToPutParts[0], valueToPutParts[1], valueToPutCell
        .getTimestamp(), valueToPutCell.getValue());

      table = servlet.getTable(this.tableResource.getName());
      boolean retValue = table.checkAndPut(key, valueToPutParts[0],
        valueToPutParts[1], valueToCheckCell.getValue(), put);
      if (LOG.isDebugEnabled()) {
        LOG.debug("CHECK-AND-PUT " + put.toString() + ", returns " + retValue);
      }
      table.flushCommits();
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTableInterface.checkAndPut()

          .type(MIMETYPE_TEXT).entity("Bad request" + CRLF)
          .build();
      }

      table = pool.getTable(this.tableResource.getName());
      boolean retValue = table.checkAndPut(key, valueToPutParts[0],
        valueToPutParts[1], valueToCheckCell.getValue(), put);
      if (LOG.isDebugEnabled()) {
        LOG.debug("CHECK-AND-PUT " + put.toString() + ", returns " + retValue);
      }
      table.flushCommits();
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTableInterface.checkAndPut()

    HTableInterface meta = getHTable();
    try {
      if (LOG.isDebugEnabled()) {
        LOG.debug("FMeta checkAndPut " + p);
      }
      return meta.checkAndPut(p.getRow(), family, qualifier, value, p);
    } catch (IOException e) {
      throw new MetaException(e);
    } finally {
      closeHTable(meta);
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTableInterface.checkAndPut()

          .type(MIMETYPE_TEXT).entity("Bad request" + CRLF)
          .build();
      }

      table = pool.getTable(this.tableResource.getName());
      boolean retValue = table.checkAndPut(key, valueToPutParts[0],
        valueToPutParts[1], valueToCheckCell.getValue(), put);
      if (LOG.isDebugEnabled()) {
        LOG.debug("CHECK-AND-PUT " + put.toString() + ", returns " + retValue);
      }
      table.flushCommits();
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTableInterface.checkAndPut()

  @Override
  public boolean checkAndPut(ByteBuffer table, ByteBuffer row, ByteBuffer family,
      ByteBuffer qualifier, ByteBuffer value, TPut put) throws TIOError, TException {
    HTableInterface htable = getTable(table);
    try {
      return htable.checkAndPut(byteBufferToByteArray(row), byteBufferToByteArray(family),
        byteBufferToByteArray(qualifier), (value == null) ? null : byteBufferToByteArray(value),
        putFromThrift(put));
    } catch (IOException e) {
      throw getTIOError(e);
    } finally {
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTableInterface.checkAndPut()

          .type(MIMETYPE_TEXT).entity("Bad request" + CRLF)
          .build();
      }

      table = pool.getTable(this.tableResource.getName());
      boolean retValue = table.checkAndPut(key, valueToPutParts[0],
        valueToPutParts[1], valueToCheckCell.getValue(), put);
      if (LOG.isDebugEnabled()) {
        LOG.debug("CHECK-AND-PUT " + put.toString() + ", returns " + retValue);
      }
      table.flushCommits();
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTableInterface.checkAndPut()

          return Response.status(Response.Status.BAD_REQUEST).type(MIMETYPE_TEXT)
              .entity("Bad request: The column to put and check do not match." + CRLF).build();
        } else {
          put.addImmutable(valueToPutParts[0], valueToPutParts[1], valueToPutCell.getTimestamp(),
            valueToPutCell.getValue());
          retValue = table.checkAndPut(key, valueToPutParts[0], valueToPutParts[1],
            valueToCheckCell.getValue(), put);
        }
      } else {
        servlet.getMetrics().incrementFailedPutRequests(1);
        return Response.status(Response.Status.BAD_REQUEST)
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTableInterface.checkAndPut()

  @Override
  public boolean checkAndPut(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TPut put)
    throws TIOError, TException {
    HTableInterface htable = getTable(table.array());
    try {
      return htable.checkAndPut(row.array(), family.array(), qualifier.array(), (value == null) ? null : value.array(), putFromThrift(put));
    } catch (IOException e) {
      throw getTIOError(e);
    } finally {
      closeTable(htable);
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTableInterface.checkAndPut()

          .type(MIMETYPE_TEXT).entity("Bad request" + CRLF)
          .build();
      }

      table = pool.getTable(this.tableResource.getName());
      boolean retValue = table.checkAndPut(key, valueToPutParts[0],
        valueToPutParts[1], valueToCheckCell.getValue(), put);
      if (LOG.isDebugEnabled()) {
        LOG.debug("CHECK-AND-PUT " + put.toString() + ", returns " + retValue);
      }
      table.flushCommits();
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.