[
https://issues.apache.org/jira/browse/METRON-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15671031#comment-15671031
]
ASF GitHub Bot commented on METRON-567:
---------------------------------------
GitHub user ottobackwards opened a pull request:
https://github.com/apache/incubator-metron/pull/360
METRON-567 enrichment types assume String values for CacheKeys
The CacheKeys store values as objects, and support gets as object, straight
casting as passed .class or coercion to a class.
The enrichment adapters assume that the values in the CacheKeys are
Strings, and thus pass String.class for lookups and retrievals.
It is possible to have non-string values for these fields, and when that
happens enrichment fails with exceptions.
To address this issue, I am replacing calls to getValue(Class) with
coerceValue(Class)
Tested - added failing unit tests for changed classes, addressed issue and
retest
Integration Tests
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ottobackwards/incubator-metron METRON-567
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-metron/pull/360.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 #360
----
commit cabb39aaf52688566a88a77a62fdcd62d648fda1
Author: Otto Fowler <[email protected]>
Date: 2016-10-12T15:27:34Z
merge remote tracking branch apache/master
commit cf60c880d8a93192f8bdcbace4c30ba291c6e2d4
Author: Otto Fowler <[email protected]>
Date: 2016-10-21T19:19:15Z
Merge remote-tracking branch 'apache/master'
commit 22670e207617d47b180f9c4aba138953482c9215
Author: Otto Fowler <[email protected]>
Date: 2016-11-07T20:26:28Z
merging remote-tracking branch apache/master
commit d6bdaafab7e0e6e03a039174215509dc414f514c
Author: Otto Fowler <[email protected]>
Date: 2016-11-09T15:01:18Z
merging remote-tracking branch apache/master
commit a40b4a22d7389a531a1895803b64dbb3f8ea7469
Author: Otto Fowler <[email protected]>
Date: 2016-11-10T11:54:21Z
merge tracking branch apache/master
commit cadc2c78ce4d71b68a0e7f1d4b8d65591477c14d
Author: Otto Fowler <[email protected]>
Date: 2016-11-16T14:46:14Z
merge tracking branch apache/master
----
> Usernames as numerics strings attempted to be parsed and compared as numbers
> ----------------------------------------------------------------------------
>
> Key: METRON-567
> URL: https://issues.apache.org/jira/browse/METRON-567
> Project: Metron
> Issue Type: Bug
> Affects Versions: 0.2.1BETA
> Environment: Linux CentOS 6.5
> 252GB RAM
> HDP 2.5
> 16TB HDD
> Reporter: ed de
> Assignee: Otto Fowler
> Priority: Minor
> Attachments: metron-567.zip
>
>
> 1. Windows logs are being ingested through Nifi, most usernames are number
> (ex: 423191384)
> 2. Windows parser Grok pattern for element "usrName" has been modified to and
> from : GREEDYDATA, NUMBER, WORD, USERNAME.
> 3. An enrichment has been flatline loaded into Hbase containing department,
> manager, firstname, lastname, etc.
> 4. The enrichment works if the usrName is characters (ex: DONALDDUCK)
> 5. The consistent error message is "cannot cast java.lang.Long to
> java.lang.String". This is readily apparent in the enrichment log under
> /var/log/storm/enrichment*
> To recreate, build a parser that looks for a username, then build a simple
> enrichment, then feed a sample of numeric and non-numeric username logs
> through the system and see which one parses and enriches.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)