Permalink
Browse files

added support to hector exceptions to display the host

  • Loading branch information...
1 parent 2b9bfb5 commit 72f16f432bd8234bba4362d55c3e3ca9274b0793 @shaunkalley shaunkalley committed Sep 6, 2013
@@ -39,7 +39,7 @@ public HectorException translate(Throwable original, CassandraHost host) {
// if the underlying cause is a scoket timeout, reflect that directly
// TODO this may be an issue on the Cassandra side which warrants investigation.
// I seem to remember these coming back as TimedOutException previously
- if (((TTransportException) original).getCause() instanceof SocketTimeoutException) {
+ if (original.getCause() instanceof SocketTimeoutException) {
he = new HTimedOutException(original);
} else {
he = new HectorTransportException(original);
@@ -59,12 +59,6 @@ public HectorException translate(Throwable original, CassandraHost host) {
e.setWhy(why);
he = e;
}
- } else if (original instanceof HPoolExhaustedException ) {
- he = (HPoolExhaustedException) original;
- } else if (original instanceof HPoolRecoverableException ) {
- he = (HPoolRecoverableException) original;
- } else if (original instanceof HInactivePoolException ) {
- he = (HInactivePoolException) original;
} else if (original instanceof TProtocolException) {
he = new HInvalidRequestException(original);
} else if (original instanceof org.apache.cassandra.thrift.NotFoundException) {

0 comments on commit 72f16f4

Please sign in to comment.