public boolean publishLiveProcessorList(List<String> processors, String leaseId) {
    try {
      if (leaseId == null) {
        return false;
      }
      byte[] data = SamzaObjectMapper.getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsBytes(processors);
      byte[] pageData = Arrays.copyOf(data, (int) BARRIER_STATE_BLOCK_SIZE);
      InputStream is = new ByteArrayInputStream(pageData);
      blob.uploadPages(is, JOB_MODEL_BLOCK_SIZE + BARRIER_STATE_BLOCK_SIZE, PROCESSOR_LIST_BLOCK_SIZE, AccessCondition.generateLeaseCondition(leaseId), null, null);
      LOG.info("Uploaded list of live processors to blob.");
      return true;
    } catch (StorageException | IOException e) {
      LOG.error("Processor list: " + processors + "publish failed", e);
      return false;
    }
  }
Writes the list of live processors in the system to the blob.
Write is successful only if the lease ID passed is valid and the processor holds the lease.
Called only by the leader.
@param processors List of live processors to be published on the blob.
@param leaseId LeaseID of the valid lease that the processor holds on the blob. Null if there is no lease.
@return true if write to the blob is successful, false if leaseID is null or an Azure storage service error or IO exception occurred.
samza-azure/src/main/java/org/apache/samza/util/BlobUtils.java