Skip to content

TEZ-3363: Delete intermediate data at the vertex level for Shuffle Handler - #60

Merged
abstractdog merged 1 commit into
apache:masterfrom
shameersss1:TEZ-3363
Mar 16, 2022
Merged

TEZ-3363: Delete intermediate data at the vertex level for Shuffle Handler#60
abstractdog merged 1 commit into
apache:masterfrom
shameersss1:TEZ-3363

Conversation

@shameersss1

@shameersss1shameersss1 commented Feb 20, 2020

Copy link
Copy Markdown
Contributor

For applications like pig where processing times can be very long, applications may choose to delete intermediate data for a sub dag. For example if a DAG has synced data to HDFS, all upstream intermediate data can be safely deleted.

@tez-yetus

This comment was marked as outdated.

@tez-yetus

This comment was marked as outdated.

@shameersss1

Copy link
Copy Markdown
ContributorAuthor

@abstractdog Could you please review the changes?

@abstractdog

abstractdog commented Feb 7, 2022

Copy link
Copy Markdown
Contributor

@shameersss1: I'm more than interested in this patch, let me have some time to review it
this needs more thorough testing than TEZ-4129 as TEZ-4129 was on the unhappy code path (failed attempts), but this one seriously affects shuffle
could you please describe what kind of testing process have you done with this patch?

@shameersss1

Copy link
Copy Markdown
ContributorAuthor

@shameersss1: I'm more than interested in this patch, let me have some time to review it this needs more thorough testing than TEZ-4129 as TEZ-4129 was on the unhappy code path (failed attempts), but this one seriously affects shuffle could you please describe what kind of testing process have you done with this patch?

@abstractdog - Thanks for showing interest to review. It has been pending for a while now.

The high level idea behind this feature is that, Whenever all the dependent vertex of a particular vertex have succeeded we delete the vertex shuffle data of that particular/parent vertex.

Testing Procedure

  1. I picked a query which spawns a big dag (preferably some TPC-DS query) which runs to quite some time. I changed number of max reducers to 1 so that the final stage takes time
  2. I checked if the shuffle data of the parent vertex are deleted when all the dependent vertex succeeded.

@shameersss1

Copy link
Copy Markdown
ContributorAuthor

@shameersss1: I'm more than interested in this patch, let me have some time to review it this needs more thorough testing than TEZ-4129 as TEZ-4129 was on the unhappy code path (failed attempts), but this one seriously affects shuffle could you please describe what kind of testing process have you done with this patch?

@abstractdog Could you please review the changes?

@abstractdog

abstractdog commented Mar 2, 2022

Copy link
Copy Markdown
Contributor

@shameersss1: sorry, I haven't had the chance, I want to test this on a cluster too, where I face some issues at the moment, also I'm busy with other changes, let me get back to you in 2 weeks, thanks for your patience!

Comment threadtez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java Outdated
Comment threadtez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/DAGImpl.java Outdated
Comment threadtez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java Outdated
@tez-yetus

This comment was marked as outdated.

@abstractdog

Copy link
Copy Markdown
Contributor

please rebase on top of master, latest compilation error could be due to TEZ-4227

@shameersss1

Copy link
Copy Markdown
ContributorAuthor

please rebase on top of master, latest compilation error could be due to TEZ-4227

Rebased to latest master. pending tests

@tez-yetus

This comment was marked as outdated.

@tez-yetus

This comment was marked as outdated.

Comment threadtez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java Outdated
vertex.appContext.getAppMaster().vertexComplete(
vertex.vertexId, nodes);
} else {
LOG.debug(String.format("The number of incomplete child vertex are %s for the vertex %s",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please use logger format here {} {}, String.format is not necessary

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.

ack. Will resolve in next revision.

Comment threadtez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/DAGImpl.java Outdated

@abstractdogabstractdog left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

left very minor comments, this is very close @shameersss1 !

@shameersss1

Copy link
Copy Markdown
ContributorAuthor

left very minor comments, this is very close @shameersss1 !

I have resolved the comments. Thanks for your valuable feedback.

@tez-yetus

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 28sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 3 new or modified test files.
_ master Compile Tests _
+0 🆗mvndep5m 9sMaven dependency ordering for branch
+1 💚mvninstall9m 18smaster passed
+1 💚compile2m 51smaster passed with JDK Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04
+1 💚compile2m 41smaster passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚checkstyle3m 2smaster passed
+1 💚javadoc2m 47smaster passed with JDK Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04
+1 💚javadoc2m 30smaster passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+0 🆗spotbugs0m 42sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs4m 56smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 10sMaven dependency ordering for patch
+1 💚mvninstall1m 47sthe patch passed
+1 💚compile1m 44sthe patch passed with JDK Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04
+1 💚javac1m 44sthe patch passed
+1 💚compile1m 33sthe patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚javac1m 33sthe patch passed
-0 ⚠️checkstyle0m 35stez-dag: The patch generated 3 new + 609 unchanged - 1 fixed = 612 total (was 610)
-0 ⚠️checkstyle0m 11stez-plugins/tez-aux-services: The patch generated 3 new + 67 unchanged - 0 fixed = 70 total (was 67)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc1m 30sthe patch passed with JDK Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04
+1 💚javadoc1m 24sthe patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚findbugs4m 6sthe patch passed
_ Other Tests _
+1 💚unit2m 7stez-api in the patch passed.
+1 💚unit0m 26stez-common in the patch passed.
+1 💚unit4m 30stez-runtime-library in the patch passed.
+1 💚unit4m 28stez-dag in the patch passed.
+1 💚unit2m 42stez-aux-services in the patch passed.
+1 💚asflicense0m 48sThe patch does not generate ASF License warnings.
64m 27s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-60/7/artifact/out/Dockerfile
GITHUB PR#60
JIRA IssueTEZ-3363
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs checkstyle compile
unameLinux dd0e9beab074 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitypersonality/tez.sh
git revisionmaster / 132ea4c
Default JavaPrivate Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Multi-JDK versions/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
checkstylehttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-60/7/artifact/out/diff-checkstyle-tez-dag.txt
checkstylehttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-60/7/artifact/out/diff-checkstyle-tez-plugins_tez-aux-services.txt
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-60/7/testReport/
Max. process+thread count2099 (vs. ulimit of 5500)
modulesC: tez-api tez-common tez-runtime-library tez-dag tez-plugins/tez-aux-services U: .
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-60/7/console
versionsgit=2.25.1 maven=3.6.3 findbugs=3.0.1
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@shameersss1

Copy link
Copy Markdown
ContributorAuthor

@abstractdog - Are we good to take it forward?

@abstractdog

abstractdog commented Mar 16, 2022

Copy link
Copy Markdown
Contributor

warnings here are easily addressable: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-60/7/artifact/out/diff-checkstyle-tez-plugins_tez-aux-services.txt
please fix those and then this can be merged

}

@VisibleForTesting
public VertexShuffleDataDeletionContext getVShuffleDeletionContext() {

@abstractdogabstractdogMar 16, 2022

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this is not used currently in any of the tests, vShuffleDeletionContext can remain private to VertexImpl
I'm fine with leaving this part uncovered, can you please remove this method?
(sorry, last minute comments :) )

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.

This is used by testVertexShuffleDelete() in TestVertexImpl

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

okay, missed it sorry, in this case, you can remove public keyword (make it package visible) to enhance "VisibleForTesting" behavior

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.

ack. I will fix it in next revision.

@shameersss1

Copy link
Copy Markdown
ContributorAuthor

warnings here are easily addressable: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-60/7/artifact/out/diff-checkstyle-tez-plugins_tez-aux-services.txt please fix those and then this can be merged

ack.

@shameersss1
shameersss1force-pushed the TEZ-3363 branch 3 times, most recently from 89c05dc to db543c9CompareMarch 16, 2022 15:35
@tez-yetus

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 0sDocker mode activated.
-1 ❌patch0m 5s#60 does not apply to master. Rebase required? Wrong Branch? See https://cwiki.apache.org/confluence/display/TEZ/How+to+Contribute+to+Tez for help.
SubsystemReport/Notes
GITHUB PR#60
JIRA IssueTEZ-3363
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-60/8/console
versionsgit=2.17.1
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@abstractdog
abstractdog self-requested a review March 16, 2022 15:55
@abstractdog

Copy link
Copy Markdown
Contributor

can you check @shameersss1 if the latest conflict is because of TEZ-4359 and rebase if needed?

@tez-yetus

This comment was marked as outdated.

@tez-yetus

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 34sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 1sThe patch appears to include 3 new or modified test files.
_ master Compile Tests _
+0 🆗mvndep5m 11sMaven dependency ordering for branch
+1 💚mvninstall9m 24smaster passed
+1 💚compile2m 50smaster passed with JDK Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04
+1 💚compile2m 39smaster passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚checkstyle2m 46smaster passed
+1 💚javadoc2m 47smaster passed with JDK Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04
+1 💚javadoc2m 32smaster passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+0 🆗spotbugs0m 42sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs4m 53smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 10sMaven dependency ordering for patch
+1 💚mvninstall1m 47sthe patch passed
+1 💚compile1m 45sthe patch passed with JDK Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04
+1 💚javac1m 45sthe patch passed
+1 💚compile1m 34sthe patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚javac1m 34sthe patch passed
-0 ⚠️checkstyle0m 34stez-dag: The patch generated 3 new + 609 unchanged - 1 fixed = 612 total (was 610)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc1m 30sthe patch passed with JDK Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04
+1 💚javadoc1m 26sthe patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚findbugs4m 8sthe patch passed
_ Other Tests _
+1 💚unit2m 6stez-api in the patch passed.
+1 💚unit0m 27stez-common in the patch passed.
+1 💚unit4m 35stez-runtime-library in the patch passed.
+1 💚unit4m 27stez-dag in the patch passed.
+1 💚unit2m 42stez-aux-services in the patch passed.
+1 💚asflicense0m 48sThe patch does not generate ASF License warnings.
64m 28s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-60/10/artifact/out/Dockerfile
GITHUB PR#60
JIRA IssueTEZ-3363
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs checkstyle compile
unameLinux bbae1f24de65 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitypersonality/tez.sh
git revisionmaster / 132ea4c
Default JavaPrivate Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Multi-JDK versions/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
checkstylehttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-60/10/artifact/out/diff-checkstyle-tez-dag.txt
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-60/10/testReport/
Max. process+thread count2099 (vs. ulimit of 5500)
modulesC: tez-api tez-common tez-runtime-library tez-dag tez-plugins/tez-aux-services U: .
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-60/10/console
versionsgit=2.25.1 maven=3.6.3 findbugs=3.0.1
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@abstractdogabstractdog left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1

@abstractdog
abstractdog merged commit 20873a3 into apache:masterMar 16, 2022
@abstractdog

Copy link
Copy Markdown
Contributor

merged to master, finally! thanks @shameersss1 for your tireless work and patience on this one!

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.

3 participants

@shameersss1@tez-yetus@abstractdog