public String getBarrierState() {
    LOG.info("Reading the barrier state from blob.");
    byte[] data = new byte[(int) BARRIER_STATE_BLOCK_SIZE];
    try {
      blob.downloadRangeToByteArray(JOB_MODEL_BLOCK_SIZE, BARRIER_STATE_BLOCK_SIZE, data, 0);
    } catch (StorageException e) {
      LOG.error("Failed to read barrier state from blob.", e);
      throw new AzureException(e);
    }
    try {
      return SamzaObjectMapper.getObjectMapper().readValue(data, String.class);
    } catch (IOException e) {
      LOG.error("Failed to parse byte data: " + Arrays.toString(data) + " for barrier state retrieved from the blob.", e);
      throw new SamzaException(e);
    }
  }
Reads the current barrier state from the blob.
@return Barrier state published on the blob.
@throws AzureException If an Azure storage service error occurred.
@throws SamzaException If data retrieved from blob could not be parsed by SamzaObjectMapper.
samza-azure/src/main/java/org/apache/samza/util/BlobUtils.java