Explorar el Código

HDDS-408. Read (getKey) operation is very slow.
Contributed by Nandakumar.

Anu Engineer hace 6 años
padre
commit
be1ec005f1

+ 5 - 0
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/OzoneInputStream.java

@@ -44,6 +44,11 @@ public class OzoneInputStream extends InputStream {
     return inputStream.read();
   }
 
+  @Override
+  public int read(byte[] b, int off, int len) throws IOException {
+    return inputStream.read(b, off, len);
+  }
+
   @Override
   public synchronized void close() throws IOException {
     inputStream.close();

+ 1 - 2
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java

@@ -492,8 +492,7 @@ public class RpcClient implements ClientProtocol {
         ChunkGroupInputStream.getFromOmKeyInfo(
             keyInfo, xceiverClientManager, storageContainerLocationClient,
             requestId);
-    return new OzoneInputStream(
-        (ChunkGroupInputStream)lengthInputStream.getWrappedStream());
+    return new OzoneInputStream(lengthInputStream.getWrappedStream());
   }
 
   @Override