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

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


    internalWriteString(str);
  }

  @Override
  public void writeBinary(ByteBuffer bin) throws TException {
    throw new TException(
        "Ctl separated protocol cannot support writing Binary data!");
  }
View Full Code Here


    }
  }

  @Override
  public ByteBuffer readBinary() throws TException {
    throw new TException("Not implemented for control separated data");
  }
View Full Code Here

  @Override
  public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
    Object ret = null;
    int retriesMade = 0;
    TException caughtException = null;
    while (true) {
      try {
        reloginExpiringKeytabUser();
        if(retriesMade > 0){
          base.reconnect();
View Full Code Here

      @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

      sortOrder = "";
    }
    for (int i = 0; i < sortOrder.length(); i++) {
      char c = sortOrder.charAt(i);
      if (c != '+' && c != '-') {
        throw new TException(serdeConstants.SERIALIZATION_SORT_ORDER
            + " should be a string consists of only '+' and '-'!");
      }
    }
    LOG.info("Sort order is \"" + sortOrder + "\"");
  }
View Full Code Here

  public void writeString(String str) throws TException {
    byte[] dat;
    try {
      dat = str.getBytes("UTF-8");
    } catch (UnsupportedEncodingException uex) {
      throw new TException("JVM DOES NOT SUPPORT UTF-8: ",uex);
    }
    writeTextBytes(dat, 0, dat.length);
  }
View Full Code Here

    }
    try {
      String r = new String(stringBytes, 0, i, "UTF-8");
      return r;
    } catch (UnsupportedEncodingException uex) {
      throw new TException("JVM DOES NOT SUPPORT UTF-8: ",uex);
    }
  }
View Full Code Here

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

    public void unlock(UnlockRequest rqst)
        throws NoSuchLockException, TxnOpenException, TException {
      try {
        getTxnHandler().unlock(rqst);
      } catch (MetaException e) {
        throw new TException(e);
      }
    }
View Full Code Here

    @Override
    public ShowLocksResponse show_locks(ShowLocksRequest rqst) throws TException {
      try {
        return getTxnHandler().showLocks(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.