public void applyModels() throws IOException { // reinitialize the table. KSMetaData ksm = NodeDescriptor.getTableDefinition(cfm.ksName); ksm = makeNewKeyspaceDefinition(ksm); try { CFMetaData.map(cfm); } catch (ConfigurationException ex) { throw new IOException(ex); } Table.open( cfm.ksName); // make sure it's init-ed w/ the old definitions first, since we're going to // call initCf on the new one manually NodeDescriptor.setTableDefinition(ksm, newVersion); // these definitions could have come from somewhere else. CFMetaData.fixMaxId(); if (!StorageService.instance.isClientMode()) Table.open(ksm.name).initCf(cfm.cfId, cfm.cfName); }