Skip to content

TEZ-4333: Debug artifacts can include DAG plan in json format - #149

Open
abstractdog wants to merge 1 commit into
apache:masterfrom
abstractdog:TEZ-4333
Open

TEZ-4333: Debug artifacts can include DAG plan in json format#149
abstractdog wants to merge 1 commit into
apache:masterfrom
abstractdog:TEZ-4333

Conversation

@abstractdog

Copy link
Copy Markdown
Contributor

No description provided.

@tez-yetus

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 57sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+0 🆗mvndep4m 14sMaven dependency ordering for branch
+1 💚mvninstall9m 25smaster passed
+1 💚compile1m 11smaster passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚compile1m 3smaster passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚checkstyle1m 8smaster passed
+1 💚javadoc1m 15smaster passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚javadoc1m 2smaster passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+0 🆗spotbugs1m 14sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs2m 38smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 9sMaven dependency ordering for patch
+1 💚mvninstall0m 45sthe patch passed
+1 💚compile0m 52sthe patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚javac0m 52sthe patch passed
+1 💚compile0m 43sthe patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚javac0m 43sthe patch passed
+1 💚checkstyle0m 30sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 46sthe patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚javadoc0m 44sthe patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚findbugs2m 12sthe patch passed
_ Other Tests _
+1 💚unit1m 53stez-api in the patch passed.
+1 💚unit4m 9stez-dag in the patch passed.
+1 💚asflicense0m 21sThe patch does not generate ASF License warnings.
36m 56s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-149/1/artifact/out/Dockerfile
GITHUB PR#149
JIRA IssueTEZ-4333
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs checkstyle compile
unameLinux 63a5a8429b49 4.15.0-147-generic #151-Ubuntu SMP Fri Jun 18 19:21:19 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitypersonality/tez.sh
git revisionmaster / c875b82
Default JavaPrivate Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
Multi-JDK versions/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-149/1/testReport/
Max. process+thread count258 (vs. ulimit of 5500)
modulesC: tez-api tez-dag U: .
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-149/1/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.

@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 , this sounds cool thing to do, dropped some minor comments/question.
rest LGTM

String logFile = logDirs[new Random().nextInt(logDirs.length)] + File.separatorChar + newDag.getID() + "-"
+ TezConstants.TEZ_PB_PLAN_JSON_NAME;

LOG.info("Writing DAG JSON plan to: " + logFile);

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 use placeholders

 LOG.info("Writing DAG JSON plan to: {}", logFile);

}

private void writePBJsonFile(DAGPlan dagPB, DAGImpl newDag) {
String logFile = logDirs[new Random().nextInt(logDirs.length)] + File.separatorChar + newDag.getID() + "-"

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.

I think other files like TEZ_PB_PLAN_TEXT_NAME are in tezSysStagingPath, should we keep these files also there?

publicstaticPathgetTezTextPlanStagingPath(PathtezSysStagingPath, StringstrAppId,
StringdagPBName) {
StringfileName = strAppId + "-" + dagPBName + "-" + TezConstants.TEZ_PB_PLAN_TEXT_NAME;
returnnewPath(tezSysStagingPath, fileName);

printWriter.println(DAGUtils.generateSimpleJSONPlan(dagPB));
printWriter.close();
} catch (IOException | JSONException e) {
LOG.warn("Failed to write TEZ_PLAN JSON to " + outFile, e);

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 change to:

 LOG.warn("Failed to write TEZ_PLAN JSON to {}", outFile, e);

try {
PrintWriter printWriter = new PrintWriter(outFile, "UTF-8");
printWriter.println(DAGUtils.generateSimpleJSONPlan(dagPB));
printWriter.close();

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.

I think this close should be in finally block or we should use try-with-resource for printWriter, else if printWriter.println(DAGUtils.generateSimpleJSONPlan(dagPB)); this throws exception, we won't be closing the printWritter

@ayushtkn

Copy link
Copy Markdown
Member

@abstractdog I think If you address the comments this should be good to go :-)

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

@abstractdog@tez-yetus@ayushtkn