Examples of createProtobufOutput()


Examples of org.apache.hadoop.hbase.rest.model.CellSetModel.createProtobufOutput()

    sb.append('/');
    sb.append(Bytes.toStringBinary(name));
    sb.append("/$multiput"); // can be any nonexistent row
    for (int i = 0; i < maxRetries; i++) {
      Response response = client.put(sb.toString(), Constants.MIMETYPE_PROTOBUF,
        model.createProtobufOutput());
      int code = response.getCode();
      switch (code) {
      case 200:
        return;
      case 509:
View Full Code Here

Examples of org.apache.hadoop.hbase.rest.model.CellSetModel.createProtobufOutput()

    sb.append(Bytes.toStringBinary(put.getRow()));
    sb.append("?check=put");

    for (int i = 0; i < maxRetries; i++) {
      Response response = client.put(sb.toString(),
        Constants.MIMETYPE_PROTOBUF, model.createProtobufOutput());
      int code = response.getCode();
      switch (code) {
      case 200:
        return true;
      case 304: // NOT-MODIFIED
View Full Code Here

Examples of org.apache.hadoop.hbase.rest.model.CellSetModel.createProtobufOutput()

    sb.append(Bytes.toStringBinary(row));
    sb.append("?check=delete");

    for (int i = 0; i < maxRetries; i++) {
      Response response = client.put(sb.toString(),
        Constants.MIMETYPE_PROTOBUF, model.createProtobufOutput());
      int code = response.getCode();
      switch (code) {
      case 200:
        return true;
      case 304: // NOT-MODIFIED
View Full Code Here

Examples of org.apache.hadoop.hbase.rest.model.CellSetModel.createProtobufOutput()

    rowModel.addCell(new CellModel(Bytes.toBytes(column),
      Bytes.toBytes(value)));
    CellSetModel cellSetModel = new CellSetModel();
    cellSetModel.addRow(rowModel);
    Response response = client.put(url, Constants.MIMETYPE_PROTOBUF,
      cellSetModel.createProtobufOutput());
    Thread.yield();
    return response;
  }

  private static void checkValuePB(String table, String row, String column,
View Full Code Here

Examples of org.apache.hadoop.hbase.rest.model.CellSetModel.createProtobufOutput()

    rowModel.addCell(new CellModel(Bytes.toBytes(column),
      Bytes.toBytes(value)));
    CellSetModel cellSetModel = new CellSetModel();
    cellSetModel.addRow(rowModel);
    Response response = client.put(path.toString(), MIMETYPE_PROTOBUF,
      cellSetModel.createProtobufOutput());
    Thread.yield();
    return response;
  }

  void checkValuePB(String table, String row, String column, String value)
View Full Code Here

Examples of org.apache.hadoop.hbase.rest.model.CellSetModel.createProtobufOutput()

      Bytes.toBytes(VALUE_3)));
    rowModel.addCell(new CellModel(Bytes.toBytes(COLUMN_2),
      Bytes.toBytes(VALUE_4)));
    cellSetModel.addRow(rowModel);
    Response response = client.put(path, MIMETYPE_PROTOBUF,
      cellSetModel.createProtobufOutput());
    Thread.yield();

    // make sure the fake row was not actually created
    response = client.get(path, MIMETYPE_PROTOBUF);
    assertEquals(response.getCode(), 404);
View Full Code Here

Examples of org.apache.hadoop.hbase.rest.model.ScannerModel.createProtobufOutput()

      sb.append(Bytes.toStringBinary(name));
      sb.append('/');
      sb.append("scanner");
      for (int i = 0; i < maxRetries; i++) {
        Response response = client.post(sb.toString(),
          Constants.MIMETYPE_PROTOBUF, model.createProtobufOutput());
        int code = response.getCode();
        switch (code) {
        case 201:
          uri = response.getLocation();
          return;
View Full Code Here

Examples of org.apache.hadoop.hbase.rest.model.ScannerModel.createProtobufOutput()

      sb.append(Bytes.toStringBinary(name));
      sb.append('/');
      sb.append("scanner");
      for (int i = 0; i < maxRetries; i++) {
        Response response = client.post(sb.toString(),
          Constants.MIMETYPE_PROTOBUF, model.createProtobufOutput());
        int code = response.getCode();
        switch (code) {
        case 201:
          uri = response.getLocation();
          return;
View Full Code Here

Examples of org.apache.hadoop.hbase.rest.model.ScannerModel.createProtobufOutput()

      sb.append(Bytes.toStringBinary(name));
      sb.append('/');
      sb.append("scanner");
      for (int i = 0; i < maxRetries; i++) {
        Response response = client.post(sb.toString(),
          Constants.MIMETYPE_PROTOBUF, model.createProtobufOutput());
        int code = response.getCode();
        switch (code) {
        case 201:
          uri = response.getLocation();
          return;
View Full Code Here

Examples of org.apache.hadoop.hbase.rest.model.ScannerModel.createProtobufOutput()

    model.addColumn(Bytes.toBytes(COLUMN_1));

    // test put operation is forbidden in read-only mode
    conf.set("hbase.rest.readonly", "true");
    Response response = client.put("/" + TABLE + "/scanner",
      Constants.MIMETYPE_PROTOBUF, model.createProtobufOutput());
    assertEquals(response.getCode(), 403);
    String scannerURI = response.getLocation();
    assertNull(scannerURI);

    // recall previous put operation with read-only off
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.