You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metron.apache.org by mmiklavc <gi...@git.apache.org> on 2016/05/07 03:37:30 UTC

[GitHub] incubator-metron pull request: METRON-140 handle empty line in CSV...

GitHub user mmiklavc opened a pull request:

    https://github.com/apache/incubator-metron/pull/109

    METRON-140 handle empty line in CSVExtractor

    https://issues.apache.org/jira/browse/METRON-140

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

    $ git pull https://github.com/mmiklavc/incubator-metron METRON-140

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

    https://github.com/apache/incubator-metron/pull/109.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 #109
    
----
commit d2ed46087065a18c67a0dfcd92b331a2a9ad8d28
Author: Michael Miklavcic <mi...@clevelandflash.com>
Date:   2016-05-07T03:31:59Z

    METRON-140 handle empty line in CSVExtractor

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-metron pull request: METRON-140 handle empty line in CSV...

Posted by mmiklavc <gi...@git.apache.org>.
Github user mmiklavc commented on the pull request:

    https://github.com/apache/incubator-metron/pull/109#issuecomment-217666318
  
    I also tested this on single-node Vagrant


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-metron pull request: METRON-140 handle empty line in CSV...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-metron/pull/109


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-metron pull request: METRON-140 handle empty line in CSV...

Posted by cestella <gi...@git.apache.org>.
Github user cestella commented on a diff in the pull request:

    https://github.com/apache/incubator-metron/pull/109#discussion_r62421908
  
    --- Diff: metron-platform/metron-data-management/src/main/java/org/apache/metron/dataloads/extractor/csv/CSVExtractor.java ---
    @@ -82,6 +83,14 @@ public LookupConverter getConverter() {
         return Arrays.asList(new LookupKV(key, converter.toValue(values)));
       }
     
    +  private boolean ignore(String line) {
    +    if(null == line) {
    +      return false;
    --- End diff --
    
    I think you mean to return "true" here


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-metron pull request: METRON-140 handle empty line in CSV...

Posted by cestella <gi...@git.apache.org>.
Github user cestella commented on the pull request:

    https://github.com/apache/incubator-metron/pull/109#issuecomment-218142099
  
    +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-metron pull request: METRON-140 handle empty line in CSV...

Posted by cestella <gi...@git.apache.org>.
Github user cestella commented on the pull request:

    https://github.com/apache/incubator-metron/pull/109#issuecomment-217665302
  
    This looks great outside of the couple of things I mentioned.  Definitely like the null check.  +1 imminent if you get those changes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-metron pull request: METRON-140 handle empty line in CSV...

Posted by dlyle65535 <gi...@git.apache.org>.
Github user dlyle65535 commented on the pull request:

    https://github.com/apache/incubator-metron/pull/109#issuecomment-218208702
  
    +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-metron pull request: METRON-140 handle empty line in CSV...

Posted by cestella <gi...@git.apache.org>.
Github user cestella commented on a diff in the pull request:

    https://github.com/apache/incubator-metron/pull/109#discussion_r62421915
  
    --- Diff: metron-platform/metron-data-management/src/test/java/org/apache/metron/dataloads/extractor/csv/CSVExtractorTest.java ---
    @@ -91,5 +85,9 @@ public void validate(ExtractorHandler handler) throws IOException {
           Iterable<LookupKV> results = handler.getExtractor().extract("#google.com,1.0,foo");
           Assert.assertEquals(0, Iterables.size(results));
         }
    +    {
    +      Iterable<LookupKV> results = handler.getExtractor().extract("");
    +      Assert.assertEquals(0, Iterables.size(results));
    +    }
    --- End diff --
    
    Cool!  Can you add a case for null and for a "  "?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---