Package org.apache.hadoop.hbase.exceptions

Examples of org.apache.hadoop.hbase.exceptions.DoNotRetryIOException


      if (mutation instanceof Put) {
        mutateType = MutationType.PUT;
      } else if (mutation instanceof Delete) {
        mutateType = MutationType.DELETE;
      } else {
        throw new DoNotRetryIOException("RowMutations supports only put and delete, not " +
          mutation.getClass().getName());
      }
      MutationProto mp = ProtobufUtil.toMutation(mutateType, mutation);
      builder.addAction(MultiAction.newBuilder().setMutation(mp).build());
    }
View Full Code Here


      if (mutation instanceof Put) {
        type = MutationType.PUT;
      } else if (mutation instanceof Delete) {
        type = MutationType.DELETE;
      } else {
        throw new DoNotRetryIOException("RowMutations supports only put and delete, not " +
          mutation.getClass().getName());
      }
      MutationProto mp = ProtobufUtil.toMutationNoData(type, mutation);
      cells.add(mutation);
      builder.addAction(MultiAction.newBuilder().setMutation(mp).build());
View Full Code Here

      } else if (row instanceof Increment) {
        protoAction.setMutation(ProtobufUtil.toMutation((Increment)row));
      } else if (row instanceof RowMutations) {
        continue; // ignore RowMutations
      } else {
        throw new DoNotRetryIOException(
          "multi doesn't support " + row.getClass().getName());
      }
      builder.addAction(protoAction.build());
    }
    return builder.build();
View Full Code Here

        cells.add(i);
        protoAction.setMutation(ProtobufUtil.toMutationNoData(MutationType.INCREMENT, i));
      } else if (row instanceof RowMutations) {
        continue; // ignore RowMutations
      } else {
        throw new DoNotRetryIOException("Multi doesn't support " + row.getClass().getName());
      }
      builder.addAction(protoAction.build());
    }
    return builder.build();
  }
View Full Code Here

      ugi.addToken(userToken);
    } else if(User.isSecurityEnabled()) {
      //we allow this to pass through in "simple" security mode
      //for mini cluster testing
      ResponseConverter.setControllerException(controller,
          new DoNotRetryIOException("User token cannot be null"));
      return;
    }

    HRegion region = env.getRegion();
    boolean bypass = false;
View Full Code Here

            // when what we need is to open scanner against new location.
            // Attach NSRE to signal client that it needs to resetup scanner.
            if (this.scanMetrics != null) {
              this.scanMetrics.countOfNSRE.incrementAndGet();
            }
            throw new DoNotRetryIOException("Reset scanner", ioe);
          } else if (ioe instanceof RegionServerStoppedException) {
            // Throw a DNRE so that we break out of cycle of calling RSSE
            // when what we need is to open scanner against new location.
            // Attach RSSE to signal client that it needs to resetup scanner.
            throw new DoNotRetryIOException("Reset scanner", ioe);
          } else {
            // The outer layers will retry
            throw ioe;
          }
        }
View Full Code Here

      case REGION_NAME:
        return HRegionInfo.encodeRegionName(value);
      case ENCODED_REGION_NAME:
        return Bytes.toString(value);
      default:
        throw new DoNotRetryIOException(
          "Unsupported region specifier type: " + type);
    }
  }
View Full Code Here

    Put put = null;
    int cellCount = proto.hasAssociatedCellCount()? proto.getAssociatedCellCount(): 0;
    if (cellCount > 0) {
      // The proto has metadata only and the data is separate to be found in the cellScanner.
      if (cellScanner == null) {
        throw new DoNotRetryIOException("Cell count of " + cellCount + " but no cellScanner: " +
          TextFormat.shortDebugString(proto));
      }
      for (int i = 0; i < cellCount; i++) {
        if (!cellScanner.advance()) {
          throw new DoNotRetryIOException("Cell count of " + cellCount + " but at index " + i +
            " no cell returned: " + TextFormat.shortDebugString(proto));
        }
        Cell cell = cellScanner.current();
        if (put == null) {
          put = new Put(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength(), timestamp);
        }
        put.add(KeyValueUtil.ensureKeyValue(cell));
      }
    } else {
      put = new Put(row, timestamp);
      // The proto has the metadata and the data itself
      for (ColumnValue column: proto.getColumnValueList()) {
        byte[] family = column.getFamily().toByteArray();
        for (QualifierValue qv: column.getQualifierValueList()) {
          byte[] qualifier = qv.getQualifier().toByteArray();
          if (!qv.hasValue()) {
            throw new DoNotRetryIOException(
                "Missing required field: qualifer value");
          }
          byte[] value = qv.getValue().toByteArray();
          long ts = timestamp;
          if (qv.hasTimestamp()) {
View Full Code Here

    Delete delete = null;
    int cellCount = proto.hasAssociatedCellCount()? proto.getAssociatedCellCount(): 0;
    if (cellCount > 0) {
      // The proto has metadata only and the data is separate to be found in the cellScanner.
      if (cellScanner == null) {
        throw new DoNotRetryIOException("Cell count of " + cellCount + " but no cellScanner: " +
          TextFormat.shortDebugString(proto));
      }
      for (int i = 0; i < cellCount; i++) {
        if (!cellScanner.advance()) {
          throw new DoNotRetryIOException("Cell count of " + cellCount + " but at index " + i +
            " no cell returned: " + TextFormat.shortDebugString(proto));
        }
        Cell cell = cellScanner.current();
        if (delete == null) {
          delete =
View Full Code Here

    Append append = null;
    int cellCount = proto.hasAssociatedCellCount()? proto.getAssociatedCellCount(): 0;
    if (cellCount > 0) {
      // The proto has metadata only and the data is separate to be found in the cellScanner.
      if (cellScanner == null) {
        throw new DoNotRetryIOException("Cell count of " + cellCount + " but no cellScanner: " +
          TextFormat.shortDebugString(proto));
      }
      for (int i = 0; i < cellCount; i++) {
        if (!cellScanner.advance()) {
          throw new DoNotRetryIOException("Cell count of " + cellCount + " but at index " + i +
            " no cell returned: " + TextFormat.shortDebugString(proto));
        }
        Cell cell = cellScanner.current();
        if (append == null) {
          append = new Append(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength());
        }
        append.add(KeyValueUtil.ensureKeyValue(cell));
      }
    } else {
      append = new Append(row);
      for (ColumnValue column: proto.getColumnValueList()) {
        byte[] family = column.getFamily().toByteArray();
        for (QualifierValue qv: column.getQualifierValueList()) {
          byte[] qualifier = qv.getQualifier().toByteArray();
          if (!qv.hasValue()) {
            throw new DoNotRetryIOException(
              "Missing required field: qualifer value");
          }
          byte[] value = qv.getValue().toByteArray();
          append.add(family, qualifier, value);
        }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.exceptions.DoNotRetryIOException

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.