@Override public String addColumnFamily(final ColumnFamilyDefinition cfdef, final boolean waitForSchemaAgreement) throws HectorException { Operation<String> op = new Operation<String>(OperationType.META_WRITE, FailoverPolicy.FAIL_FAST, cfdef.getKeyspaceName(), getCredentials()) { @Override public String execute(Cassandra.Client cassandra) throws HectorException { try { if (waitForSchemaAgreement) { waitForSchemaAgreement(cassandra); } String schemaId = cassandra.system_add_column_family(toThriftImplementation(cfdef).toThrift()); if (waitForSchemaAgreement) { waitForSchemaAgreement(cassandra); } return schemaId; } catch (Exception e) { throw xtrans.translate(e); } } }; connectionManager.operateWithFailover(op); return op.getResult(); }
@Override public String updateColumnFamily(final ColumnFamilyDefinition cfdef, final boolean waitForSchemaAgreement) throws HectorException { Operation<String> op = new Operation<String>(OperationType.META_WRITE, FailoverPolicy.FAIL_FAST, cfdef.getKeyspaceName(), getCredentials()) { @Override public String execute(Cassandra.Client cassandra) throws HectorException { try { if (waitForSchemaAgreement) { waitForSchemaAgreement(cassandra); } String schemaId = cassandra.system_update_column_family(toThriftImplementation(cfdef).toThrift()); if (waitForSchemaAgreement) { waitForSchemaAgreement(cassandra); } return schemaId; } catch (Exception e) { throw xtrans.translate(e); } } }; connectionManager.operateWithFailover(op); return op.getResult(); }
keyspaceName = columnFamilyDefinition.getKeyspaceName(); name = columnFamilyDefinition.getName(); columnType = columnFamilyDefinition.getColumnType();
@Override public String updateColumnFamily(final ColumnFamilyDefinition cfdef, final boolean waitForSchemaAgreement) throws HectorException { Operation<String> op = new Operation<String>(OperationType.META_WRITE, FailoverPolicy.FAIL_FAST, cfdef.getKeyspaceName(), getCredentials()) { @Override public String execute(Cassandra.Client cassandra) throws HectorException { try { if (waitForSchemaAgreement) { waitForSchemaAgreement(cassandra); } String schemaId = cassandra.system_update_column_family(toThriftImplementation(cfdef).toThrift()); if (waitForSchemaAgreement) { waitForSchemaAgreement(cassandra); } return schemaId; } catch (Exception e) { throw xtrans.translate(e); } } }; connectionManager.operateWithFailover(op); return op.getResult(); }
@Override public String addColumnFamily(final ColumnFamilyDefinition cfdef, final boolean waitForSchemaAgreement) throws HectorException { Operation<String> op = new Operation<String>(OperationType.META_WRITE, FailoverPolicy.FAIL_FAST, cfdef.getKeyspaceName(), getCredentials()) { @Override public String execute(Cassandra.Client cassandra) throws HectorException { try { if (waitForSchemaAgreement) { waitForSchemaAgreement(cassandra); } String schemaId = cassandra.system_add_column_family(toThriftImplementation(cfdef).toThrift()); if (waitForSchemaAgreement) { waitForSchemaAgreement(cassandra); } return schemaId; } catch (Exception e) { throw xtrans.translate(e); } } }; connectionManager.operateWithFailover(op); return op.getResult(); }
@Override public String updateColumnFamily(final ColumnFamilyDefinition cfdef, final boolean waitForSchemaAgreement) throws HectorException { Operation<String> op = new Operation<String>(OperationType.META_WRITE, FailoverPolicy.FAIL_FAST, cfdef.getKeyspaceName(), getCredentials()) { @Override public String execute(Cassandra.Client cassandra) throws HectorException { try { if (waitForSchemaAgreement) { waitForSchemaAgreement(cassandra); } String schemaId = cassandra.system_update_column_family(toThriftImplementation(cfdef).toThrift()); if (waitForSchemaAgreement) { waitForSchemaAgreement(cassandra); } return schemaId; } catch (Exception e) { throw xtrans.translate(e); } } }; connectionManager.operateWithFailover(op); return op.getResult(); }
@Override public String addColumnFamily(final ColumnFamilyDefinition cfdef, final boolean waitForSchemaAgreement) throws HectorException { Operation<String> op = new Operation<String>(OperationType.META_WRITE, FailoverPolicy.FAIL_FAST, cfdef.getKeyspaceName(), getCredentials()) { @Override public String execute(Cassandra.Client cassandra) throws HectorException { try { if (waitForSchemaAgreement) { waitForSchemaAgreement(cassandra); } String schemaId = cassandra.system_add_column_family(toThriftImplementation(cfdef).toThrift()); if (waitForSchemaAgreement) { waitForSchemaAgreement(cassandra); } return schemaId; } catch (Exception e) { throw xtrans.translate(e); } } }; connectionManager.operateWithFailover(op); return op.getResult(); }
public ThriftCfDef(ColumnFamilyDefinition columnFamilyDefinition) { keyspace = columnFamilyDefinition.getKeyspaceName(); name = columnFamilyDefinition.getName(); columnType = columnFamilyDefinition.getColumnType();
keyspaceName = columnFamilyDefinition.getKeyspaceName(); name = columnFamilyDefinition.getName(); columnType = columnFamilyDefinition.getColumnType();
keyspaceName = columnFamilyDefinition.getKeyspaceName(); name = columnFamilyDefinition.getName(); columnType = columnFamilyDefinition.getColumnType();
public ThriftCfDef(ColumnFamilyDefinition columnFamilyDefinition) { keyspace = columnFamilyDefinition.getKeyspaceName(); name = columnFamilyDefinition.getName(); columnType = columnFamilyDefinition.getColumnType();
public ThriftCfDef(ColumnFamilyDefinition columnFamilyDefinition) { keyspace = columnFamilyDefinition.getKeyspaceName(); name = columnFamilyDefinition.getName(); columnType = columnFamilyDefinition.getColumnType();