Skip to content

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.


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.

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