@Override public String execute(Cassandra.Client cassandra) throws HectorException { try { if ( log.isInfoEnabled() ) { log.info("in execute with client {}", cassandra); } return cassandra.describe_partitioner(); } catch (Exception e) { throw xtrans.translate(e); } } };
@Override public String execute(Cassandra.Client cassandra) throws HectorException { try { if ( log.isInfoEnabled() ) { log.info("in execute with client {}", cassandra); } return cassandra.describe_partitioner(); } catch (Exception e) { throw xtrans.translate(e); } } };
@Override public String execute(Cassandra.Client cassandra) throws HectorException { try { if ( log.isInfoEnabled() ) { log.info("in execute with client {}", cassandra); } return cassandra.describe_partitioner(); } catch (Exception e) { throw xtrans.translate(e); } } };
List<KsDef> ksDefs = client.describe_keyspaces(); setPartitioner(client.describe_partitioner()); Token.TokenFactory tkFactory = getPartitioner().getTokenFactory();
try partitioner = FBUtilities.newPartitioner(client.describe_partitioner());
try partitioner = FBUtilities.newPartitioner(client.describe_partitioner());
Cassandra.Client client = new Cassandra.Client(new TBinaryProtocol(tr)); tr.open(); partitioner = client.describe_partitioner(); tr.close(); } catch (Exception e) {
private void executeDescribeCluster() { if (!CliMain.isConnected()) return; sessionState.out.println("Cluster Information:"); try { sessionState.out.println(" Name: " + thriftClient.describe_cluster_name()); sessionState.out.println(" Snitch: " + thriftClient.describe_snitch()); sessionState.out.println(" Partitioner: " + thriftClient.describe_partitioner()); sessionState.out.println(" Schema versions: "); Map<String,List<String>> versions = thriftClient.describe_schema_versions(); for (String version : versions.keySet()) { sessionState.out.println(String.format("\t%s: %s%n", version, versions.get(version))); } } catch (Exception e) { String message = (e instanceof InvalidRequestException) ? ((InvalidRequestException) e).getWhy() : e.getMessage(); sessionState.err.println("Error retrieving data: " + message); } }
@Override public String describe_partitioner() throws TException { return client.describe_partitioner(); }
@Override @SuppressWarnings("unchecked") public IPartitioner getCassandraPartitioner() throws BackendException { CTConnection conn = null; try { conn = pool.borrowObject(SYSTEM_KS); return FBUtilities.newPartitioner(conn.getClient().describe_partitioner()); } catch (Exception e) { throw new TemporaryBackendException(e); } finally { pool.returnObjectUnsafe(SYSTEM_KS, conn); } }
@Override public String describe_partitioner() throws TException { return client.describe_partitioner(); }
@Override @SuppressWarnings("unchecked") public IPartitioner<? extends Token<?>> getCassandraPartitioner() throws BackendException { CTConnection conn = null; try { conn = pool.borrowObject(SYSTEM_KS); return FBUtilities.newPartitioner(conn.getClient().describe_partitioner()); } catch (Exception e) { throw new TemporaryBackendException(e); } finally { pool.returnObjectUnsafe(SYSTEM_KS, conn); } }
@Override public String describe_partitioner() throws TException { return executeHandlingExceptions(() -> client.describe_partitioner()); }
@Override public String internalExecute(Client client, ConnectionContext context) throws Exception { return client.describe_partitioner(); } }, config.getRetryPolicy().duplicate()).getResult();
@Override public String internalExecute(Client client, ConnectionContext context) throws Exception { return client.describe_partitioner(); } }, config.getRetryPolicy().duplicate()).getResult();
@Override public String internalExecute(Client client, ConnectionContext context) throws Exception { return client.describe_partitioner(); } }, config.getRetryPolicy().duplicate()).getResult();
@Override public String internalExecute(Client client, ConnectionContext context) throws Exception { return client.describe_partitioner(); } }, config.getRetryPolicy().duplicate()).getResult();
@Override public String describe_partitioner() throws TException { return executeHandlingExceptions(() -> client.describe_partitioner()); }
@Override public String describe_partitioner() throws TException { return client.describe_partitioner(); }
@Override @SuppressWarnings("unchecked") public IPartitioner getCassandraPartitioner() throws BackendException { CTConnection conn = null; try { conn = pool.borrowObject(SYSTEM_KS); return FBUtilities.newPartitioner(conn.getClient().describe_partitioner()); } catch (Exception e) { throw new TemporaryBackendException(e); } finally { pool.returnObjectUnsafe(SYSTEM_KS, conn); } }