ettirapp commented on a change in pull request #12581:
URL: https://github.com/apache/beam/pull/12581#discussion_r473160375



##########
File path: 
sdks/java/io/azure/src/main/java/org/apache/beam/sdk/io/azure/blobstore/AzureReadableSeekableByteChannel.java
##########
@@ -44,23 +50,22 @@ public int read(ByteBuffer dst) throws IOException {
     if (closed) {
       throw new ClosedChannelException();
     }
-    if (!dst.hasRemaining()) {
-      return 0;
-    }
 
     int read = 0;
     if (dst.hasArray()) {
       // Stores up to dst.remaining() bytes into dst.array() starting at 
dst.position().
       // But dst can have an offset with its backing array, hence the + 
dst.arrayOffset().
       read = inputStream.read(dst.array(), dst.position() + dst.arrayOffset(), 
dst.remaining());
+      LOG.info("PArray: " + StandardCharsets.UTF_8.decode(dst).toString());
     } else {
       byte[] myarray = new byte[dst.remaining()];
       read = inputStream.read(myarray, 0, myarray.length);
       dst.put(myarray);
+      LOG.info("Array: " + Arrays.toString(myarray));

Review comment:
       Got it, will do.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to