GitHub user justinleet reopened a pull request:

    https://github.com/apache/metron/pull/1037

    METRON-1547: Solr Comment Fields

    ## Contributor Comments
    Adding support for comments on Alerts in Solr.  Nested objects are absurdly 
painful, so this follows the ES expectation of these not needing to be 
queryable.
    
    Solr doesn't have a great way to store these as-is, so they're stored as 
raw JSON, which is converted appropriately to ensure everything sees the same 
data as in the ES case.
    
    The REST API has been adjusted to have add/remove comment calls, rather 
than just patching (since that won't work in Solr directly). However, index is 
required to avoid an error for Solr right now as a result of METRON-1585.  Once 
that is fixed, index will be optional.
    
    There are currently a couple bugs that I would love some help with.
    
    -  ~In ES, when you add a comment, it doesn't immediately show up on the 
comments list.  It looks like a findOne is fired off, but I assume ES isn't 
updated yet.  This doesn't appear to happen in Solr.~ Preexisting, related to 
UI's handling of new comments.
    - When I hit delete on a comment in the UI (at least in Solr, unsure about 
ES), the comment is visually removed, but no remove request is fired off. I 
assume I have something misaligned, but I'm not sure what.
    - I patterned the optional index off of findOne, because it handles it a 
bit specially.  Delightfully, now I have an extra indexString field showing up 
in both findOne and the add remove comment.  There's some JsonGetter annotation 
thing I'm probably not using correctly.  This also happens in findOne 
currently, so it looks like it's probably a matter of getting the right fix and 
updating this to match.
    
    To test,
    This can be tested both via REST and the UI.  As noted above, at least 
right now the UI has more instability associated with it.
    
    ## Pull Request Checklist
    
    Thank you for submitting a contribution to Apache Metron.  
    Please refer to our [Development 
Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235)
 for the complete guide to follow for contributions.  
    Please refer also to our [Build Verification 
Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview)
 for complete smoke testing guides.  
    
    
    In order to streamline the review of the contribution we ask you follow 
these guidelines and ask you to double check the following:
    
    ### For all changes:
    - [x] Is there a JIRA ticket associated with this PR? If not one needs to 
be created at [Metron 
Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel).
    - [x] Does your PR title start with METRON-XXXX where XXXX is the JIRA 
number you are trying to resolve? Pay particular attention to the hyphen "-" 
character.
    - [x] Has your PR been rebased against the latest commit within the target 
branch (typically master)?
    
    
    ### For code changes:
    - [ ] Have you included steps to reproduce the behavior or problem that is 
being changed or addressed?
    - [ ] Have you included steps or a guide to how the change may be verified 
and tested manually?
    - [ ] Have you ensured that the full suite of tests and checks have been 
executed in the root metron folder via:
      ```
      mvn -q clean integration-test install && 
dev-utilities/build-utils/verify_licenses.sh 
      ```
    
    - [x] Have you written or updated unit tests and or integration tests to 
verify your changes?
    - [x] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
    - [ ] Have you verified the basic functionality of the build by building 
and running locally with Vagrant full-dev environment or the equivalent?
    
    ### For documentation related changes:
    - [ ] Have you ensured that format looks appropriate for the output in 
which it is rendered by building and verifying the site-book? If not then run 
the following commands and the verify changes via 
`site-book/target/site/index.html`:
    
      ```
      cd site-book
      mvn site
      ```
    
    #### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.
    It is also recommended that [travis-ci](https://travis-ci.org) is set up 
for your personal repository such that your branches are built there before 
submitting a pull request.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/justinleet/metron solrCommentsBlob

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/metron/pull/1037.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 #1037
    
----
commit bc44653102f9f628ae23fee1309048dbc07ca0b8
Author: justinjleet <justinjleet@...>
Date:   2018-05-09T19:54:57Z

    Mostly working

commit 1778a6941b861fafb4b67e188323bd13d5e9df8b
Author: justinjleet <justinjleet@...>
Date:   2018-05-14T00:49:31Z

    Fixing error message

commit b7eb68012a07c1c8c045012e8abfdfc7dc11e55b
Author: justinjleet <justinjleet@...>
Date:   2018-05-14T02:43:34Z

    Fixing multiindexdao to grab latest before delegating to avoid hbase sadness

commit 3ce28390c11fe5e7d7355eab4c57dffa1004f6e9
Author: justinjleet <justinjleet@...>
Date:   2018-05-14T11:45:14Z

    fixing concurrent mod problem

commit 0b48179a8599888d3d4a8aafa848cf3c0d891f3b
Author: justinjleet <justinjleet@...>
Date:   2018-05-14T11:57:01Z

    Fixing schema tests to handle new field

commit 45212df8879f5a400262b715a1a1aef828397028
Author: justinjleet <justinjleet@...>
Date:   2018-05-14T20:31:07Z

    reverting es pom from testing

commit ea504dca9d2c5475d4753f974a08c65a0f5fa26e
Author: justinjleet <justinjleet@...>
Date:   2018-05-14T21:27:04Z

    testing UI changes to rest api

commit d0f202b127f5aa1d6d718184d57b8d676d93a5d5
Author: justinjleet <justinjleet@...>
Date:   2018-05-18T12:25:51Z

    testing ui changes

commit 7aaa63d9ccbb8896ecfc95be50b29cf4fa09851f
Author: justinjleet <justinjleet@...>
Date:   2018-05-23T10:47:04Z

    merge from feature/METRON-1416-upgrade-solr

commit 1d7347b71d8e0151f0152608fb39e0e80813d0b5
Author: justinjleet <justinjleet@...>
Date:   2018-05-23T14:17:51Z

    working on fixing patch

commit b4649fa26b0bd44eb23670783f781bea43aa7512
Author: justinjleet <justinjleet@...>
Date:   2018-05-23T17:57:08Z

    fixing plus logging

commit 1867c8d8553a07dd42d3f90609076dbe3c6ae0ed
Author: justinjleet <justinjleet@...>
Date:   2018-05-29T23:30:48Z

    variety of fixes post merge and race condition fix

commit 4e592d7ad63711fce2f3c3c1e7f48df1f228538b
Author: justinjleet <justinjleet@...>
Date:   2018-05-30T11:57:34Z

    stray println

commit 21b87f345e783baaeb981c0213b3a07508e48526
Author: justinjleet <justinjleet@...>
Date:   2018-05-30T13:38:29Z

    revert for temporary change

commit a15df6b27b7d71b59d746f0431effaa84533fb21
Author: justinjleet <justinjleet@...>
Date:   2018-05-30T13:43:28Z

    removing comment

commit 441e3397d46eb677091793a4ddebbd37d788ee16
Author: justinjleet <justinjleet@...>
Date:   2018-05-31T13:35:08Z

    minor fixes

commit 2d4c723ea3fe4153093ad2ae7ed3ab1c25f1c923
Author: justinjleet <justinjleet@...>
Date:   2018-06-01T18:52:07Z

    Removing old splice call that resulted in off by one error in UI

----


---

Reply via email to