Re: Working with storm compatibility layer

Posted by Shinhyung Yang on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Working-with-storm-compatibility-layer-tp4205p4211.html

Dear Matthias,

Thank you for replying!

that sounds weird and should not happen -- Spout.open() should get
called exactly once.

That's what I thought too. I'm new to both Storm and Flink so it's quite complicated for me to handle both yet; would it be helpful for me if I know storm's lifecyle and flink 's lifecycle? When submitTopology() invoked, what should be called other than spout.open()?

I am not sure about multiple calls to
declareOuputFields though -- if might be called multiple times -- would
need to double check the code.

I'll check my code too.
 
However, the call to declareOuputFields should be idempotent, so it
should actually not be a problem if it is called multiple times. Even if
Storm might call this method only once, there is no guarantee that it is
not called multiple time. If this is a problem for you, please let me
know. I think we could fix this and make sure the method is only called
once.

Actually it doesn't seem to be a problem for now. It just does the same job multiple times.
 
It would be helpful if you could share you code. What do you mean with
"exits silently"? No submission happens? Did you check the logs? As you
mentioned FlinkLocalCluster, I assume that you run within an IDE?

The topology doesn't seem to continue. There's a set of initialization code in the open method of the program's spout and it looks hopeless if it's not invoked. Is there any way to check the logs other than using println() calls? I'm running it on the commandline with having `bin/start_local.sh' running in the background and `bin/flink run'.
 
Btw: lately we fixed a couple of bugs. I would suggest that you use the
latest version from Flink master branch. I should work with 0.10.1
without problems.

It was vey tedious for me to deal with a pom.xml file and .m2 repository. So I preferred to use maven central. But I should try with the master branch if I have to.

I will quickly check if I could share some of the code.

Thank you again for the help!
With best regards,
Shinhyung Yang
 

-Matthias



On 01/09/2016 01:27 AM, Shinhyung Yang wrote:
> Howdies to everyone,
>
> I'm trying to use the storm compatibility layer on Flink 0.10.1. The
> original storm topology works fine on Storm 0.9.5 and I have
> incorporated FlinkLocalCluster, FlinkTopologyBuilder, and
> FlinkTopology classes according to the programming guide
> (https://ci.apache.org/projects/flink/flink-docs-release-0.10/apis/storm_compatibility.html).
> I'm running it on Oracle Java 8 (1.8.0_66-b17) on Centos 7 (7.2.1511).
> What happens is, it seems to be going all the way to submitTopology
> method without any problem, however it doesn't invoke open method of
> Spout class but declareOutputFields method is called for multiple
> times and the program exits silently. Do you guys have any idea what's
> going on here or have any suggestions? If needed, then please ask me
> for more information.
>
> Thank you for reading.
> With best regards,
> Shinhyung Yang
>