You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/06/24 12:57:01 UTC

[GitHub] [hudi] haggy opened a new pull request, #5965: [minor] Propagate cleaner exceptions

haggy opened a new pull request, #5965:
URL: https://github.com/apache/hudi/pull/5965

   
   ## *Tips*
   - *Thank you very much for contributing to Apache Hudi.*
   - *Please review https://hudi.apache.org/contribute/how-to-contribute before opening a pull request.*
   
   ## What is the purpose of the pull request
   
   This PR changes the `HoodieCleaner` utility so that errors will propagate to spark + YARN (or whatever RM you are using). 
   
   Currently, if the cleaner fails for any reason the application status (in YARN) is not set to `FAILED`. When running the cleaner outside of the write process (such as DeltaStreamer) this result in a job that cannot be tracked by the coordinating system. We are using Apache Airflow to run the cleaner in parallel on our tables. If the cleaner fails, we need the application status to be set to `FAILED` so that the airflow sensor for the job can alert us. 
   
   There was an [old issue and PR](https://issues.apache.org/jira/browse/HUDI-1749) created to catch all cleaner errors and log them. According to the ticket, the change was done because the cleaner process was hanging during certain scenarios. I have not been able to reproduce this behavior. There is no information about the environment on the ticket (possibly only occurred under spark 2.x?)
   
   ## Brief change log
   
   *(for example:)*
     - *Modify HoodieCleaner.java to remove try/catch block*
   
   ## Verify this pull request
   
   *(Please pick either of the following options)*
   
   This pull request is a trivial rework / code cleanup without any test coverage.
   
   ## Committer checklist
   
    - [ ] Has a corresponding JIRA in PR title & commit
    
    - [x] Commit message is descriptive of the change
    
    - [ ] CI is green
   
    - [x] Necessary doc changes done or have another open PR
          
    - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] haggy commented on pull request #5965: [minor] Propagate cleaner exceptions

Posted by GitBox <gi...@apache.org>.
haggy commented on PR #5965:
URL: https://github.com/apache/hudi/pull/5965#issuecomment-1204102727

   Bump


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] haggy commented on pull request #5965: [MINOR] Propagate cleaner exceptions

Posted by "haggy (via GitHub)" <gi...@apache.org>.
haggy commented on PR #5965:
URL: https://github.com/apache/hudi/pull/5965#issuecomment-1523885282

   Mis-push. This is a very old PR so I'm just going to close it and re-open with a fresh branch. Sorry all. 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] hudi-bot commented on pull request #5965: [minor] Propagate cleaner exceptions

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on PR #5965:
URL: https://github.com/apache/hudi/pull/5965#issuecomment-1166059817

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "e37883c3b49f041833070b38415b8d9ac58376e7",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=9513",
       "triggerID" : "e37883c3b49f041833070b38415b8d9ac58376e7",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e37883c3b49f041833070b38415b8d9ac58376e7 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=9513) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] haggy commented on a diff in pull request #5965: [MINOR] Propagate cleaner exceptions

Posted by "haggy (via GitHub)" <gi...@apache.org>.
haggy commented on code in PR #5965:
URL: https://github.com/apache/hudi/pull/5965#discussion_r1178252458


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/HoodieCleaner.java:
##########
@@ -106,12 +106,7 @@ public static void main(String[] args) {
 
     String dirName = new Path(cfg.basePath).getName();
     JavaSparkContext jssc = UtilHelpers.buildSparkContext("hoodie-cleaner-" + dirName, cfg.sparkMaster);
-    try {
-      new HoodieCleaner(cfg, jssc).run();
-    } catch (Throwable throwable) {
-      LOG.error("Fail to run cleaning for " + cfg.basePath, throwable);
-    } finally {
-      jssc.stop();

Review Comment:
   Sure that sounds good. Sorry for the delay getting back to this PR 😅  



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] bvaradar commented on a diff in pull request #5965: [MINOR] Propagate cleaner exceptions

Posted by "bvaradar (via GitHub)" <gi...@apache.org>.
bvaradar commented on code in PR #5965:
URL: https://github.com/apache/hudi/pull/5965#discussion_r1133153557


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/HoodieCleaner.java:
##########
@@ -106,12 +106,7 @@ public static void main(String[] args) {
 
     String dirName = new Path(cfg.basePath).getName();
     JavaSparkContext jssc = UtilHelpers.buildSparkContext("hoodie-cleaner-" + dirName, cfg.sparkMaster);
-    try {
-      new HoodieCleaner(cfg, jssc).run();
-    } catch (Throwable throwable) {
-      LOG.error("Fail to run cleaning for " + cfg.basePath, throwable);
-    } finally {
-      jssc.stop();

Review Comment:
   @haggy : Can you make this change and update the PR ?



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] haggy commented on pull request #5965: [minor] Propagate cleaner exceptions

Posted by GitBox <gi...@apache.org>.
haggy commented on PR #5965:
URL: https://github.com/apache/hudi/pull/5965#issuecomment-1189151885

   Hey @yihua any thoughts/updates on this?


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] haggy closed pull request #5965: [MINOR] Propagate cleaner exceptions

Posted by "haggy (via GitHub)" <gi...@apache.org>.
haggy closed pull request #5965: [MINOR] Propagate cleaner exceptions
URL: https://github.com/apache/hudi/pull/5965


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] hudi-bot commented on pull request #5965: [minor] Propagate cleaner exceptions

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on PR #5965:
URL: https://github.com/apache/hudi/pull/5965#issuecomment-1165553671

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "e37883c3b49f041833070b38415b8d9ac58376e7",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "e37883c3b49f041833070b38415b8d9ac58376e7",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e37883c3b49f041833070b38415b8d9ac58376e7 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] vinothchandar commented on a diff in pull request #5965: [MINOR] Propagate cleaner exceptions

Posted by "vinothchandar (via GitHub)" <gi...@apache.org>.
vinothchandar commented on code in PR #5965:
URL: https://github.com/apache/hudi/pull/5965#discussion_r1122666424


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/HoodieCleaner.java:
##########
@@ -106,12 +106,7 @@ public static void main(String[] args) {
 
     String dirName = new Path(cfg.basePath).getName();
     JavaSparkContext jssc = UtilHelpers.buildSparkContext("hoodie-cleaner-" + dirName, cfg.sparkMaster);
-    try {
-      new HoodieCleaner(cfg, jssc).run();
-    } catch (Throwable throwable) {
-      LOG.error("Fail to run cleaning for " + cfg.basePath, throwable);
-    } finally {
-      jssc.stop();

Review Comment:
   could we just call `System.exit(1)` or a non-zero exit code. I think we can keep the spark context stopping that way and still meet the airflow issue @haggy brought up?



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] haggy commented on pull request #5965: [MINOR] Propagate cleaner exceptions

Posted by "haggy (via GitHub)" <gi...@apache.org>.
haggy commented on PR #5965:
URL: https://github.com/apache/hudi/pull/5965#issuecomment-1523896930

   New PR here: https://github.com/apache/hudi/pull/8583


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] yihua commented on pull request #5965: [minor] Propagate cleaner exceptions

Posted by GitBox <gi...@apache.org>.
yihua commented on PR #5965:
URL: https://github.com/apache/hudi/pull/5965#issuecomment-1174462858

   @haggy Could you provide your setup including Hadoop and Spark versions?  It looks like this PR does the reverse change of the previous fix.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] haggy commented on pull request #5965: [minor] Propagate cleaner exceptions

Posted by GitBox <gi...@apache.org>.
haggy commented on PR #5965:
URL: https://github.com/apache/hudi/pull/5965#issuecomment-1176317927

   @yihua Added env info to the description. 
   
   To expand on the original issue, all exceptions are being swallowed (simply logged) which results in YARN being unable to accurately report the status of the job. We are using Airflow to orchestrate cleaning services so we require accurate runtime results. Allowing the exception to bubble to spark results in an accurate status reported by spark and YARN (and AWS step API) . 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] hudi-bot commented on pull request #5965: [minor] Propagate cleaner exceptions

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on PR #5965:
URL: https://github.com/apache/hudi/pull/5965#issuecomment-1165592372

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "e37883c3b49f041833070b38415b8d9ac58376e7",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=9513",
       "triggerID" : "e37883c3b49f041833070b38415b8d9ac58376e7",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e37883c3b49f041833070b38415b8d9ac58376e7 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=9513) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org