Updates metadata versions on stores.

@param adminClient An instance of AdminClient points to given cluster
@param oldStoreDefs List of old store definitions
@param newStoreDefs List of new store definitions
768440
public static void doMetaUpdateVersionsOnStores(AdminClient adminClient,
                                                        List<StoreDefinition> oldStoreDefs,
                                                        List<StoreDefinition> newStoreDefs) {
            Set<String> storeNamesUnion = new HashSet<String>();
            Map<String, StoreDefinition> oldStoreDefinitionMap = new HashMap<String, StoreDefinition>();
            Map<String, StoreDefinition> newStoreDefinitionMap = new HashMap<String, StoreDefinition>();
            List<String> storesChanged = new ArrayList<String>();
            for(StoreDefinition storeDef: oldStoreDefs) {
                String storeName = storeDef.getName();
                storeNamesUnion.add(storeName);
                oldStoreDefinitionMap.put(storeName, storeDef);
            }
            for(StoreDefinition storeDef: newStoreDefs) {
                String storeName = storeDef.getName();
                storeNamesUnion.add(storeName);
                newStoreDefinitionMap.put(storeName, storeDef);
            }
            for(String storeName: storeNamesUnion) {
                StoreDefinition oldStoreDef = oldStoreDefinitionMap.get(storeName);
                StoreDefinition newStoreDef = newStoreDefinitionMap.get(storeName);
                if(oldStoreDef == null && newStoreDef != null || oldStoreDef != null
                   && newStoreDef == null || oldStoreDef != null && newStoreDef != null
                   && !oldStoreDef.equals(newStoreDef)) {
                    storesChanged.add(storeName);
                }
            }
            System.out.println("Updating metadata version for the following stores: "
                               + storesChanged);
            try {
                adminClient.metadataMgmtOps.updateMetadataversion(adminClient.getAdminClientCluster()
                                                                             .getNodeIds(),
                                                                  storesChanged);
            } catch(Exception e) {
                System.err.println("Error while updating metadata version for the specified store.");
            }
        }
1009108
@Override
    protected void update(List<TableInfo> tableInfos)
    {
        if (!clusterManager.hasBucket(databaseName))
        {
            addBucket(databaseName);
            createIdIndex(databaseName);
        }
    }
90319
public static void updateMetadata(CacheEntry entry, Metadata providedMetadata) {
      if (entry != null && providedMetadata != null) {
         Metadata mergedMetadata;
         if (entry.getMetadata() == null) {
            mergedMetadata = providedMetadata;
         } else {
            mergedMetadata = applyVersion(entry.getMetadata(), providedMetadata);
         }
         entry.setMetadata(mergedMetadata);
      }
   }
1013804
@Override
    public <K, V> StoreClient<K, V> getStoreClient(final String storeName,
                                                   final InconsistencyResolver<Versioned<V>> resolver) {
        // wrap it in LazyStoreClient here so any direct calls to this method
        // returns a lazy client
        return new LazyStoreClient<K, V>(new Callable<StoreClient<K, V>>() {

            @Override
            public StoreClient<K, V> call() throws Exception {
                Store<K, V, Object> clientStore = getRawStore(storeName, resolver);
                return new RESTClient<K, V>(storeName, clientStore);
            }
        }, true);
    }
974715
public static void setProperties(SystemStoreClient<String, String> versionStore,
                                     Properties props) {
        if (props == null) {
            logger.info("Ignoring set for empty properties");
            return;
        }

        try {
            String versionString = getPropertiesString(props);
            versionStore.putSysStore(SystemStoreConstants.VERSIONS_METADATA_KEY,
                                     versionString);
        } catch(Exception e) {
            logger.info("Got exception in setting properties : ", e);
        }
    }
651348
public void setVersions(java.util.Collection<VersionInformation> versions) {
        if (versions == null) {
            this.versions = null;
            return;
        }

        this.versions = new java.util.ArrayList<VersionInformation>(versions);
    }
574188
@Deprecated
	public static void updateSettings(Client client, String root, String index) throws Exception {
		String settings = IndexSettingsReader.readUpdateSettings(root, index);
		updateIndexWithSettingsInElasticsearch(client, index, settings);
	}
1083635
@SuppressWarnings("unchecked")
    public synchronized <K, V> StoreClient<K, V> getStoreClient(String storeName,
                                                   InconsistencyResolver<Versioned<V>> resolver) {
        Pair<String, Object> key = Pair.create(storeName, (Object) resolver);
        if(!cache.containsKey(key)) {
            StoreClient<K, V> result = inner.getStoreClient(storeName, resolver);
            cache.putIfAbsent(key, result);
        }

        return (StoreClient<K, V>) cache.get(key);
    }
549638
public AtlasTypesDef updateAtlasTypeDefs(final AtlasTypesDef typesDef) throws AtlasServiceException {
        return callAPI(UPDATE_ALL_TYPE_DEFS, AtlasTypesDef.class, AtlasType.toJson(typesDef));
    }
412486
public void setVersions(java.util.Collection<SecretVersionsListEntry> versions) {
        if (versions == null) {
            this.versions = null;
            return;
        }

        this.versions = new java.util.ArrayList<SecretVersionsListEntry>(versions);
    }
322625
public void updateDataOnly(Transaction tran, ObjectStore store) throws PersistenceException, ObjectManagerException, SevereMessageStoreException
    {
        updateDataOnly(tran, store, this);
    }
598825
public void setApplicationVersions(java.util.Collection<ApplicationVersionDescription> applicationVersions) {
        if (applicationVersions == null) {
            this.applicationVersions = null;
            return;
        }

        this.applicationVersions = new com.amazonaws.internal.SdkInternalList<ApplicationVersionDescription>(applicationVersions);
    }
1257291
public static void updateCatalogToZK(ZooKeeper zk,
                                        int version,
                                        long genId,
                                        byte[] catalogBytes,
                                        byte[] catalogHash,
                                        byte[] deploymentBytes)
        throws KeeperException, InterruptedException
    {
        ByteBuffer versionAndBytes = makeCatalogAndDeploymentBytes(version, genId,
                catalogBytes, catalogHash, deploymentBytes);
        zk.setData(VoltZK.catalogbytes, versionAndBytes.array(), -1);
    }
904085
public void setStoreSalesUploadCommonMetadata(com.google.api.ads.adwords.axis.v201809.rm.StoreSalesUploadCommonMetadata storeSalesUploadCommonMetadata) {
        this.storeSalesUploadCommonMetadata = storeSalesUploadCommonMetadata;
    }
398202
private void updateKeySetForBlobStore(Set<String> keySetBlobStore, CuratorFramework zkClient) {
        try {
            for (String key : keySetBlobStore) {
                LOG.debug("updating blob");
                BlobStoreUtils.updateKeyForBlobStore(conf, blobStore, zkClient, key, nimbusInfo);
            }
        } catch (Exception exp) {
            throw new RuntimeException(exp);
        }
    }
1147375
public static ClientAffinityStats diff(ClientAffinityStats newer, ClientAffinityStats older) {
        if (newer.m_partitionId != older.m_partitionId) {
            throw new IllegalArgumentException("Can't diff these ClientAffinityStats instances.");
        }

        ClientAffinityStats retval = new ClientAffinityStats(older.m_partitionId,
                newer.m_affinityWrites - older.m_affinityWrites,
                newer.m_rrWrites - older.m_rrWrites,
                newer.m_affinityReads - older.m_affinityReads,
                newer.m_rrReads - older.m_rrReads);
        return retval;
    }
1123162
CompletableFuture<Void> update(PartitionMetadata metadata, PartitionManagementService managementService) {
    if (server == null && metadata.members().contains(managementService.getMembershipService().getLocalMember().id())) {
      server = createServer(managementService);
      return server.join(metadata.members());
    } else if (server != null && !metadata.members().contains(managementService.getMembershipService().getLocalMember().id())) {
      return server.leave().thenRun(() -> server = null);
    }
    return CompletableFuture.completedFuture(null);
  }