public static JobModel readJobModel(String jobModelVersion, MetadataStore metadataStore) {
    try {
      byte[] jobModelAsBytes = metadataStore.get(getJobModelKey(jobModelVersion));
      return MAPPER.readValue(new String(jobModelAsBytes, UTF_8), JobModel.class);
    } catch (Exception e) {
      throw new SamzaException(String.format("Exception occurred when reading JobModel version: %s from metadata store.", jobModelVersion), e);
    }
  }
Reads and returns the {@link JobModel} from {@link MetadataStore}.
@param metadataStore the metadata store.
@return the job model read from the metadata store.
samza-core/src/main/java/org/apache/samza/job/model/JobModelUtil.java