Skip to content

Conversation

@hanishakoneru
Copy link
Contributor

Partial chunk reads and checksum verifications

@hadoop-yetus

This comment has been minimized.

@hanishakoneru
Copy link
Contributor Author

This patch requires more changes (after HDDS-1491 which fixes seek operation).

  1. In BlockInputStream#seek(), it is not sufficient to just check if the required chunkIndex matches with current buffers chunk index and that the buffer has data remaining. Since the buffer might have only a partial chunk, it is possible that it does not cover the position seeked.
  2. In BlockInputStream#readChunkFromContainer(), we should not blindly increment the chunkIndex. The last read might have read only a part of the chunk and the next read may be required to read from the same chunk again.

@hanishakoneru
Copy link
Contributor Author

@bshashikant , @arp7
This PR consists of the patch for Partial Chunk Reads on top of HDDS-1491. The second commit is for the current PR. I posted this way so that we can get started with the review for this PR without getting blocked by HDDS-1491 (which has only checkstyle sign off remaining).

@hanishakoneru
Copy link
Contributor Author

Merger HDDS-1491 and updated this PR to include only changes for this Jira.

@hadoop-yetus

This comment has been minimized.

@hadoop-yetus

This comment has been minimized.

@hadoop-yetus

This comment has been minimized.

@hanishakoneru
Copy link
Contributor Author

Introduced ChunkInputStream and separated the chunk reads from BlockInputStream.
This is an initial patch. I am working on unit tests for this.

@hadoop-yetus

This comment has been minimized.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: Existing only, but is java doc needs to be modified? As it is saying used by Rest Service and ScmClient.
This is used by KeyInputStream, and RpcClient also uses this, for reading data from container chunks we talk to datanode using storageContainer protocol client.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why here returning false, read Javadoc not completely clear of this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think returning false here as we do not implement it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above java doc description needs modification.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Copy link
Contributor

@bharatviswa504 bharatviswa504 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some minor comments. Still reviewing ChunkInputStream class.

@hadoop-yetus

This comment has been minimized.

Copy link
Contributor

@bharatviswa504 bharatviswa504 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @hanishakoneru
Thanks for the improvement.
I have a few minor comments.

@hadoop-yetus

This comment has been minimized.

Redesigned Ozone InputStreams
Fixes

review comments and CI fixes

Findbug and checkstyle fixes
@hadoop-yetus

This comment has been minimized.

@hanishakoneru
Copy link
Contributor Author

/retest

@hadoop-yetus

This comment has been minimized.

@hadoop-yetus

This comment has been minimized.

if (initialized) {
return;
}
Preconditions.checkArgument(chunkOffsets == null);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this Precondition check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just extra precaution so that if new methods are implemented then the stream is not initialized twice. It is not necessary for now though. Removed it.

@bharatviswa504
Copy link
Contributor

Hi @hanishakoneru
Thanks for the update. I see some of the old comments are not addressed.
I have a few minor Nits.

Copy link
Contributor

@bharatviswa504 bharatviswa504 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update @hanishakoneru
+1 LGTM, pending CI.

@hanishakoneru
Copy link
Contributor Author

/retest

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 43 Docker mode activated.
_ Prechecks _
+1 dupname 1 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 3 new or modified test files.
_ trunk Compile Tests _
0 mvndep 36 Maven dependency ordering for branch
+1 mvninstall 533 trunk passed
+1 compile 289 trunk passed
+1 checkstyle 88 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 952 branch has no errors when building and testing our client artifacts.
+1 javadoc 182 trunk passed
0 spotbugs 357 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 571 trunk passed
_ Patch Compile Tests _
0 mvndep 31 Maven dependency ordering for patch
+1 mvninstall 491 the patch passed
-1 compile 79 hadoop-ozone in the patch failed.
-1 javac 79 hadoop-ozone in the patch failed.
-0 checkstyle 45 hadoop-hdds: The patch generated 2 new + 0 unchanged - 0 fixed = 2 total (was 0)
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 730 patch has no errors when building and testing our client artifacts.
+1 javadoc 186 the patch passed
-1 findbugs 87 hadoop-ozone in the patch failed.
_ Other Tests _
-1 unit 168 hadoop-hdds in the patch failed.
-1 unit 58 hadoop-ozone in the patch failed.
+1 asflicense 37 The patch does not generate ASF License warnings.
5136
Reason Tests
Failed junit tests hadoop.ozone.container.common.impl.TestHddsDispatcher
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-804/13/artifact/out/Dockerfile
GITHUB PR #804
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux bd9c34ec87db 4.4.0-144-generic #170~14.04.1-Ubuntu SMP Mon Mar 18 15:02:05 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / cb9bc6e
Default Java 1.8.0_212
compile https://builds.apache.org/job/hadoop-multibranch/job/PR-804/13/artifact/out/patch-compile-hadoop-ozone.txt
javac https://builds.apache.org/job/hadoop-multibranch/job/PR-804/13/artifact/out/patch-compile-hadoop-ozone.txt
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-804/13/artifact/out/diff-checkstyle-hadoop-hdds.txt
findbugs https://builds.apache.org/job/hadoop-multibranch/job/PR-804/13/artifact/out/patch-findbugs-hadoop-ozone.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-804/13/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-804/13/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-804/13/testReport/
Max. process+thread count 340 (vs. ulimit of 5500)
modules C: hadoop-hdds/client hadoop-hdds/common hadoop-ozone/client hadoop-ozone/objectstore-service hadoop-ozone/ozone-manager U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-804/13/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@hanishakoneru
Copy link
Contributor Author

Thank you @bharatviswa504 for the reviews.
There was minor checkstyle issue (unused import) which i fixed. The unit test failure is not related to this patch and passes locally. I will merge this PR.

@hanishakoneru hanishakoneru merged commit a91d24f into apache:trunk Jun 7, 2019
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 54 Docker mode activated.
-1 patch 14 #804 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help.
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-804/14/artifact/out/Dockerfile
GITHUB PR #804
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-804/14/console
versions git=2.7.4
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants