Examples of whoami()


Examples of org.apache.accumulo.core.client.Connector.whoami()

          if (ae.getSecurityErrorCode().equals(SecurityErrorCode.PERMISSION_DENIED)) {
            if (WalkingSecurity.get(state).canBulkImport(WalkingSecurity.get(state).getTabCredentials(), tableName))
              throw new AccumuloException("Bulk Import failed when it should have worked: " + tableName);
            return;
          } else if (ae.getSecurityErrorCode().equals(SecurityErrorCode.BAD_CREDENTIALS)) {
            if (WalkingSecurity.get(state).userPassTransient(conn.whoami()))
              return;
          }
          throw new AccumuloException("Unexpected exception!", ae);
        }
        for (String s : WalkingSecurity.get(state).getAuthsArray())
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.whoami()

        case USER_DOESNT_EXIST:
          if (targetExists)
            throw new AccumuloException("User " + target + " doesn't exist and they SHOULD.", ae);
          return;
        case BAD_CREDENTIALS:
          if (!WalkingSecurity.get(state).userPassTransient(conn.whoami()))
            throw new AccumuloException("Bad credentials for user " + conn.whoami());
          return;
        default:
          throw new AccumuloException("Got unexpected exception", ae);
      }
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.whoami()

          if (targetExists)
            throw new AccumuloException("User " + target + " doesn't exist and they SHOULD.", ae);
          return;
        case BAD_CREDENTIALS:
          if (!WalkingSecurity.get(state).userPassTransient(conn.whoami()))
            throw new AccumuloException("Bad credentials for user " + conn.whoami());
          return;
        default:
          throw new AccumuloException("Got unexpected exception", ae);
      }
    }
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.whoami()

          state.getConnector().tableOperations().delete(tableName);
          WalkingSecurity.get(state).cleanTablePermissions(tableName);
          return;
        }
      } else if (ae.getSecurityErrorCode().equals(SecurityErrorCode.BAD_CREDENTIALS)) {
        if (WalkingSecurity.get(state).userPassTransient(conn.whoami()))
          return;
      }
      throw new AccumuloException("Got unexpected ae error code", ae);
    } catch (TableNotFoundException tnfe) {
      if (exists)
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.whoami()

    // toggle
    if (!"take".equals(action) && !"give".equals(action)) {
      try {
        boolean res;
        if (hasPerm != (res = state.getConnector().securityOperations().hasTablePermission(target, tableName, tabPerm)))
          throw new AccumuloException("Test framework and accumulo are out of sync for user " + conn.whoami() + " for perm " + tabPerm.name()
              + " with local vs. accumulo being " + hasPerm + " " + res);
       
        if (hasPerm)
          action = "take";
        else
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.whoami()

              throw new AccumuloException("Framework and Accumulo are out of sync, we think user exists", ae);
            else
              return;
          case TABLE_DOESNT_EXIST:
            if (tabExists)
              throw new AccumuloException(conn.whoami(), ae);
            else
              return;
          default:
            throw ae;
        }
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.whoami()

            throw ae;
        }
      }
    }
   
    boolean trans = WalkingSecurity.get(state).userPassTransient(conn.whoami());
    if ("take".equals(action)) {
      try {
        conn.securityOperations().revokeTablePermission(target, tableName, tabPerm);
      } catch (AccumuloSecurityException ae) {
        switch (ae.getSecurityErrorCode()) {
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.whoami()

        switch (ae.getSecurityErrorCode()) {
          case GRANT_INVALID:
            throw new AccumuloException("Got a grant invalid on non-System.GRANT option", ae);
          case PERMISSION_DENIED:
            if (canGive)
              throw new AccumuloException(conn.whoami() + " failed to revoke permission to " + target + " when it should have worked", ae);
            return;
          case USER_DOESNT_EXIST:
            if (exists)
              throw new AccumuloException("Table user doesn't exist and they SHOULD.", ae);
            return;
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.whoami()

            if (tableExists)
              throw new AccumuloException("Table doesn't exist but it should", ae);
            return;
          case BAD_CREDENTIALS:
            if (!trans)
              throw new AccumuloException("Bad credentials for user " + conn.whoami());
            return;
          default:
            throw new AccumuloException("Got unexpected exception", ae);
        }
      }
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.whoami()

        switch (ae.getSecurityErrorCode()) {
          case GRANT_INVALID:
            throw new AccumuloException("Got a grant invalid on non-System.GRANT option", ae);
          case PERMISSION_DENIED:
            if (canGive)
              throw new AccumuloException(conn.whoami() + " failed to give permission to " + target + " when it should have worked", ae);
            return;
          case USER_DOESNT_EXIST:
            if (exists)
              throw new AccumuloException("Table user doesn't exist and they SHOULD.", ae);
            return;
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.