-
Notifications
You must be signed in to change notification settings - Fork 14
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
SDAP-70 Link events with dataset collections #33
base: master
Are you sure you want to change the base?
Conversation
Can one of the admins verify this patch? |
There is still some work to be done on the WebUI. However the data modeling should be good. I would like to demo this shortly so will keep this PR open such that I can receive and accommodate feedback. |
@@ -235,7 +237,7 @@ public void startMetaIngest() { | |||
LOG.info("Metadata has been ingested successfully."); | |||
} | |||
|
|||
public void startFullIngest() { | |||
public void startFullIngest(MudrodEngine me) { | |||
DiscoveryEngineAbstract wd = new WeblogDiscoveryEngine(props, es, spark); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EventIngester has a variable of ESDriver type since EventIngester extends MudrodAbstract class. I don't think you have to change function from startFullIngest() to startFullIngest(MudrodEngine me).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lewismc I tested your code on my local computer and it works. The event module can download EONET events and save them into Elasticsearch.
@@ -247,6 +249,9 @@ public void startFullIngest() { | |||
DiscoveryEngineAbstract recom = new RecommendEngine(props, es, spark); | |||
recom.preprocess(); | |||
recom.process(); | |||
|
|||
EventIngester eonet = new EventIngester(props, es, spark); | |||
eonet.ingestAllEonetEvents(me); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest removing input parameters "me" since EventIngester already has a variable of ESDriver.
private void startFullEonetIngest(MudrodEngine me) { | ||
LOG.info("Starting full EONET ingest."); | ||
EventIngester eonet = new EventIngester(props, es, spark); | ||
eonet.ingestAllEonetEvents(me); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest removing input parameters "me" since EventIngester already has a variable of MudrodEngine.
@SuppressWarnings("unused") | ||
GetResult result = null; | ||
String index = mEngine.getConfig().getProperty(MudrodConstants.ES_INDEX_NAME); | ||
String eventType = "eonet_event"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you add eventType to the configuration file?
} | ||
} | ||
esDriver.destroyBulkProcessor(); | ||
return ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function will return empty string whether the index operations success or fail and made it hard to write a unit test case for function ingestAllEonetEvents.
This issue is linked to https://issues.apache.org/jira/browse/SDAP-70