I tried taking "str" it still gives the same error.

From: Parth Brahmbhatt [mailto:[email protected]]
Sent: Thursday, March 12, 2015 3:52 PM
To: [email protected]
Subject: Re: Hi

As the error suggests , your stream only has tuples with field "str". I am 
assuming you are using StringScheme which by default names the output field 
"str". So try using field name "str" instead of "json".

Thanks
Parth

From: Paul Brown <[email protected]<mailto:[email protected]>>
Reply-To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Date: Thursday, March 12, 2015 at 12:43 PM
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: Re: Hi


Kafka is just delivering raw content (byte[], String), so you'll need to parse 
the JSON, e.g., with Jackson or another JSON processing library.

-
[email protected]<mailto:[email protected]> | Multifarious, Inc. | 
http://mult.ifario.us/

On Thu, Mar 12, 2015 at 1:31 PM, Sowjanya.Kakarala 
<[email protected]<mailto:[email protected]>> wrote:

Hi All

I am trying to take the Json data from OpaqueTridentKafkaSpout, and I have only 
one input field is json.However I am not sure how to take this input field in 
my case because if I take an input field like

Fields field = new Fields("json"); it throws an error saying the following:

Exception in thread "main" java.lang.IllegalArgumentException: Trying to select 
non-existent field: 'json' from stream containing fields fields: <[str]>
                at storm.trident.Stream.projectionValidation(Stream.java:373)
                at storm.trident.Stream.each(Stream.java:140)
                at 
com.target.bigred.storm.trident.TridentTopo.main(TridentTopo.java:233)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:606)
                at 
com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

Can someone please help me how to take the input fields in trident?
I appreciate your help.Thanks.
Thanks
Sowjanya


  • Fwd: hi siddharth ubale
    • Hi combo yao
    • Hi Sowjanya . Kakarala
      • Re: Hi Paul Brown
        • Re: Hi Parth Brahmbhatt
          • RE: Hi Sowjanya . Kakarala
    • Hi bigdata hadoop

Reply via email to