Package com.facebook.presto.hive.shaded.org.apache.thrift

Examples of com.facebook.presto.hive.shaded.org.apache.thrift.TException


      @Override
      public boolean process(final TProtocol inProt, final TProtocol outProt) throws TException {
        TTransport trans = inProt.getTransport();
        if (!(trans instanceof TSaslServerTransport)) {
          throw new TException("Unexpected non-SASL transport " + trans.getClass());
        }
        TSaslServerTransport saslTrans = (TSaslServerTransport)trans;
        SaslServer saslServer = saslTrans.getSaslServer();
        String authId = saslServer.getAuthorizationID();
        authenticationMethod.set(AuthenticationMethod.KERBEROS);
        LOG.debug("AUTH ID ======>" + authId);
        String endUser = authId;

        if(saslServer.getMechanismName().equals("DIGEST-MD5")) {
          try {
            TokenIdentifier tokenId = SaslRpcServer.getIdentifier(authId,
                secretManager);
            endUser = tokenId.getUser().getUserName();
            authenticationMethod.set(AuthenticationMethod.TOKEN);
          } catch (InvalidToken e) {
            throw new TException(e.getMessage());
          }
        }
        Socket socket = ((TSocket)(saslTrans.getUnderlyingTransport())).getSocket();
        remoteAddress.set(socket.getInetAddress());
        UserGroupInformation clientUgi = null;
View Full Code Here


      try {
        handleSetUGI(ugiTrans, fn, msg, in, out);
      } catch (TException e) {
        throw e;
      } catch (Exception e) {
        throw new TException(e.getCause());
      }
      return true;
    }
    UserGroupInformation clientUgi = ugiTrans.getClientUGI();
    if (null == clientUgi){
View Full Code Here

      throws TException, SecurityException, NoSuchMethodException, IllegalArgumentException,
      IllegalAccessException, InvocationTargetException{

    UserGroupInformation clientUgi = ugiTrans.getClientUGI();
    if( null != clientUgi){
      throw new TException(new IllegalStateException("UGI is already set. Resetting is not " +
      "allowed. Current ugi is: " + clientUgi.getUserName()));
    }

    // TODO get rid of following reflection after THRIFT-1465 is fixed.
    Method method = fn.getClass().getDeclaredMethod("getEmptyArgsInstance", new Class<?>[0]);
View Full Code Here

        if (e instanceof ConfigValSecurityException) {
          throw (ConfigValSecurityException) e;
        } else if (e instanceof TException) {
          throw (TException) e;
        } else {
          TException te = new TException(e.toString());
          te.initCause(e);
          throw te;
        }
      } finally {
        endFunction("get_config_value", success, ex);
      }
View Full Code Here

    @Override
    public GetOpenTxnsResponse get_open_txns() throws TException {
      try {
        return getTxnHandler().getOpenTxns();
      } catch (MetaException e) {
        throw new TException(e);
      }
    }
View Full Code Here

    @Override
    public GetOpenTxnsInfoResponse get_open_txns_info() throws TException {
      try {
        return getTxnHandler().getOpenTxnsInfo();
      } catch (MetaException e) {
        throw new TException(e);
      }
    }
View Full Code Here

    @Override
    public OpenTxnsResponse open_txns(OpenTxnRequest rqst) throws TException {
      try {
        return getTxnHandler().openTxns(rqst);
      } catch (MetaException e) {
        throw new TException(e);
      }
    }
View Full Code Here

    @Override
    public void abort_txn(AbortTxnRequest rqst) throws NoSuchTxnException, TException {
      try {
        getTxnHandler().abortTxn(rqst);
      } catch (MetaException e) {
        throw new TException(e);
      }
    }
View Full Code Here

    public void commit_txn(CommitTxnRequest rqst)
        throws NoSuchTxnException, TxnAbortedException, TException {
      try {
        getTxnHandler().commitTxn(rqst);
      } catch (MetaException e) {
        throw new TException(e);
      }
    }
View Full Code Here

    public LockResponse lock(LockRequest rqst)
        throws NoSuchTxnException, TxnAbortedException, TException {
      try {
        return getTxnHandler().lock(rqst);
      } catch (MetaException e) {
        throw new TException(e);
      }
    }
View Full Code Here

TOP

Related Classes of com.facebook.presto.hive.shaded.org.apache.thrift.TException

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.