Github user cestella commented on the issue:

    https://github.com/apache/incubator-metron/pull/271
  
    +1, tested in single node vagrant.  
    
    Did the following:
    * Created a config called `custom` at 
`$METRON_HOME/config/zookeeper/parsers/custom.json`:
    ```
    {
      "parserClassName":"org.apache.metron.parsers.json.JSONMapParser",
      "sensorTopic":"custom",
      "parserConfig" : {
        "mapStrategy" : "UNFOLD"
      }
    }
    ```
    * Created kafka topic for `custom` via 
`/usr/hdp/current/kafka-broker/bin/kafka-topics.sh --zookeeper node1:2181 
--create --topic custom --partitions 1 --replication-factor 1`
    * Loaded the configs into zookeeper via 
`$METRON_HOME/bin/zk_load_configs.sh --mode PUSH -i 
/usr/metron/0.2.0BETA/config/zookeeper -z node1:2181`
    * Started the topology via 
`/usr/metron/0.2.0BETA/bin/start_parser_topology.sh -k node1:6667 -z node1:2181 
-s custom`
    * Created some sample data in `~/test_data.dat`:
    ```
    { "foo" : "bar" }
    { "map" : { "blah" : 1 } }
    { "foo" : "grok", "map" : { "blah" : { "tim" : "sort" } } }
    ```
    * Loaded the sample data into the kafka queue via `cat ~/test_data.dat | 
/usr/hdp/current/kafka-broker/bin/kafka-console-producer.sh --broker-list 
node1:6667 --topic custom`
    * Checked in ES Head that I had a message with a field called `map:blah:tim`



---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to