Examples of CoprocessorException


Examples of org.apache.hadoop.hbase.coprocessor.CoprocessorException

  public synchronized void addLabels(RpcController controller, VisibilityLabelsRequest request,
      RpcCallback<VisibilityLabelsResponse> done) {
    VisibilityLabelsResponse.Builder response = VisibilityLabelsResponse.newBuilder();
    List<VisibilityLabel> labels = request.getVisLabelList();
    if (!initialized) {
      setExceptionResults(labels.size(), new CoprocessorException(
          "VisibilityController not yet initialized"), response);
    }
    try {
      checkCallingUserAuth();
      List<Mutation> puts = new ArrayList<Mutation>(labels.size());
View Full Code Here

Examples of org.apache.hadoop.hbase.coprocessor.CoprocessorException

  public synchronized void setAuths(RpcController controller, SetAuthsRequest request,
      RpcCallback<VisibilityLabelsResponse> done) {
    VisibilityLabelsResponse.Builder response = VisibilityLabelsResponse.newBuilder();
    List<ByteString> auths = request.getAuthList();
    if (!initialized) {
      setExceptionResults(auths.size(), new CoprocessorException(
          "VisibilityController not yet initialized"), response);
    }
    byte[] user = request.getUser().toByteArray();
    try {
      checkCallingUserAuth();
View Full Code Here

Examples of org.apache.hadoop.hbase.coprocessor.CoprocessorException

  public synchronized void clearAuths(RpcController controller, SetAuthsRequest request,
      RpcCallback<VisibilityLabelsResponse> done) {
    VisibilityLabelsResponse.Builder response = VisibilityLabelsResponse.newBuilder();
    List<ByteString> auths = request.getAuthList();
    if (!initialized) {
      setExceptionResults(auths.size(), new CoprocessorException(
          "VisibilityController not yet initialized"), response);
    }
    byte[] user = request.getUser().toByteArray();
    try {
      checkCallingUserAuth();
View Full Code Here

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

  @Override
  public void start(CoprocessorEnvironment env) throws IOException {
    if (env instanceof RegionCoprocessorEnvironment) {
      this.env = (RegionCoprocessorEnvironment)env;
    } else {
      throw new CoprocessorException("Must be loaded on a table region!");
    }
  }
View Full Code Here

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

  @Override
  public void start(CoprocessorEnvironment env) throws IOException {
    if (env instanceof RegionCoprocessorEnvironment) {
      this.env = (RegionCoprocessorEnvironment) env;
    } else {
      throw new CoprocessorException("Must be loaded on a table region!");
    }
  }
View Full Code Here

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

        if (AUDITLOG.isTraceEnabled()) {
          // audit log should store permission changes in addition to auth results
          AUDITLOG.trace("Granted permission " + perm.toString());
        }
      } else {
        throw new CoprocessorException(AccessController.class, "This method "
            + "can only execute at " + Bytes.toString(AccessControlLists.ACL_TABLE_NAME) + " table.");
      }
      response = AccessControlProtos.GrantResponse.getDefaultInstance();
    } catch (IOException ioe) {
      // pass exception back up
View Full Code Here

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

        if (AUDITLOG.isTraceEnabled()) {
          // audit log should record all permission changes
          AUDITLOG.trace("Revoked permission " + perm.toString());
        }
      } else {
        throw new CoprocessorException(AccessController.class, "This method "
            + "can only execute at " + Bytes.toString(AccessControlLists.ACL_TABLE_NAME) + " table.");
      }
      response = AccessControlProtos.RevokeResponse.getDefaultInstance();
    } catch (IOException ioe) {
      // pass exception back up
View Full Code Here

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

        List<UserPermission> perms = AccessControlLists.getUserPermissions(
          regionEnv.getConfiguration(), table);
        response = ResponseConverter.buildUserPermissionsResponse(perms);
      } else {
        throw new CoprocessorException(AccessController.class, "This method "
            + "can only execute at " + Bytes.toString(AccessControlLists.ACL_TABLE_NAME) + " table.");
      }
    } catch (IOException ioe) {
      // pass exception back up
      ResponseConverter.setControllerException(controller, ioe);
View Full Code Here

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

      for (Permission permission : permissions) {
        if (permission instanceof TablePermission) {
          TablePermission tperm = (TablePermission) permission;
          for (Permission.Action action : permission.getActions()) {
            if (!Arrays.equals(tperm.getTable(), tableName)) {
              throw new CoprocessorException(AccessController.class, String.format("This method "
                  + "can only execute at the table specified in TablePermission. " +
                  "Table of the region:%s , requested table:%s", Bytes.toString(tableName),
                  Bytes.toString(tperm.getTable())));
            }
View Full Code Here

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

  @Override
  public void start(CoprocessorEnvironment env) throws IOException {
    if (env instanceof RegionCoprocessorEnvironment) {
      this.env = (RegionCoprocessorEnvironment)env;
    } else {
      throw new CoprocessorException("Must be loaded on a table region!");
    }
  }
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.