Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GOBBLIN-1052: Create a spec consumer path if it does not exist in FS … #2892

Closed
wants to merge 5 commits into from

Conversation

sv2000
Copy link
Contributor

@sv2000 sv2000 commented Feb 14, 2020

…SpecConsumer

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

Description

  • Here are some details about my PR, including screenshots (if applicable):
    Create a spec consumer path if it does not exist in FS SpecConsumer. This PR also makes the following improvements:
  1. FsSpecProducer writes JobSpecs to a tmp location followed by a rename, instead of directly overwriting specs in the final location.
  2. Change constructors of FsSpecProducer/FsSpecConsumer to allow passing in a FileSystem object.

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:
    Modified existing unit test cases.

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":
    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"

@sv2000
Copy link
Contributor Author

sv2000 commented Feb 14, 2020

@autumnust please review.

Copy link
Contributor

@autumnust autumnust left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -293,6 +294,10 @@ private static void deleteStoppedHelixJob(HelixManager helixManager, String work
Map<String, WorkflowConfig> workflowConfigMap = taskDriver.getWorkflows();
for (String workflow : workflowConfigMap.keySet()) {
WorkflowConfig workflowConfig = taskDriver.getWorkflowConfig(workflow);
//Filter out any stale Helix workflows which are not running.
if (workflowConfig.getTargetState() != TargetState.START) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why filter out stopped job if the method call is to get a list of workFlowId from Gobblin job name ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for this comment. The purpose of this method is two fold: 1. The caller may want to cancel a Helix workflow given a job name and 2. The caller may want to get the workflow id and use that to query other information such as the workunits processed by the job. For both 1 and 2, the caller is only interested in the active workflows. In fact, the stale workflows are auto-pruged by Helix based on an expiry interval.

I have modified the javadoc for this method to be more explicit about which workflows are returned.

@sv2000
Copy link
Contributor Author

sv2000 commented Feb 23, 2020

@autumnust Addressed your comments.

Copy link
Contributor

@autumnust autumnust left a comment

Choose a reason for hiding this comment

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

LGTM

@asfgit asfgit closed this in 096fc0c Feb 24, 2020
haojiliu pushed a commit to haojiliu/incubator-gobblin that referenced this pull request Apr 9, 2020
jhsenjaliya pushed a commit to jhsenjaliya/incubator-gobblin that referenced this pull request Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants