You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by "arjun4084346 (via GitHub)" <gi...@apache.org> on 2024/07/23 00:59:31 UTC
[PR] ignore adding deadline dag actions if they are already present [gobblin]
arjun4084346 opened a new pull request, #4008:
URL: https://github.com/apache/gobblin/pull/4008
Dear Gobblin maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
### JIRA
- [ ] My PR addresses the following [Gobblin JIRA](https://issues.apache.org/jira/browse/GOBBLIN/) issues and references them in the PR title. For example, "[GOBBLIN-XXX] My Gobblin PR"
- https://issues.apache.org/jira/browse/GOBBLIN-XXX
### Description
- [ ] Here are some details about my PR, including screenshots (if applicable):
### Tests
- [ ] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
### Commits
- [ ] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
1. Subject is separated from body by a blank line
2. Subject is limited to 50 characters
3. Subject does not end with a period
4. Subject uses the imperative mood ("add", not "adding")
5. Body wraps at 72 characters
6. Body explains "what" and "why", not "how"
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ignore adding deadline dag actions if they are already present [gobblin]
Posted by "arjun4084346 (via GitHub)" <gi...@apache.org>.
arjun4084346 commented on code in PR #4008:
URL: https://github.com/apache/gobblin/pull/4008#discussion_r1688415810
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/proc/DagProcUtils.java:
##########
@@ -193,15 +194,33 @@ public static void sendCancellationEvent(JobExecutionPlan jobExecutionPlan) {
private static void sendEnforceJobStartDeadlineDagAction(DagManagementStateStore dagManagementStateStore, Dag.DagNode<JobExecutionPlan> dagNode)
throws IOException {
- dagManagementStateStore.addJobDagAction(dagNode.getValue().getFlowGroup(), dagNode.getValue().getFlowName(),
- dagNode.getValue().getFlowExecutionId(), dagNode.getValue().getJobName(),
+ DagActionStore.DagAction dagAction = new DagActionStore.DagAction(dagNode.getValue().getFlowGroup(),
+ dagNode.getValue().getFlowName(), dagNode.getValue().getFlowExecutionId(), dagNode.getValue().getJobName(),
DagActionStore.DagActionType.ENFORCE_JOB_START_DEADLINE);
+ try {
+ dagManagementStateStore.addDagAction(dagAction);
+ } catch (IOException e) {
+ if (e.getCause() != null && e.getCause() instanceof SQLIntegrityConstraintViolationException) {
+ dagManagementStateStore.deleteDagAction(dagAction);
Review Comment:
The intention is to have a deadline dag proc with new deadline time.
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/proc/DagProcUtils.java:
##########
@@ -193,15 +194,33 @@ public static void sendCancellationEvent(JobExecutionPlan jobExecutionPlan) {
private static void sendEnforceJobStartDeadlineDagAction(DagManagementStateStore dagManagementStateStore, Dag.DagNode<JobExecutionPlan> dagNode)
throws IOException {
- dagManagementStateStore.addJobDagAction(dagNode.getValue().getFlowGroup(), dagNode.getValue().getFlowName(),
- dagNode.getValue().getFlowExecutionId(), dagNode.getValue().getJobName(),
+ DagActionStore.DagAction dagAction = new DagActionStore.DagAction(dagNode.getValue().getFlowGroup(),
+ dagNode.getValue().getFlowName(), dagNode.getValue().getFlowExecutionId(), dagNode.getValue().getJobName(),
DagActionStore.DagActionType.ENFORCE_JOB_START_DEADLINE);
+ try {
+ dagManagementStateStore.addDagAction(dagAction);
+ } catch (IOException e) {
+ if (e.getCause() != null && e.getCause() instanceof SQLIntegrityConstraintViolationException) {
+ dagManagementStateStore.deleteDagAction(dagAction);
Review Comment:
The intention is to have a deadline dag proc with the new deadline time.
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [GOBBLIN-2119] ignore adding deadline dag actions if they are already present [gobblin]
Posted by "arjun4084346 (via GitHub)" <gi...@apache.org>.
arjun4084346 merged PR #4008:
URL: https://github.com/apache/gobblin/pull/4008
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ignore adding deadline dag actions if they are already present [gobblin]
Posted by "umustafi (via GitHub)" <gi...@apache.org>.
umustafi commented on code in PR #4008:
URL: https://github.com/apache/gobblin/pull/4008#discussion_r1688648092
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/proc/DagProcUtils.java:
##########
@@ -193,15 +194,33 @@ public static void sendCancellationEvent(JobExecutionPlan jobExecutionPlan) {
private static void sendEnforceJobStartDeadlineDagAction(DagManagementStateStore dagManagementStateStore, Dag.DagNode<JobExecutionPlan> dagNode)
throws IOException {
- dagManagementStateStore.addJobDagAction(dagNode.getValue().getFlowGroup(), dagNode.getValue().getFlowName(),
- dagNode.getValue().getFlowExecutionId(), dagNode.getValue().getJobName(),
+ DagActionStore.DagAction dagAction = new DagActionStore.DagAction(dagNode.getValue().getFlowGroup(),
+ dagNode.getValue().getFlowName(), dagNode.getValue().getFlowExecutionId(), dagNode.getValue().getJobName(),
DagActionStore.DagActionType.ENFORCE_JOB_START_DEADLINE);
+ try {
+ dagManagementStateStore.addDagAction(dagAction);
+ } catch (IOException e) {
+ if (e.getCause() != null && e.getCause() instanceof SQLIntegrityConstraintViolationException) {
+ dagManagementStateStore.deleteDagAction(dagAction);
Review Comment:
I see so we try launching same job but want to ensure the deadline is updated to reflect newer launch or at least that there's a deadline in memory for it
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ignore adding deadline dag actions if they are already present [gobblin]
Posted by "umustafi (via GitHub)" <gi...@apache.org>.
umustafi commented on code in PR #4008:
URL: https://github.com/apache/gobblin/pull/4008#discussion_r1688648092
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/proc/DagProcUtils.java:
##########
@@ -193,15 +194,33 @@ public static void sendCancellationEvent(JobExecutionPlan jobExecutionPlan) {
private static void sendEnforceJobStartDeadlineDagAction(DagManagementStateStore dagManagementStateStore, Dag.DagNode<JobExecutionPlan> dagNode)
throws IOException {
- dagManagementStateStore.addJobDagAction(dagNode.getValue().getFlowGroup(), dagNode.getValue().getFlowName(),
- dagNode.getValue().getFlowExecutionId(), dagNode.getValue().getJobName(),
+ DagActionStore.DagAction dagAction = new DagActionStore.DagAction(dagNode.getValue().getFlowGroup(),
+ dagNode.getValue().getFlowName(), dagNode.getValue().getFlowExecutionId(), dagNode.getValue().getJobName(),
DagActionStore.DagActionType.ENFORCE_JOB_START_DEADLINE);
+ try {
+ dagManagementStateStore.addDagAction(dagAction);
+ } catch (IOException e) {
+ if (e.getCause() != null && e.getCause() instanceof SQLIntegrityConstraintViolationException) {
+ dagManagementStateStore.deleteDagAction(dagAction);
Review Comment:
do we forget about the previous deadline time or is that reminder in memory? does the prev job have unbounded deadline now?
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ignore adding deadline dag actions if they are already present [gobblin]
Posted by "umustafi (via GitHub)" <gi...@apache.org>.
umustafi commented on code in PR #4008:
URL: https://github.com/apache/gobblin/pull/4008#discussion_r1688255559
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/proc/DagProcUtils.java:
##########
@@ -193,15 +194,33 @@ public static void sendCancellationEvent(JobExecutionPlan jobExecutionPlan) {
private static void sendEnforceJobStartDeadlineDagAction(DagManagementStateStore dagManagementStateStore, Dag.DagNode<JobExecutionPlan> dagNode)
throws IOException {
- dagManagementStateStore.addJobDagAction(dagNode.getValue().getFlowGroup(), dagNode.getValue().getFlowName(),
- dagNode.getValue().getFlowExecutionId(), dagNode.getValue().getJobName(),
+ DagActionStore.DagAction dagAction = new DagActionStore.DagAction(dagNode.getValue().getFlowGroup(),
+ dagNode.getValue().getFlowName(), dagNode.getValue().getFlowExecutionId(), dagNode.getValue().getJobName(),
DagActionStore.DagActionType.ENFORCE_JOB_START_DEADLINE);
+ try {
+ dagManagementStateStore.addDagAction(dagAction);
+ } catch (IOException e) {
+ if (e.getCause() != null && e.getCause() instanceof SQLIntegrityConstraintViolationException) {
+ dagManagementStateStore.deleteDagAction(dagAction);
Review Comment:
why delete then re-add? is this to trigger CDC again?
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ignore adding deadline dag actions if they are already present [gobblin]
Posted by "umustafi (via GitHub)" <gi...@apache.org>.
umustafi commented on code in PR #4008:
URL: https://github.com/apache/gobblin/pull/4008#discussion_r1688657597
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/proc/DagProcUtils.java:
##########
@@ -193,15 +194,33 @@ public static void sendCancellationEvent(JobExecutionPlan jobExecutionPlan) {
private static void sendEnforceJobStartDeadlineDagAction(DagManagementStateStore dagManagementStateStore, Dag.DagNode<JobExecutionPlan> dagNode)
throws IOException {
- dagManagementStateStore.addJobDagAction(dagNode.getValue().getFlowGroup(), dagNode.getValue().getFlowName(),
- dagNode.getValue().getFlowExecutionId(), dagNode.getValue().getJobName(),
+ DagActionStore.DagAction dagAction = new DagActionStore.DagAction(dagNode.getValue().getFlowGroup(),
+ dagNode.getValue().getFlowName(), dagNode.getValue().getFlowExecutionId(), dagNode.getValue().getJobName(),
DagActionStore.DagActionType.ENFORCE_JOB_START_DEADLINE);
+ try {
+ dagManagementStateStore.addDagAction(dagAction);
+ } catch (IOException e) {
+ if (e.getCause() != null && e.getCause() instanceof SQLIntegrityConstraintViolationException) {
+ dagManagementStateStore.deleteDagAction(dagAction);
Review Comment:
for the metrics on startup it will show up as several deletions and additions but I think this is ok. no negative values
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org