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

SDAP-70 Link events with dataset collections #33

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

lewismc
Copy link
Member

@lewismc lewismc commented Jul 23, 2018

@asfgit
Copy link

asfgit commented Jul 23, 2018

Can one of the admins verify this patch?

@lewismc
Copy link
Member Author

lewismc commented Jul 23, 2018

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);
Copy link
Contributor

@quintinali quintinali Aug 2, 2018

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

Copy link
Contributor

@quintinali quintinali left a 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);
Copy link
Contributor

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);
Copy link
Contributor

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";
Copy link
Contributor

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 "";
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants