Skip to content

TEZ-4548: InputDataInformationEvent to be read from serialized payload from filesystem - #341

Merged
abstractdog merged 6 commits into
apache:masterfrom
abstractdog:TEZ-4548
Apr 2, 2024
Merged

TEZ-4548: InputDataInformationEvent to be read from serialized payload from filesystem#341
abstractdog merged 6 commits into
apache:masterfrom
abstractdog:TEZ-4548

Conversation

@abstractdog

@abstractdogabstractdog commented Mar 30, 2024

Copy link
Copy Markdown
Contributor

This patch implements the tez side of the scenario described in HIVE-28165 + TEZ-4548.

tez-api changes:

  • extend InputDataInformationEvent with serialized path
  • test coverage for API methods

tez-runtime-internals:

  • adjust proto converters to the new field

tez-mapreduce changes:

  • MRInput to handle serialized path if found in the event
  • basic test coverage for the implementation methods in MRInputHelpers

testing: tested on cluster (together with HIVE-28165), solved an OOM issue, also tez unit tests added

@tez-yetus

This comment was marked as outdated.

@abstractdog
abstractdogforce-pushed the TEZ-4548 branch 2 times, most recently from c583b70 to bca30d1CompareMarch 30, 2024 11:15
@tez-yetus

This comment was marked as outdated.

@tez-yetus

This comment was marked as outdated.

@abstractdog

Copy link
Copy Markdown
ContributorAuthor

@ayushtkn : can you please take a look at this one?

@tez-yetus

This comment was marked as outdated.

@tez-yetus

This comment was marked as outdated.

@tez-yetus

This comment was marked as outdated.

@tez-yetus

This comment was marked as outdated.

@ayushtknayushtkn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

few comments

proto.hasUserPayload() ? proto.getUserPayload().asReadOnlyByteBuffer() : null);
ByteBuffer payload = proto.hasUserPayload() ? proto.getUserPayload().asReadOnlyByteBuffer() : null;
InputDataInformationEvent diEvent = null;
if (!proto.getSerializedPath().isEmpty()) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

At this point, there maybe a possibility that payload wasn't null as well, but we ignored that because there was a serializedPath?
Should we throw out in that case?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

idea was: if there is serializedPath, we just use it and don't care about payload, we should have one or another, not both
I think the static InputDataInformationEvent creator methods take care of not having both
is it fine?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

should be ok if it can never reach & there is no public method which can reach here, else maybe we can have Preconditions or Assert to see we don't land up having two source of truth accidentally even in future, but I am ok

@abstractdog

Copy link
Copy Markdown
ContributorAuthor

thanks for the comments @ayushtkn, addressed them in 5649494

@tez-yetus

This comment was marked as outdated.

@ayushtknayushtkn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanx @abstractdog for the update. There are some checkstyle warnings can you take care of them, rest things LGTM

@abstractdog

abstractdog commented Apr 2, 2024

Copy link
Copy Markdown
ContributorAuthor

Thanx @abstractdog for the update. There are some checkstyle warnings can you take care of them, rest things LGTM

thanks!
I addressed what I could have (renaming some fields)
8b5a97c

I cannot address [HiddenField], I consider it as noise now

let me know if it's fine

@ayushtkn

Copy link
Copy Markdown
Member

I cannot address [HiddenField], I consider it as noise now

@abstractdog that HiddenField should be fixable, it is telling you have localFs already defined above & you are redefining the same variable name in the test method, rather than using the class variable

diff --git a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestMRInputHelpers.java b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestMRInputHelpers.java
index c97158d14..a7501e8ae 100644
--- a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestMRInputHelpers.java
+++ b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestMRInputHelpers.java
@@ -217,7 +217,6 @@ public class TestMRInputHelpers {
public void testInputEventSerializedPath() throws IOException {
MRSplitProto proto = MRSplitProto.newBuilder().setSplitBytes(ByteString.copyFrom("splits".getBytes())).build();
- FileSystem localFs = FileSystem.getLocal(conf);
Path splitsDir = localFs.resolvePath(localTestRootDir);
Path serializedPath = new Path(splitsDir + Path.SEPARATOR + "splitpayload");
@@ -282,7 +281,6 @@ public class TestMRInputHelpers {
@Test(timeout = 5000)
public void testInputSplitLocalResourceCreationWithDifferentFS() throws Exception {
- FileSystem localFs = FileSystem.getLocal(conf);
Path splitsDir = localFs.resolvePath(localTestRootDir);
DataSourceDescriptor dataSource = generateDataSourceDescriptorMapRed(splitsDir);

Just remove that line FileSystem localFs = FileSystem.getLocal(conf); line and it should work

@abstractdog

This comment was marked as outdated.

@abstractdog

abstractdog commented Apr 2, 2024

Copy link
Copy Markdown
ContributorAuthor

I cannot address [HiddenField], I consider it as noise now

@abstractdog that HiddenField should be fixable, it is telling you have localFs already defined above & you are redefining the same variable name in the test method, rather than using the class variable

diff --git a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestMRInputHelpers.java b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestMRInputHelpers.java
index c97158d14..a7501e8ae 100644
--- a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestMRInputHelpers.java
+++ b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestMRInputHelpers.java
@@ -217,7 +217,6 @@ public class TestMRInputHelpers {
public void testInputEventSerializedPath() throws IOException {
MRSplitProto proto = MRSplitProto.newBuilder().setSplitBytes(ByteString.copyFrom("splits".getBytes())).build();
- FileSystem localFs = FileSystem.getLocal(conf);
Path splitsDir = localFs.resolvePath(localTestRootDir);
Path serializedPath = new Path(splitsDir + Path.SEPARATOR + "splitpayload");
@@ -282,7 +281,6 @@ public class TestMRInputHelpers {
@Test(timeout = 5000)
public void testInputSplitLocalResourceCreationWithDifferentFS() throws Exception {
- FileSystem localFs = FileSystem.getLocal(conf);
Path splitsDir = localFs.resolvePath(localTestRootDir);
DataSourceDescriptor dataSource = generateDataSourceDescriptorMapRed(splitsDir);

Just remove that line FileSystem localFs = FileSystem.getLocal(conf); line and it should work

LOL, right, I haven't checked it in detail, I thought it was the another checkstyle warning which is usually a noise :) fixed in 9dce61e

@tez-yetus

This comment was marked as outdated.

@tez-yetus

This comment was marked as outdated.

@tez-yetus

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec26m 35sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗prototool0m 0sprototool was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 5 new or modified test files.
_ master Compile Tests _
+0 🆗mvndep6m 13sMaven dependency ordering for branch
+1 💚mvninstall12m 44smaster passed
+1 💚compile2m 21smaster passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu222.04.1
+1 💚compile2m 6smaster passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~22.04-b06
+1 💚checkstyle2m 9smaster passed
+1 💚javadoc2m 2smaster passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu222.04.1
+1 💚javadoc1m 46smaster passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~22.04-b06
+0 🆗spotbugs1m 18sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs4m 26smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 10sMaven dependency ordering for patch
+1 💚mvninstall1m 24sthe patch passed
+1 💚compile1m 33sthe patch passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu222.04.1
+1 💚cc1m 33sthe patch passed
+1 💚javac1m 33sthe patch passed
+1 💚compile1m 23sthe patch passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~22.04-b06
+1 💚cc1m 23sthe patch passed
+1 💚javac1m 23sthe patch passed
+1 💚checkstyle0m 12sThe patch passed checkstyle in tez-api
+1 💚checkstyle0m 10sThe patch passed checkstyle in tez-runtime-internals
+1 💚checkstyle0m 11stez-mapreduce: The patch generated 0 new + 43 unchanged - 2 fixed = 43 total (was 45)
+1 💚checkstyle0m 20sThe patch passed checkstyle in tez-dag
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc1m 0sthe patch passed with JDK Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu222.04.1
+1 💚javadoc0m 59sthe patch passed with JDK Private Build-1.8.0_402-8u402-ga-2ubuntu1~22.04-b06
+1 💚findbugs3m 45sthe patch passed
_ Other Tests _
+1 💚unit2m 17stez-api in the patch passed.
+1 💚unit0m 37stez-runtime-internals in the patch passed.
+1 💚unit1m 22stez-mapreduce in the patch passed.
+1 💚unit4m 56stez-dag in the patch passed.
+1 💚asflicense0m 40sThe patch does not generate ASF License warnings.
83m 13s
SubsystemReport/Notes
DockerClientAPI=1.44 ServerAPI=1.44 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-341/11/artifact/out/Dockerfile
GITHUB PR#341
JIRA IssueTEZ-4548
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs checkstyle compile cc prototool
unameLinux 14c63bf90eaa 5.15.0-94-generic #104-Ubuntu SMP Tue Jan 9 15:25:40 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitypersonality/tez.sh
git revisionmaster / 34bb628
Default JavaPrivate Build-1.8.0_402-8u402-ga-2ubuntu1~22.04-b06
Multi-JDK versions/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.22+7-post-Ubuntu-0ubuntu222.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_402-8u402-ga-2ubuntu1~22.04-b06
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-341/11/testReport/
Max. process+thread count490 (vs. ulimit of 5500)
modulesC: tez-api tez-runtime-internals tez-mapreduce tez-dag U: .
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-341/11/console
versionsgit=2.34.1 maven=3.6.3 findbugs=3.0.1
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@abstractdog

Copy link
Copy Markdown
ContributorAuthor

tests passed green
considering @ayushtkn 's LGTM an approval, will merge this soon in case of no further objections

@abstractdog
abstractdog merged commit f080031 into apache:masterApr 2, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@abstractdog@tez-yetus@ayushtkn@aturoczy