private static List<byte[]> chunkMetadataStoreValue(byte[] value) {
    try {
      byte[] checksum = getCRCChecksum(value);
      byte[] valueWithChecksum = ArrayUtils.addAll(value, checksum);
      List<byte[]> valueSegments = new ArrayList<>();
      int length = valueWithChecksum.length;
      for (int index = 0; index < length; index += VALUE_SEGMENT_SIZE_IN_BYTES) {
        byte[] valueSegment = ArrayUtils.subarray(valueWithChecksum, index, Math.min(index + VALUE_SEGMENT_SIZE_IN_BYTES, length));
        valueSegments.add(valueSegment);
      }
      return valueSegments;
    } catch (Exception e) {
      throw new SamzaException(String.format("Exception occurred when splitting the value: %s to small chunks.", value), e);
    }
  }
Splits the input byte array value into independent byte array segments of 1 MB size.
@param value the input byte array to split.
@return the byte array splitted into independent byte array chunks.
samza-core/src/main/java/org/apache/samza/zk/ZkMetadataStore.java