/** * Drop inverted index table. * * @param tableInfo * the table info */ private void dropInvertedIndexTable(TableInfo tableInfo) { boolean indexTableRequired = CassandraPropertyReader.csmd.isInvertedIndexingEnabled(databaseName)/* ) */ && !tableInfo.getEmbeddedColumnMetadatas().isEmpty(); if (indexTableRequired) { try { cassandra_client.system_drop_column_family(tableInfo.getTableName() + Constants.INDEX_TABLE_SUFFIX); } catch (Exception ex) { if (log.isWarnEnabled()) { log.warn("Error while dropping inverted index table, Caused by: ", ex); } } } }
CassandraCli.client.system_drop_column_family(COLUMN_FAMILY_PROFESSIONAL);
CassandraCli.client.system_drop_column_family("StudentShortPrimitive");
CassandraCli.client.system_drop_column_family("StudentSqlDate");
CassandraCli.client.system_drop_column_family("StudentFloatWrapper");
CassandraCli.client.system_drop_column_family("StudentFloatPrimitive");
CassandraCli.client.system_drop_column_family("StudentBigInteger");
CassandraCli.client.system_drop_column_family("StudentDoublePrimitive");
CassandraCli.client.system_drop_column_family("StudentBigDecimal");
CassandraCli.client.system_drop_column_family("StudentShortWrapper");
CassandraCli.client.system_drop_column_family("StudentInteger");
CassandraCli.client.system_drop_column_family("PERSON");
client.system_drop_column_family(table1); client.system_drop_column_family(table2);
client.system_drop_column_family(table2);
public static boolean dropColumnFamily(String columnFamilyName, String keyspaceName) { try { if (columnFamilyExist(columnFamilyName, keyspaceName)) { client.system_drop_column_family(columnFamilyName); } } catch (InvalidRequestException e) { return true; } catch (SchemaDisagreementException e) { return false; } catch (TException e) { return false; } return false; } }
public static boolean dropColumnFamily(String columnFamilyName, String keyspaceName) { try { if (columnFamilyExist(columnFamilyName, keyspaceName)) { client.system_drop_column_family(columnFamilyName); } } catch (InvalidRequestException e) { return true; } catch (SchemaDisagreementException e) { return false; } catch (TException e) { return false; } return false; } }
/** * Drops column family specified in table info. * * @param tableInfo * the table info * @throws Exception * the exception */ private void dropColumnFamily(TableInfo tableInfo) throws Exception { if (isCql3Enabled(tableInfo)) { dropTableUsingCql(tableInfo); } else { cassandra_client.system_drop_column_family(tableInfo.getTableName()); } }
@Override public String execute(Cassandra.Client cassandra) throws HectorException { try { if (waitForSchemaAgreement) { waitForSchemaAgreement(cassandra); } String schemaId = cassandra.system_drop_column_family(columnFamily); if (waitForSchemaAgreement) { waitForSchemaAgreement(cassandra); } return schemaId; } catch (Exception e) { throw xtrans.translate(e); } } };
@Override public String system_drop_column_family(String column_family) throws InvalidRequestException, TException, SchemaDisagreementException { return client.system_drop_column_family(column_family); }
@Override public String system_drop_column_family(String column_family) throws InvalidRequestException, SchemaDisagreementException, TException { return executeHandlingExceptions(() -> client.system_drop_column_family(column_family)); }