You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/07/16 19:34:00 UTC
[jira] [Commented] (METRON-1614) Create job status abstraction
[ https://issues.apache.org/jira/browse/METRON-1614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16545656#comment-16545656 ]
ASF GitHub Bot commented on METRON-1614:
----------------------------------------
GitHub user mmiklavc opened a pull request:
https://github.com/apache/metron/pull/1108
METRON-1614: Create job status abstraction
## Contributor Comments
https://issues.apache.org/jira/browse/METRON-1614
### DO NOT MERGE until follow-on PR created/reviewed/+1'ed
This PR requires a separate PR that will round out the failing/final bits in the REST endpoints - the build will be broken in this PR because the follow-up will fix the rest layer and accompanying tests. Once that PR is created, all testing should be done via that branch for e2e testing via the REST app and pcap cli. This branch/PR is provided as a subset of the final deliverable in this feature branch in order to make review and attribution easier.
The main thrust in this PR is to provide a `metron-job` module that contains a job manager abstraction for interacting with `Statusable<T>` jobs. The scope in this round is limited to making the `PcapJob` a `Statusable<Path>` that will enable asynchronous calls for managing the underlying MR job as well as for the finalization routine.
A `TimerTask` is kicked off in the `PcapJob` for finalizing the results from the MR job when it completes successfully. As we expand the feature set to include other job types, e.g. Spark, the thread/timer management should be refactored into the `JobManager` implementation, but we'll have a better sense of what those api changes should look like once we start to add those new job types.
This version will not reload jobs upon restarting the REST api as the UI will only deal with the current query for a logged in user. PCAP MR job detail will be contained in the output paths that are configured via the REST application or PCAP CLI application. The CLI job will continue to write to the local FS runtime exec directory while the REST app will write its final raw PCAP output to HDFS.
Also per the mailing list, this PR completely removes the existing `metron-api` module, which was the existing REST server wrapping the pcap query functionality. This is now deprecated/removed in favor of an implementation being added to the newer REST api in `metron-interface/metron-rest.`
## Pull Request Checklist
### For all changes:
- [x] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel).
- [x] Does your PR title start with METRON-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
- [x] Has your PR been rebased against the latest commit within the target branch (typically master)?
### For code changes:
- [ ] Have you included steps to reproduce the behavior or problem that is being changed or addressed?
- [ ] Have you included steps or a guide to how the change may be verified and tested manually?
- [ ] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via:
```
mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh
```
- [ ] Have you written or updated unit tests and or integration tests to verify your changes?
- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent?
### For documentation related changes:
- [ ] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via `site-book/target/site/index.html`:
```
cd site-book
mvn site
```
#### Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.
It is also recommended that [travis-ci](https://travis-ci.org) is set up for your personal repository such that your branches are built there before submitting a pull request.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mmiklavc/metron pcap-job-manager
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/metron/pull/1108.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1108
----
commit 41ecf36cd7c2da0399d03a37fee5916a9bfa87e7
Author: Michael Miklavcic <mi...@...>
Date: 2018-06-13T01:48:41Z
Add metron-job project. Update pcap to be Statusable.
commit a83b472778e8e40cd81132f86402873ab4b8b2b1
Author: Michael Miklavcic <mi...@...>
Date: 2018-06-16T23:10:49Z
Save progress on Pageable implementation
commit 976e1bcdf9619cc0672de4bcd7dd0d865a01cc1b
Author: Michael Miklavcic <mi...@...>
Date: 2018-06-25T19:00:03Z
Rev metron-job to 0.5.1 after merge with master
commit f9fc106f4a33f323dc06260d861fc543726e2518
Author: Michael Miklavcic <mi...@...>
Date: 2018-06-26T22:03:21Z
Move result writing code to pcapjob. Get pcapclitest working again.
commit 8b4ef9cdc37235c333f3cbd294f20ae15a7438aa
Author: Michael Miklavcic <mi...@...>
Date: 2018-06-27T05:31:21Z
Add Pageable results.
commit cd302a989320a6a8970b18a94df8fbf4f11576b1
Author: Michael Miklavcic <mi...@...>
Date: 2018-06-27T15:12:42Z
change pom change with spaces to tabs
commit 7c1d4a0bedb23e86e323b0daec21c73113065360
Author: Michael Miklavcic <mi...@...>
Date: 2018-06-27T23:20:16Z
Address review comments. Fix local FS write path problem.
commit a00e300d8bd812589fd09970ce4db1f25dc29165
Author: Michael Miklavcic <mi...@...>
Date: 2018-06-28T03:31:02Z
Let's try this again.
commit ba6cf9030f45b6b1a3cf270a376e4b1f5e67d6fb
Author: Michael Miklavcic <mi...@...>
Date: 2018-06-29T12:14:44Z
Job manager and job service implementations
commit 157aa1e3715d77373089a5c3eacfcc1dcd8d0a08
Author: Michael Miklavcic <mi...@...>
Date: 2018-07-05T17:58:55Z
Refactor jobs to have a finalize step
commit 9fb3a81c144cab23f81de94007e85e33552fe10c
Author: Michael Miklavcic <mi...@...>
Date: 2018-07-10T16:57:05Z
Prototyping rest api bits
commit 2bca32ed87dac15538263bdfe15ceba3d3ec3b79
Author: Michael Miklavcic <mi...@...>
Date: 2018-07-11T02:22:01Z
merge with feature branch
commit 36456d637d9cd13a13ef34735f74d06d350772cf
Author: Michael Miklavcic <mi...@...>
Date: 2018-07-12T11:52:42Z
Redo the pcap asychronicity to use a Timer for checking status. Pass in config as Map
commit 6e0b64ce1c9b1c3ca1b7a6e2b58ba74c188d702a
Author: cstella <ce...@...>
Date: 2018-07-12T17:18:09Z
Refactoring the config options to translate between object and map.
commit 0aa8e6eb967c6163c88b02c42074ced96243a7c3
Author: cstella <ce...@...>
Date: 2018-07-12T18:10:09Z
Redoing some stuff
commit 9c6eaea48b7dc5b2cf1d6e7b7373258afbcda965
Author: cstella <ce...@...>
Date: 2018-07-12T18:15:38Z
Removed some duplication
commit e52c5f00b9a720d7895180d36bca7285c0d0d335
Author: cstella <ce...@...>
Date: 2018-07-12T18:17:20Z
forgot licenses
commit d4faf56078cca6b259d836b852979f6b38447399
Author: Michael Miklavcic <mi...@...>
Date: 2018-07-12T18:20:35Z
Merge pull request #24 from cestella/pcap-job-manager-generics
Pcap job manager generics from cestella
commit 7971ecba71b811b23187e70d8f41e9ec89c8da18
Author: merrimanr <me...@...>
Date: 2018-07-12T21:51:24Z
initial commit
commit 720dab608ffcf3cb40cabc79ec69e98541b709ee
Author: Michael Miklavcic <mi...@...>
Date: 2018-07-13T19:10:49Z
Move pcap config to metron-pcap module. Remove metron-api module completely
commit 69cb9640fab4cb645e62923565f71c37f083da9d
Author: Michael Miklavcic <mi...@...>
Date: 2018-07-13T19:21:21Z
Move pcapoptions to config package
commit 0615ae60f7542a182f8dbd31cc07ede6b038be43
Author: Michael Miklavcic <mi...@...>
Date: 2018-07-13T23:12:23Z
Revert PcapServiceImpl
commit 433d0a37501ae0bdc8b3e5a7b0fc3ceb9c125ebf
Author: Michael Miklavcic <mi...@...>
Date: 2018-07-14T04:02:03Z
Get job manager working. Fix pcap cli tests. Make pcap pageable better for synchronicity. Kill remnants of the job service.
commit 935dfc84f9f8556c5fbde029561dec258c82c577
Author: merrimanr <me...@...>
Date: 2018-07-16T14:42:05Z
Merge branch 'pcap-job-manager' of https://github.com/mmiklavc/metron into pcap-job-manager
commit 71f387160dad1d9ad53b94462ea437d29ee11323
Author: merrimanr <me...@...>
Date: 2018-07-16T14:49:25Z
updated pcap integration test
commit 3e05b7aaca37eabbf52ada6b9fc97f98ee4342ce
Author: Michael Miklavcic <mi...@...>
Date: 2018-07-16T16:09:55Z
Merge pull request #25 from merrimanr/pcap-job-manager
Get PcapTopologyIntegrationTest working
----
> Create job status abstraction
> -----------------------------
>
> Key: METRON-1614
> URL: https://issues.apache.org/jira/browse/METRON-1614
> Project: Metron
> Issue Type: Sub-task
> Reporter: Ryan Merriman
> Assignee: Michael Miklavcic
> Priority: Major
>
> It is possible to use different job engines such as MR or Spark. There should be an abstraction that allows us to track status independent of the underlying job engine. Initially we will use YARN/MR to run pcap query jobs. We will also need a way to persist this information.
> Pcap job submission should be asynchronous. Some kind of id should be returned upon successful job submission rather than blocking and waiting on the job to complete.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)