private String getPartitionKey(OutgoingMessageEnvelope messageEnvelope) {
    Object partitionKey = messageEnvelope.getPartitionKey();
    if (partitionKey == null || !(partitionKey instanceof String)) {
      return null;
    }
    return (String) partitionKey;
  }
// find the writer in the writerMap else create one
@param source for which to find/create the writer
@param messageEnvelope to fetch the schema from if writer needs to be created
@return an AzureBlobWriter object
samza-azure/src/main/java/org/apache/samza/system/azureblob/producer/AzureBlobSystemProducer.java