[
https://issues.apache.org/jira/browse/THRIFT-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13910977#comment-13910977
]
Thiruvel Thirumoolan commented on THRIFT-2268:
----------------------------------------------
Hi [~jfarrell]. Thanks for looking into this. I needed a new exception because
Hive extends TTransportFactory with its own custom transport factory [1] (At
the end). And there could be similar extensions in other projects. If we use
TTransportException, then we have to change TTransportFactory.getTransport() to
throw TTransportException thereby breaking all existing extensions. The
extensions could also catch exceptions. By using TTransportException, the
exception could be caught in user code and thrift library (TThreadPoolServer)
might not get control.
That's why I went with a new exception NotSaslException that extends
RuntimeException. May be there are other approaches that I didn't explore, but
that's my concern.
[1] -
https://raw.github.com/apache/hive/trunk/shims/common-secure/src/main/java/org/apache/hadoop/hive/thrift/HadoopThriftAuthBridge20S.java
> Modify TSaslTransport to ignore TCP health checks from loadbalancers
> --------------------------------------------------------------------
>
> Key: THRIFT-2268
> URL: https://issues.apache.org/jira/browse/THRIFT-2268
> Project: Thrift
> Issue Type: Improvement
> Components: Java - Compiler
> Affects Versions: 0.9
> Reporter: Thiruvel Thirumoolan
> Assignee: Jake Farrell
> Priority: Minor
> Fix For: 0.9.2
>
> Attachments: THRIFT-2268.patch
>
>
> Thrift Server with TSaslTransport throws TTransportExceptions when deployed
> behind a hardware load balancer.
> We have deployed thrift servers HiveServer2 and HCatalog (both Apache Hive
> components) behind hardware load balancers. The load balancer does a TCP
> health check on the port where the thrift server (HiveServer2/HCatalog) is
> running. Some of the load balancers complete the TCP handshake and then close
> the connection without any data and therefore thrift has to handle it this
> connection. Because the TCP health check happens very frequently - about
> 10-20 times a minute, the logs are filled with TTransportExceptions. The
> current logic assumes a valid header and if its not present (TCP health
> check), then it keeps throwing exceptions.
> This JIRA attempts to ignore these which does not have a valid header.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)