Delta newDropTable ( ) { Delta storageDelta = Deltas . mapBuilder ( ) . put ( StorageState . DROPPED . getMarkerAttribute ( ) . key ( ) , now ( ) ) . build ( ) ; MapDeltaBuilder storageMapDelta = Deltas . mapBuilder ( ) ; if ( _master != null ) { for ( Storage storage : _master . getPrimaryAndMirrors ( ) ) { storageMapDelta . update ( storage . getUuidString ( ) , storageDelta ) ; } } for ( Storage facade : _facades ) { for ( Storage storage : facade . getPrimaryAndMirrors ( ) ) { storageMapDelta . update ( storage . getUuidString ( ) , storageDelta ) ; } } // Delete most of the information about the table, but leave enough that we can run a job later that // purges all the data out of Cassandra. return Deltas . mapBuilder ( ) . remove ( UUID_ATTR . key ( ) ) . remove ( ATTRIBUTES . key ( ) ) . update ( STORAGE . key ( ) , storageMapDelta . build ( ) ) . removeRest ( ) . build ( ) ; }
Mark an entire table as dropped . A maintenance job will come along later and actually purge the data .