@Override public void open(long timeout) throws ConnectionException { throw new BadRequestException("BadRequestException"); } },
@Override public void open(long timeout) throws ConnectionException { throw new BadRequestException("BadRequestException"); } },
@Override public OperationResult<SchemaChangeResult> createKeyspace(final Properties props) throws ConnectionException { if (props.containsKey("name") && !props.get("name").equals(getKeyspaceName())) { throw new BadRequestException( String.format("'name' attribute must match keyspace name. Expected '%s' but got '%s'", getKeyspaceName(), props.get("name"))); } final KsDef ksDef; try { ksDef = ThriftUtils.getThriftObjectFromProperties(KsDef.class, props); } catch (Exception e) { throw new BadRequestException("Unable to convert props to keyspace definition"); } return internalCreateKeyspace(ksDef); }
@Override public OperationResult<SchemaChangeResult> createKeyspace(final Properties props) throws ConnectionException { if (props.containsKey("name") && !props.get("name").equals(getKeyspaceName())) { throw new BadRequestException( String.format("'name' attribute must match keyspace name. Expected '%s' but got '%s'", getKeyspaceName(), props.get("name"))); } final KsDef ksDef; try { ksDef = ThriftUtils.getThriftObjectFromProperties(KsDef.class, props); } catch (Exception e) { throw new BadRequestException("Unable to convert props to keyspace definition"); } return internalCreateKeyspace(ksDef); }
@Override public OperationResult<SchemaChangeResult> createColumnFamily(final Properties props) throws ConnectionException { final CfDef def; try { def = ThriftUtils.getThriftObjectFromProperties(CfDef.class, props); } catch (Exception e) { throw new BadRequestException("Error converting properties to CfDef", e); } return internalCreateColumnFamily(def); }
@Override public OperationResult<SchemaChangeResult> updateColumnFamily(final Properties props) throws ConnectionException { final CfDef def; try { def = ThriftUtils.getThriftObjectFromProperties(CfDef.class, props); } catch (Exception e) { throw new BadRequestException("Error converting properties to CfDef", e); } return internalColumnFamily(def); }
@Override public OperationResult<SchemaChangeResult> createColumnFamily(final Properties props) throws ConnectionException { final CfDef def; try { def = ThriftUtils.getThriftObjectFromProperties(CfDef.class, props); } catch (Exception e) { throw new BadRequestException("Error converting properties to CfDef", e); } return internalCreateColumnFamily(def); }
@Override public OperationResult<SchemaChangeResult> updateColumnFamily(final Properties props) throws ConnectionException { final CfDef def; try { def = ThriftUtils.getThriftObjectFromProperties(CfDef.class, props); } catch (Exception e) { throw new BadRequestException("Error converting properties to CfDef", e); } return internalColumnFamily(def); }
@Override public OperationResult<SchemaChangeResult> updateKeyspace(final Properties props) throws ConnectionException { if (props.containsKey("name") && !props.get("name").equals(getKeyspaceName())) { throw new RuntimeException( String.format("'name' attribute must match keyspace name. Expected '%s' but got '%s'", getKeyspaceName(), props.get("name"))); } final KsDef ksDef; try { ksDef = ThriftUtils.getThriftObjectFromProperties(KsDef.class, props); } catch (Exception e) { throw new BadRequestException("Unable to convert properties to KsDef", e); } ksDef.setName(getKeyspaceName()); return internalUpdateKeyspace(ksDef); }
@Override public OperationResult<SchemaChangeResult> createColumnFamily(final Properties props) throws ConnectionException { if (props.containsKey("keyspace") && !props.get("keyspace").equals(getKeyspaceName())) { throw new RuntimeException( String.format("'keyspace' attribute must match keyspace name. Expected '%s' but got '%s'", getKeyspaceName(), props.get("keyspace"))); } CfDef cfDef; try { cfDef = ThriftUtils.getThriftObjectFromProperties(CfDef.class, props); } catch (Exception e) { throw new BadRequestException("Unable to convert properties to CfDef", e); } cfDef.setKeyspace(getKeyspaceName()); return internalCreateColumnFamily(cfDef); }
@Override public OperationResult<SchemaChangeResult> updateKeyspace(final Properties props) throws ConnectionException { if (props.containsKey("name") && !props.get("name").equals(getKeyspaceName())) { throw new RuntimeException( String.format("'name' attribute must match keyspace name. Expected '%s' but got '%s'", getKeyspaceName(), props.get("name"))); } final KsDef ksDef; try { ksDef = ThriftUtils.getThriftObjectFromProperties(KsDef.class, props); } catch (Exception e) { throw new BadRequestException("Unable to convert properties to KsDef", e); } ksDef.setName(getKeyspaceName()); return internalUpdateKeyspace(ksDef); }
@Override public OperationResult<SchemaChangeResult> createColumnFamily(final Properties props) throws ConnectionException { if (props.containsKey("keyspace") && !props.get("keyspace").equals(getKeyspaceName())) { throw new RuntimeException( String.format("'keyspace' attribute must match keyspace name. Expected '%s' but got '%s'", getKeyspaceName(), props.get("keyspace"))); } CfDef cfDef; try { cfDef = ThriftUtils.getThriftObjectFromProperties(CfDef.class, props); } catch (Exception e) { throw new BadRequestException("Unable to convert properties to CfDef", e); } cfDef.setKeyspace(getKeyspaceName()); return internalCreateColumnFamily(cfDef); }
@Override public OperationResult<SchemaChangeResult> createKeyspace(final Properties props) throws ConnectionException { final KsDef def; try { def = ThriftUtils.getThriftObjectFromProperties(KsDef.class, props); if (def.getCf_defs() == null) { def.setCf_defs(Lists.<CfDef>newArrayList()); } } catch (Exception e) { throw new BadRequestException("Error converting properties to KsDef", e); } return internalCreateKeyspace(def); }
@Override public OperationResult<SchemaChangeResult> updateKeyspace(final Properties props) throws ConnectionException { final KsDef def; try { def = ThriftUtils.getThriftObjectFromProperties(KsDef.class, props); if (def.getCf_defs() == null) { def.setCf_defs(Lists.<CfDef>newArrayList()); } } catch (Exception e) { throw new BadRequestException("Error converting properties to KsDef", e); } return internalUpdateKeyspace(def); }
@Override public OperationResult<SchemaChangeResult> updateKeyspace(final Properties props) throws ConnectionException { final KsDef def; try { def = ThriftUtils.getThriftObjectFromProperties(KsDef.class, props); if (def.getCf_defs() == null) { def.setCf_defs(Lists.<CfDef>newArrayList()); } } catch (Exception e) { throw new BadRequestException("Error converting properties to KsDef", e); } return internalUpdateKeyspace(def); }
@Override public OperationResult<SchemaChangeResult> createKeyspace(final Properties props) throws ConnectionException { final KsDef def; try { def = ThriftUtils.getThriftObjectFromProperties(KsDef.class, props); if (def.getCf_defs() == null) { def.setCf_defs(Lists.<CfDef>newArrayList()); } } catch (Exception e) { throw new BadRequestException("Error converting properties to KsDef", e); } return internalCreateKeyspace(def); }
@Override public OperationResult<SchemaChangeResult> updateKeyspace(final Map<String, Object> options) throws ConnectionException { final ThriftKeyspaceDefinitionImpl def = new ThriftKeyspaceDefinitionImpl(); try { def.setFields(options); } catch (Exception e) { throw new BadRequestException("Error converting properties to KsDef", e); } return internalUpdateKeyspace(def.getThriftKeyspaceDefinition()); }
@Override public OperationResult<SchemaChangeResult> updateKeyspace(final Map<String, Object> options) throws ConnectionException { final ThriftKeyspaceDefinitionImpl def = new ThriftKeyspaceDefinitionImpl(); try { def.setFields(options); } catch (Exception e) { throw new BadRequestException("Error converting properties to KsDef", e); } return internalUpdateKeyspace(def.getThriftKeyspaceDefinition()); }
throw new BadRequestException("Path depth of " + path.length() + " not supported for column family \'" + columnFamily.getName() + "\'");
throw new BadRequestException("Path depth of " + path.length() + " not supported for column family \'" + columnFamily.getName() + "\'");