private void verifyApplicationCFs ( ApplicationDefinition oldAppDef , ApplicationDefinition appDef ) { // Add new table-level CFs: Tenant tenant = Tenant . getTenant ( appDef ) ; DBService dbService = DBService . instance ( tenant ) ; for ( TableDefinition tableDef : appDef . getTableDefinitions ( ) . values ( ) ) { dbService . createStoreIfAbsent ( objectsStoreName ( tableDef ) , true ) ; dbService . createStoreIfAbsent ( termsStoreName ( tableDef ) , true ) ; } // Delete obsolete table-level CFs: if ( oldAppDef != null ) { for ( TableDefinition oldTableDef : oldAppDef . getTableDefinitions ( ) . values ( ) ) { if ( appDef . getTableDef ( oldTableDef . getTableName ( ) ) == null ) { dbService . deleteStoreIfPresent ( objectsStoreName ( oldTableDef ) ) ; dbService . deleteStoreIfPresent ( termsStoreName ( oldTableDef ) ) ; } } } }
Verify that all ColumnFamilies needed for the given application exist .