Package org.apache.accumulo.core.client

Examples of org.apache.accumulo.core.client.AccumuloSecurityException


    try {
      return ts.serialize(cred);
    } catch (TException e) {
      // This really shouldn't happen
      log.error(e, e);
      throw new AccumuloSecurityException(cred.getPrincipal(), SecurityErrorCode.SERIALIZATION_ERROR);
    }
  }
View Full Code Here


      td.deserialize(toRet, serializedCredential);
      return toRet;
    } catch (TException e) {
      // This really shouldn't happen
      log.error(e, e);
      throw new AccumuloSecurityException("unknown", SecurityErrorCode.SERIALIZATION_ERROR);
    }
  }
View Full Code Here

      byte[] serializedToken = bais.toByteArray();
      bais.close();
      return serializedToken;
    } catch (IOException e) {
      log.error(e, e);
      throw new AccumuloSecurityException("unknown", SecurityErrorCode.SERIALIZATION_ERROR);
    }
   
  }
View Full Code Here

      log.error(e, e);
    } catch (IllegalAccessException e) {
      log.error(e, e);
    } catch (IOException e) {
      log.error(e, e);
      throw new AccumuloSecurityException("unknown", SecurityErrorCode.SERIALIZATION_ERROR);
    }
    throw new AccumuloSecurityException("unknown", SecurityErrorCode.INVALID_TOKEN);
  }
View Full Code Here

      }
      return as;
    } catch (TTransportException e) {
      throw new AccumuloException(e);
    } catch (ThriftSecurityException e) {
      throw new AccumuloSecurityException(e.user, e.code, e);
    } catch (TException e) {
      throw new AccumuloException(e);
    } finally {
      if (client != null)
        ThriftUtil.returnClient(client);
View Full Code Here

      }
      return as;
    } catch (TTransportException e) {
      throw new AccumuloException(e);
    } catch (ThriftSecurityException e) {
      throw new AccumuloSecurityException(e.user, e.code, e);
    } catch (TException e) {
      throw new AccumuloException(e);
    } finally {
      if (client != null)
        ThriftUtil.returnClient(client);
View Full Code Here

    return cachedInstance = new ZooKeeperInstance(this.instance, this.zookeepers);
  }
 
  public Connector getConnector() throws AccumuloException, AccumuloSecurityException {
    if (this.principal == null || this.getToken() == null)
      throw new AccumuloSecurityException("You must provide a user (-u) and password (-p)", SecurityErrorCode.BAD_CREDENTIALS);
    return getInstance().getConnector(principal, getToken());
  }
View Full Code Here

    IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
    try {
      zoo.putPersistentData(ZKUserPath + "/" + user, new byte[0], NodeExistsPolicy.SKIP);
    } catch (KeeperException e) {
      log.error(e, e);
      throw new AccumuloSecurityException(user, SecurityErrorCode.CONNECTION_ERROR, e);
    } catch (InterruptedException e) {
      log.error(e, e);
      throw new RuntimeException(e);
    }
  }
View Full Code Here

      log.error(e, e);
      throw new RuntimeException(e);
    } catch (KeeperException e) {
      log.error(e, e);
      if (e.code().equals(KeeperException.Code.NONODE))
        throw new AccumuloSecurityException(user, SecurityErrorCode.USER_DOESNT_EXIST, e);
      throw new AccumuloSecurityException(user, SecurityErrorCode.CONNECTION_ERROR, e);
     
    }
  }
View Full Code Here

        ZooReaderWriter.getRetryingInstance().putPersistentData(ZKUserPath + "/" + user + ZKUserAuths, ZKSecurityTool.convertAuthorizations(authorizations),
            NodeExistsPolicy.OVERWRITE);
      }
    } catch (KeeperException e) {
      log.error(e, e);
      throw new AccumuloSecurityException(user, SecurityErrorCode.CONNECTION_ERROR, e);
    } catch (InterruptedException e) {
      log.error(e, e);
      throw new RuntimeException(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.client.AccumuloSecurityException

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.