private void snapshotTranslog(Translog.Snapshot snapshot, CommitPoint.FileInfo fileInfo) throws IOException { blobContainer.writeBlob(fileInfo.name(), snapshot.stream(), snapshot.lengthInBytes()); // // long chunkBytes = Long.MAX_VALUE; // if (chunkSize != null) { // chunkBytes = chunkSize.bytes(); // } // // long totalLength = fileInfo.length(); // long numberOfChunks = totalLength / chunkBytes; // if (totalLength % chunkBytes > 0) { // numberOfChunks++; // } // if (numberOfChunks == 0) { // numberOfChunks++; // } // // if (numberOfChunks == 1) { // blobContainer.writeBlob(fileInfo.name(), snapshot.stream(), // snapshot.lengthInBytes()); // } else { // InputStream translogStream = snapshot.stream(); // long totalLengthLeftToWrite = totalLength; // for (int i = 0; i < numberOfChunks; i++) { // long lengthToWrite = chunkBytes; // if (totalLengthLeftToWrite < chunkBytes) { // lengthToWrite = totalLengthLeftToWrite; // } // blobContainer.writeBlob(fileInfo.name() + ".part" + i, new // LimitInputStream(translogStream, lengthToWrite), lengthToWrite); // totalLengthLeftToWrite -= lengthToWrite; // } // } }