Package org.apache.hadoop.hbase.protobuf.generated.ClientProtos

Examples of org.apache.hadoop.hbase.protobuf.generated.ClientProtos.RegionActionResult


    byte[] user = request.getUser().toByteArray();
    try {
      checkCallingUserAuth();
      List<String> currentAuths = this.getUserAuthsFromLabelsTable(user);
      List<Mutation> deletes = new ArrayList<Mutation>(auths.size());
      RegionActionResult successResult = RegionActionResult.newBuilder().build();
      for (ByteString authBS : auths) {
        byte[] auth = authBS.toByteArray();
        String authStr = Bytes.toString(auth);
        if (currentAuths.contains(authStr)) {
          int labelOrdinal = this.visibilityManager.getLabelOrdinal(authStr);
View Full Code Here


          "VisibilityController not yet initialized"), response);
    }
    try {
      checkCallingUserAuth();
      List<Mutation> puts = new ArrayList<Mutation>(labels.size());
      RegionActionResult successResult = RegionActionResult.newBuilder().build();
      for (VisibilityLabel visLabel : labels) {
        byte[] label = visLabel.getLabel().toByteArray();
        String labelStr = Bytes.toString(label);
        if (VisibilityLabelsValidator.isValidLabel(label)) {
          if (this.visibilityManager.getLabelOrdinal(labelStr) > 0) {
View Full Code Here

  private void setExceptionResults(int size, IOException e,
      VisibilityLabelsResponse.Builder response) {
    RegionActionResult.Builder failureResultBuilder = RegionActionResult.newBuilder();
    failureResultBuilder.setException(ResponseConverter.buildException(e));
    RegionActionResult failureResult = failureResultBuilder.build();
    for (int i = 0; i < size; i++) {
      response.addResult(i, failureResult);
    }
  }
View Full Code Here

    }
    byte[] user = request.getUser().toByteArray();
    try {
      checkCallingUserAuth();
      List<Mutation> puts = new ArrayList<Mutation>(auths.size());
      RegionActionResult successResult = RegionActionResult.newBuilder().build();
      for (ByteString authBS : auths) {
        byte[] auth = authBS.toByteArray();
        String authStr = Bytes.toString(auth);
        int labelOrdinal = this.visibilityManager.getLabelOrdinal(authStr);
        if (labelOrdinal == 0) {
View Full Code Here

    byte[] user = request.getUser().toByteArray();
    try {
      checkCallingUserAuth();
      List<String> currentAuths = this.getUserAuthsFromLabelsTable(user);
      List<Mutation> deletes = new ArrayList<Mutation>(auths.size());
      RegionActionResult successResult = RegionActionResult.newBuilder().build();
      for (ByteString authBS : auths) {
        byte[] auth = authBS.toByteArray();
        String authStr = Bytes.toString(auth);
        if (currentAuths.contains(authStr)) {
          int labelOrdinal = this.visibilityManager.getLabelOrdinal(authStr);
View Full Code Here

        for (ByteString authBS : auths) {
          labelAuths.add(authBS.toByteArray());
        }
        OperationStatus[] opStatus = this.visibilityLabelService.setAuths(request.getUser()
            .toByteArray(), labelAuths);
        RegionActionResult successResult = RegionActionResult.newBuilder().build();
        for (OperationStatus status : opStatus) {
          if (status.getOperationStatusCode() == SUCCESS) {
            response.addResult(successResult);
          } else {
            RegionActionResult.Builder failureResultBuilder = RegionActionResult.newBuilder();
View Full Code Here

        for (ByteString authBS : auths) {
          labelAuths.add(authBS.toByteArray());
        }
        OperationStatus[] opStatus = this.visibilityLabelService.clearAuths(request.getUser()
            .toByteArray(), labelAuths);
        RegionActionResult successResult = RegionActionResult.newBuilder().build();
        for (OperationStatus status : opStatus) {
          if (status.getOperationStatusCode() == SUCCESS) {
            response.addResult(successResult);
          } else {
            RegionActionResult.Builder failureResultBuilder = RegionActionResult.newBuilder();
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.protobuf.generated.ClientProtos.RegionActionResult

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.