hanishakoneru commented on a change in pull request #2203: URL: https://github.com/apache/ozone/pull/2203#discussion_r640087808
########## File path: hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/ReaderStrategy.java ########## @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hdds.scm.storage; + +import java.io.IOException; +import java.io.InputStream; + +/** + * A Reader interface to work with InputStream. + */ +public interface ReaderStrategy { Review comment: Similar to implementations of this interface, do you think we can rename to something like ByteReader? ########## File path: hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/read/TestKeyInputStream.java ########## @@ -200,6 +201,8 @@ public void testReadChunk() throws Exception { for (int bufferSize : bufferSizeList) { assertReadFully(data, keyInputStream, bufferSize, 0); keyInputStream.seek(0); + assertReadFullyUseByteBuffer(data, keyInputStream, bufferSize, 0); + keyInputStream.seek(0); Review comment: I meant to say a separate unit test. This is so that the test does not time out in Jenkins. When there is a crunch in resources, tests might take longer to run and there is timeout for each individual test. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
