public void systemUpdateKeyspace(KsDef keyspaceDefinition) { try { _client.system_update_keyspace(keyspaceDefinition); } catch (Exception e) { throw Throwables.propagate(e); } }
/** * Update existing keyspace identified by name * @param statement - tree represeting statement */ private void executeUpdateKeySpace(Tree statement) { if (!CliMain.isConnected()) return; try { String keyspaceName = CliCompiler.getKeySpace(statement, thriftClient.describe_keyspaces()); KsDef currentKsDef = getKSMetaData(keyspaceName); KsDef updatedKsDef = updateKsDefAttributes(statement, currentKsDef); String mySchemaVersion = thriftClient.system_update_keyspace(updatedKsDef); sessionState.out.println(mySchemaVersion); keyspacesMap.remove(keyspaceName); getKSMetaData(keyspaceName); } catch (InvalidRequestException e) { throw new RuntimeException(e); } catch (Exception e) { throw new RuntimeException(e); } }
@Override public String execute(Cassandra.Client cassandra) throws HectorException { try { if (waitForSchemaAgreement) { waitForSchemaAgreement(cassandra); } String schemaId = cassandra.system_update_keyspace(toThriftImplementation(ksdef).toThrift()); if (waitForSchemaAgreement) { waitForSchemaAgreement(cassandra); } return schemaId; } catch (Exception e) { throw xtrans.translate(e); } } };
@Override public String execute(Cassandra.Client cassandra) throws HectorException { try { if (waitForSchemaAgreement) { waitForSchemaAgreement(cassandra); } String schemaId = cassandra.system_update_keyspace(toThriftImplementation(ksdef).toThrift()); if (waitForSchemaAgreement) { waitForSchemaAgreement(cassandra); } return schemaId; } catch (Exception e) { throw xtrans.translate(e); } } };
@Override public String system_update_keyspace(KsDef ks_def) throws InvalidRequestException, TException, SchemaDisagreementException { return client.system_update_keyspace(ks_def); }
@Override public SchemaChangeResult internalExecute(Client client, ConnectionContext context) throws Exception { precheckSchemaAgreement(client); return new SchemaChangeResponseImpl().setSchemaId(client.system_update_keyspace(ksDef)); } }, RunOnce.get());
@Override public SchemaChangeResult internalExecute(Client client, ConnectionContext context) throws Exception { precheckSchemaAgreement(client); return new SchemaChangeResponseImpl().setSchemaId(client.system_update_keyspace(ksDef)); } }, RunOnce.get());
@Override public String system_update_keyspace(KsDef ks_def) throws InvalidRequestException, SchemaDisagreementException, TException { return executeHandlingExceptions(() -> client.system_update_keyspace(ks_def)); }
@Override public SchemaChangeResult internalExecute(Client client, ConnectionContext context) throws Exception { precheckSchemaAgreement(client); return new SchemaChangeResponseImpl().setSchemaId(client.system_update_keyspace(def)); } });
@Override public String system_update_keyspace(KsDef ks_def) throws InvalidRequestException, TException, SchemaDisagreementException { return client.system_update_keyspace(ks_def); }
@Override public SchemaChangeResult internalExecute(Client client, ConnectionContext context) throws Exception { precheckSchemaAgreement(client); return new SchemaChangeResponseImpl().setSchemaId(client.system_update_keyspace(def)); } });
@Override public String execute(Cassandra.Client cassandra) throws HectorException { try { if (waitForSchemaAgreement) { waitForSchemaAgreement(cassandra); } String schemaId = cassandra.system_update_keyspace(toThriftImplementation(ksdef).toThrift()); if (waitForSchemaAgreement) { waitForSchemaAgreement(cassandra); } return schemaId; } catch (Exception e) { throw xtrans.translate(e); } } };
@Override public String system_update_keyspace(KsDef ks_def) throws InvalidRequestException, SchemaDisagreementException, TException { return executeHandlingExceptions(() -> client.system_update_keyspace(ks_def)); }
@Override public String system_update_keyspace(KsDef ks_def) throws InvalidRequestException, TException, SchemaDisagreementException { return client.system_update_keyspace(ks_def); }