metron-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nickwallen <>
Subject [GitHub] metron pull request #1254: METRON-1849 Elasticsearch Index Write Functionali...
Date Wed, 05 Dec 2018 13:36:28 GMT
Github user nickwallen commented on a diff in the pull request:
    --- Diff: metron-platform/metron-elasticsearch/src/main/java/org/apache/metron/elasticsearch/dao/
    @@ -196,7 +196,7 @@ public ElasticsearchDao withRefreshPolicy(WriteRequest.RefreshPolicy
       protected Optional<String> getIndexName(String guid, String sensorType) throws
IOException {
    -    return updateDao.getIndexName(guid, sensorType);
    +    return updateDao.findIndexNameByGUID(guid, sensorType);
    --- End diff --
    > Also, would we want any parity between the updateDao's find method name vs the ElasticsearchDao's
getIndexName method name?
    I found the [code here confusing](
and had me stuck on an issue for quite some time.  When both use `getIndexName` I have no
idea what the logic is doing.  It tries one approach, then falls back to another, but since
the methods are named the same, it doesn't tell me how they attempt to find the index name
in a different way.
    With the rename, I feel it improves understanding in a glance [what this is doing now](
and the differences between the primary approach versus the fallback.
    > Is sensorType not a component to retrieving the index name? 
    So you prefer the original function name?  Or you prefer `lookupIndexName`, `findIndexNameByGUIDAndSensor`?


View raw message