code: public static void doMetaSetPair(AdminClient adminClient,
                                           List<Integer> nodeIds,
                                           Object clusterValue,
                                           Object storesValue) {
              VectorClock updatedClusterVersion = null;
              VectorClock updatedStoresVersion = null;
              for(Integer nodeId: nodeIds) {
                  if(updatedClusterVersion == null && updatedStoresVersion == null) {
                      updatedClusterVersion = (VectorClock) adminClient.metadataMgmtOps.getRemoteMetadata(nodeId,
                                                                                                          MetadataStore.CLUSTER_KEY)
                                                                                       .getVersion();
                      updatedStoresVersion = (VectorClock) adminClient.metadataMgmtOps.getRemoteMetadata(nodeId,
                                                                                                         MetadataStore.STORES_KEY)
                                                                                      .getVersion();
                  } else {
                      updatedClusterVersion = updatedClusterVersion.merge((VectorClock) adminClient.metadataMgmtOps.getRemoteMetadata(nodeId,
                                                                                                                                      MetadataStore.CLUSTER_KEY)
                                                                                                                   .getVersion());
                      updatedStoresVersion = updatedStoresVersion.merge((VectorClock) adminClient.metadataMgmtOps.getRemoteMetadata(nodeId,
                                                                                                                                    MetadataStore.STORES_KEY)
                                                                                                                 .getVersion());
                  }
  
                  // TODO: This will work for now but we should take a step back
                  // and
                  // think about a uniform clock for the metadata values.
                  updatedClusterVersion = updatedClusterVersion.incremented(nodeIds.iterator().next(),
                                                                            System.currentTimeMillis());
                  updatedStoresVersion = updatedStoresVersion.incremented(nodeIds.iterator().next(),
                                                                          System.currentTimeMillis());
              }
              adminClient.metadataMgmtOps.updateRemoteMetadataPair(nodeIds,
                                                                   MetadataStore.CLUSTER_KEY,
                                                                   Versioned.value(clusterValue.toString(),
                                                                                   updatedClusterVersion),
                                                                   MetadataStore.STORES_KEY,
                                                                   Versioned.value(storesValue.toString(),
                                                                                   updatedStoresVersion));
          }
docs: Sets <cluster.xml,stores.xml> metadata pair atomically.
  
  @param adminClient An instance of AdminClient points to given cluster
  @param nodeIds Node ids to set metadata
  @param clusterValue Cluster value to set
  @param storesValue Stores value to set