Source:
<code>private void internalPutMetadataForTables( Map<TableReference, byte[]> unfilteredTableNameToMetadata, boolean possiblyNeedToPerformSettingsChanges) { Map<TableReference, byte[]> tableNameToMetadata = Maps.filterValues( unfilteredTableNameToMetadata, Predicates.not(Predicates.equalTo(AtlasDbConstants.EMPTY_TABLE_METADATA))); if (tableNameToMetadata.isEmpty()) { return; } Map<Cell, byte[]> metadataRequestedForUpdate = Maps.newHashMapWithExpectedSize(tableNameToMetadata.size()); for (Entry<TableReference, byte[]> tableEntry : tableNameToMetadata.entrySet()) { metadataRequestedForUpdate.put(getMetadataCell(tableEntry.getKey()), tableEntry.getValue()); } Map<Cell, Long> requestForLatestDbSideMetadata = Maps.transformValues( metadataRequestedForUpdate, Functions.constant(Long.MAX_VALUE)); Map<Cell, Value> persistedMetadata = get( AtlasDbConstants.DEFAULT_METADATA_TABLE, requestForLatestDbSideMetadata); final Map<Cell, byte[]> newMetadata = Maps.newHashMap(); final Collection<CfDef> updatedCfs = Lists.newArrayList(); for (Entry<Cell, byte[]> entry : metadataRequestedForUpdate.entrySet()) { if (newMetadataFound(persistedMetadata.get(entry.getKey()), entry.getValue())) { newMetadata.put(entry.getKey(), entry.getValue()); } updatedCfs.add(getCfForTable( tableReferenceFromBytes(entry.getKey().getRowName()), <START> entry.getValue())); <END> } if (newMetadata.isEmpty()) { return; } try { putMetadataAndMaybeAlterTables(possiblyNeedToPerformSettingsChanges, newMetadata, updatedCfs); } catch (Exception e) { throw Throwables.throwUncheckedException(e); } }</code><technical_language>a worried moving this out of block lead schema disagreement issues concurrently starting multiple Atlas clients, Cassandra in unhappy state requiring manual intervention</technical_language>

Target:
private void internalPutMetadataForTables( Map<TableReference, byte[]> unfilteredTableNameToMetadata, boolean possiblyNeedToPerformSettingsChanges) { Map<TableReference, byte[]> tableNameToMetadata = Maps.filterValues( unfilteredTableNameToMetadata, Predicates.not(Predicates.equalTo(AtlasDbConstants.EMPTY_TABLE_METADATA))); if (tableNameToMetadata.isEmpty()) { return; } Map<Cell, byte[]> metadataRequestedForUpdate = Maps.newHashMapWithExpectedSize(tableNameToMetadata.size()); for (Entry<TableReference, byte[]> tableEntry : tableNameToMetadata.entrySet()) { metadataRequestedForUpdate.put(getMetadataCell(tableEntry.getKey()), tableEntry.getValue()); } Map<Cell, Long> requestForLatestDbSideMetadata = Maps.transformValues( metadataRequestedForUpdate, Functions.constant(Long.MAX_VALUE)); Map<Cell, Value> persistedMetadata = get( AtlasDbConstants.DEFAULT_METADATA_TABLE, requestForLatestDbSideMetadata); final Map<Cell, byte[]> updatedMetadata = Maps.newHashMap(); final Collection<CfDef> updatedCfs = Lists.newArrayList(); for (Entry<Cell, byte[]> entry : metadataRequestedForUpdate.entrySet()) { if (updatedMetadataFound(persistedMetadata.get(entry.getKey()), entry.getValue())) { updatedMetadata.put(entry.getKey(), entry.getValue()); updatedCfs.add(getCfForTable( tableReferenceFromBytes(entry.getKey().getRowName()), entry.getValue(), configManager.getConfig().gcGraceSeconds())); } } if (!updatedMetadata.isEmpty()) { putMetadataAndMaybeAlterTables(possiblyNeedToPerformSettingsChanges, updatedMetadata, updatedCfs); } }