Hi Vladimir, Most of the code snippets are already arranged in complete and ready-for-usage samples: https://github.com/apache/ignite/tree/master/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets
Anyway, those are code snippets that are injected into quite generic documentation pages. Your case represents a situation when someone needs to work with binary objects and streaming APIs. What if we add a data streamer example for BinaryObjects into Ignite's examples and put a reference to that example from the documentation page? Are you interested in contributing the example? https://github.com/apache/ignite/tree/master/examples - Denis On Fri, Dec 4, 2020 at 2:58 AM Vladimir Tchernyi <[email protected]> wrote: > Hi, community > > > > I've just finished drilling a small page [1] about Ignite data streaming > and I want to share my impressions. The situation is common for many Ignite > documentation pages, impressions are the same. > > > > My problem was to adapt IgniteDataStreamer to data loading using the > binary format as described in my article [2]. I try to use the same > approach: > > 1) load data on the client node; > > 2) convert it to the binary form; > > 3) use IgniteDataStreamer/StreamReceiver pair (instead of > ComputeTaskAdapter/ComputeJobAdapter) to ingest data in the cache. > > > > I modified my production code using IgniteDataStreamer<BinaryObject, > BinaryObject> and StreamReceiver<BinaryObject, BinaryObject>, tried to > start on the dev cluster made of 2 server nodes and 1 client node. That is > it: ClassNotFoundException for the class that exists on the client node > only. > > > > The solution to the problem seems to be in setting > streamer.keepBinary(true), but page [1] never says about it. I found that > setter in the IgniteDataStreamer source code after a single day of > troubleshooting. Definitely, "In Ignite We Trust" - what else reason would > drive me to spend so much time? > > > > The code snippets on the page [1] are hard to implement in real-world > applications because of using only primitive types String, Integer, etc. > These are more like unit tests. > > > > My proposal - it would be great to create a small GitHub repo containing a > complete compilable code example, one repo for every page. I think such > repos will keep the newbie Ignite users inside the project and prevent them > from leaving. > > > > Regards, > > Vladimir Tchernyi > > -- > > [1] https://ignite.apache.org/docs/latest/data-streaming > > [2] > https://www.gridgain.com/resources/blog/how-fast-load-large-datasets-apache-ignite-using-key-value-api > > >
