/** * {@inheritDoc} */ public Cassandra.Client getCassandra(String keyspaceNameArg) { getCassandra(); if ( keyspaceNameArg != null && !StringUtils.equals(keyspaceName, keyspaceNameArg)) { if ( log.isDebugEnabled() ) log.debug("keyspace reseting from {} to {}", keyspaceName, keyspaceNameArg); try { cassandraClient.set_keyspace(keyspaceNameArg); } catch (InvalidRequestException ire) { throw new HInvalidRequestException(ire); } catch (TException e) { throw exceptionsTranslator.translate(e); } keyspaceName = keyspaceNameArg; } return cassandraClient; }
he = new HUnavailableException(original); } else { HInvalidRequestException e = new HInvalidRequestException(original); e.setWhy(why); he = e; he = new HInvalidRequestException(original); } else if (original instanceof org.apache.cassandra.thrift.NotFoundException) { he = new HNotFoundException(original);
/** * {@inheritDoc} */ public Cassandra.Client getCassandra(String keyspaceNameArg) { getCassandra(); if ( keyspaceNameArg != null && !StringUtils.equals(keyspaceName, keyspaceNameArg)) { if ( log.isDebugEnabled() ) log.debug("keyspace reseting from {} to {}", keyspaceName, keyspaceNameArg); try { cassandraClient.set_keyspace(keyspaceNameArg); } catch (InvalidRequestException ire) { throw new HInvalidRequestException(ire); } catch (TException e) { throw exceptionsTranslator.translate(e); } keyspaceName = keyspaceNameArg; } return cassandraClient; }
/** * {@inheritDoc} */ public Cassandra.Client getCassandra(String keyspaceNameArg) { getCassandra(); if ( keyspaceNameArg != null && !StringUtils.equals(keyspaceName, keyspaceNameArg)) { if ( log.isDebugEnabled() ) log.debug("keyspace reseting from {} to {}", keyspaceName, keyspaceNameArg); try { cassandraClient.set_keyspace(keyspaceNameArg); } catch (InvalidRequestException ire) { throw new HInvalidRequestException(ire); } catch (TException e) { throw new HectorTransportException(e); } keyspaceName = keyspaceNameArg; } return cassandraClient; }
return new HUnavailableException(original); HInvalidRequestException e = new HInvalidRequestException(original); e.setWhy(why); return e; return (HInactivePoolException) original; } else if (original instanceof TProtocolException) { return new HInvalidRequestException(original); } else if (original instanceof org.apache.cassandra.thrift.NotFoundException) { return new HNotFoundException(original);
he = new HUnavailableException(original); } else { HInvalidRequestException e = new HInvalidRequestException(original); e.setWhy(why); he = e; he = new HInvalidRequestException(original); } else if (original instanceof org.apache.cassandra.thrift.NotFoundException) { he = new HNotFoundException(original);