public void writeJobCoordinatorMetadata(JobCoordinatorMetadata metadata) {
    Preconditions.checkNotNull(metadata, "Job coordinator metadata cannot be null");

    try {
      String metadataValueString = metadataMapper.writeValueAsString(metadata);
      metadataStore.put(clusterType.name(), valueSerde.toBytes(metadataValueString));
      LOG.info("Successfully written job coordinator metadata: {} for cluster {}.", metadata, clusterType);
    } catch (Exception e) {
      metrics.incrementMetadataWriteFailedCount();
      LOG.error("Failed to write the job coordinator metadata to metadata store due to ", e);
      throw new SamzaException("Failed to write the job coordinator metadata.", e);
    }
  }
Persist the {@link JobCoordinatorMetadata} in metadata store. The job coordinator metadata is associated
with the cluster type specified at the creation of the manager.

@param metadata metadata to be persisted

@throws SamzaException in case of exception encountered during the writes to underlying metadata store
samza-core/src/main/java/org/apache/samza/job/metadata/JobCoordinatorMetadataManager.java