What are you trying to do that led you down the path of trying to deserialize 
stormcode.ser? That file is just a serialized copy of the topology structure. 
The topology code that created it is going to be infinitely more readable. ;)


-Taylor

On Oct 23, 2014, at 6:14 PM, Frank Bolder <[email protected]> wrote:

> Hi to every Storm user,
> congratulations for your precious work. I'm quite new to Storm and Java so 
> I'm sorry for my maybe trivial questions.
> I'm trying to deserialize the file stormcode.ser that should contain the 
> StormTopology object in JSON, but I'm getting troubles. It's very hard for me 
> understanding the entire Storm code (Clojure + Java). 
> 
> I ran the WordCount topology in Local Mode inside Eclipse.
> Using FileInputStream, ObjectInputStream, readObject() and a StormTopology 
> object I managed to get a readable version of the topology. This is a frame 
> of the result:
> 
> StormTopology(spouts:{word-reader-SPOUT=SpoutSpec(spout_object:<ComponentObject
>  serialized_java:AC ED 00 05 73 72 00 1A 73 74 6F ... 64 65 72...>, 
> common:ComponentCommon(inputs:{}, 
> streams:{default=StreamInfo(output_fields:[line], direct:false)}, 
> json_conf:{"topology.tasks":1}))}, bolts:....
> 
> I'm not able to read/access this part:
> <ComponentObject serialized_java:AC ED 00 05 73 72 00 1A 73 74 6F ... 64 65 
> 72...>
> It is a bytebuffer type, java.nio.heapbytebuffer that should contain objects 
> and data related to the WordReader.Java (class of the spout) I wrote.
> 
> With get_spout_object() I obtained the spout ComponentObject.
> With Utils.getSetComponentObject() I should have obtained the previous object 
> in a deserialized shape. 
> If I print it, it displays "mypackage.spouts.WordReader@53c015".
> Then I also cast it to the class of the spout that I wrote (WordReader.Java).
> So it seems to be the right class object.
> 
> But the problem is that this object seems to be empty (collector=null, 
> completed = false, fileReader=null).
> In particular I used fileReader so its data shoud be present.
> 
> I don't understand where is the problem.
> Can you help me to find the mistakes and deserialize the following part?
> 
> <ComponentObject serialized_java:AC ED 00 05 73 72 00 1A 73 74 6F ... 64 65 
> 72...>
> 
> 
> 

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to