RE: Re: RE: Re: Re: Split Kafka JSON String

2016-05-24 Thread Sinnema, Remon
@storm.apache.org Subject: Aw: Re: RE: Re: Re: Split Kafka JSON String Thank you for your help! But unfortunately it still does not work. My code looks as follows: import org.json.simple.JSONObject; import backtype.storm.topology.BasicOutputCollector; import backtype.storm.tuple.Tuple; public class

Aw: Re: RE: Re: Re: Split Kafka JSON String

2016-05-24 Thread Daniela S
;Ganesh Chandrasekaran" An: "user@storm.apache.org" Betreff: Re: Aw: RE: Re: Re: Split Kafka JSON String You have to access the 0th index for the string… and then perform the operations to get the values   public void execute(Tuple tuple) {     String tupleString =

Re: Aw: RE: Re: Re: Split Kafka JSON String

2016-05-24 Thread Ganesh Chandrasekaran
To: "user@storm.apache.org" Subject: Aw: RE: Re: Re: Split Kafka JSON String Thank you, I tried it, but it is not working. I have to use the Tuple input, which is a string, containing a JSON, coming from Kafka. When I try the following: JSONObject obj = new JSONObject(input); it tells me to

Aw: RE: Re: Re: Split Kafka JSON String

2016-05-24 Thread Daniela S
  Gesendet: Dienstag, 24. Mai 2016 um 19:05 Uhr Von: "Sinnema, Remon" An: "user@storm.apache.org" Betreff: RE: Re: Re: Split Kafka JSON String Import org.json.JSONObject;   JSONObject obj = new JSONObject(jsonString); String command = obj.getString(“command”);

RE: Re: Re: Split Kafka JSON String

2016-05-24 Thread Sinnema, Remon
Import org.json.JSONObject; JSONObject obj = new JSONObject(jsonString); String command = obj.getString(“command”); From: Daniela S [mailto:daniela_4...@gmx.at] Sent: dinsdag 24 mei 2016 18:08 To: user@storm.apache.org Subject: Aw: Re: Re: Split Kafka JSON String Hi, unfortunately it does not

Aw: Re: Re: Split Kafka JSON String

2016-05-24 Thread Daniela S
best way to store it in Redis and to define two keys for each value?   The END JSONs should be deleted from Redis.   Thank you in advance.   Regards, Daniela     Gesendet: Montag, 16. Mai 2016 um 14:08 Uhr Von: "Henry Hottelet" An: user@storm.apache.org Betreff: Re: R

Re: Re: Split Kafka JSON String

2016-05-16 Thread Henry Hottelet
how to build the key with both IDs and > how to access the fields in the JSON String. > > Hope you can help me. > > Thank you so much in advance! > > Regards, > Daniela > > > > Gesendet: Sonntag, 15. Mai 2016 um 22:07 Uhr > Von: "Henry Hottelet

Aw: Re: Re: Split Kafka JSON String

2016-05-16 Thread Daniela S
ready read a lot about the possibility to store JSON Strings in Redis, but I have no idea how to build the key with both IDs and how to access the fields in the JSON String.   Hope you can help me.   Thank you so much in advance!   Regards, Daniela        Gesendet: Sonntag, 15. Mai 201

Re: Aw: Re: Split Kafka JSON String

2016-05-15 Thread Sai Dilip Reddy Kiralam
ored (active) devices out of > Redis and to build a sum over all the devices every minute. For building > the sum I have to add another value for every device. I would like to use > Redis as a kind of cache. > > Regards, > Daniela > > *Gesendet:* Sonntag, 15. Mai 2016 um 20:0

Re: Aw: Re: Split Kafka JSON String

2016-05-15 Thread Henry Hottelet
all the devices every minute. For building the sum I > have to add another value for every device. I would like to use Redis as a > kind of cache. > > Regards, > Daniela > > Gesendet: Sonntag, 15. Mai 2016 um 20:06 Uhr > Von: "Henry Hottelet" > An: us

Re: Aw: Re: Split Kafka JSON String

2016-05-15 Thread Henry Hottelet
s as a kind of cache. > > Regards, > Daniela > > *Gesendet:* Sonntag, 15. Mai 2016 um 20:06 Uhr > *Von:* "Henry Hottelet" > *An:* user@storm.apache.org > *Betreff:* Re: Split Kafka JSON String > > Try using intellij plug in that converts json to pojo classes >

Aw: Re: Split Kafka JSON String

2016-05-15 Thread Daniela S
ding the sum I have to add another value for every device. I would like to use Redis as a kind of cache.   Regards, Daniela   Gesendet: Sonntag, 15. Mai 2016 um 20:06 Uhr Von: "Henry Hottelet" An: user@storm.apache.org Betreff: Re: Split Kafka JSON String Try using intellij plu

Re: Split Kafka JSON String

2016-05-15 Thread Henry Hottelet
HERE is the JSON to POJO IntelliJ plugin https://plugins.jetbrains.com/plugin/7678?pr= — Henry Hottelet 646-543-6104 (Google Voice: cell/sms) hotte...@gmail.com (Email) http://www.linkedin.com/in/hottelet (LinkedIn) https://techn

Re: Split Kafka JSON String

2016-05-15 Thread Henry Hottelet
Try using intellij plug in that converts json to pojo classes On May 15, 2016 2:04 PM, "Nathan Leung" wrote: > Easiest way is to map your job to a pojo and use Jackson or gson to > convert the json. > On May 15, 2016 1:48 PM, "Daniela S" wrote: > >> Hi >> >> I am receiving Strings of JSON from K

Re: Split Kafka JSON String

2016-05-15 Thread Nathan Leung
Map your json to a pojo. Sorry auto correct got me. On May 15, 2016 2:04 PM, "Nathan Leung" wrote: > Easiest way is to map your job to a pojo and use Jackson or gson to > convert the json. > On May 15, 2016 1:48 PM, "Daniela S" wrote: > >> Hi >> >> I am receiving Strings of JSON from Kafka. I wo

Re: Split Kafka JSON String

2016-05-15 Thread Nathan Leung
Easiest way is to map your job to a pojo and use Jackson or gson to convert the json. On May 15, 2016 1:48 PM, "Daniela S" wrote: > Hi > > I am receiving Strings of JSON from Kafka. I would like to split the > string to get each field from the JSON object to store it into Redis. > How can I split

Split Kafka JSON String

2016-05-15 Thread Daniela S
Hi   I am receiving Strings of JSON from Kafka. I would like to split the string to get each field from the JSON object to store it into Redis. How can I split the string and assign the parts to variables?   Thank you in advance.   Regards, Daniela