AirSage / Petrel

Tools for writing, submitting, debugging, and monitoring Storm topologies in pure Python
BSD 3-Clause "New" or "Revised" License
247 stars 70 forks source link

Missing -version #76

Open CogumelosMaravilha opened 8 years ago

CogumelosMaravilha commented 8 years ago

Hi all, With lots of virtualenvs and envs sometimes is difficult to know which version I'm using. And most application have an -version option. Can we have petrel -version? Thanks.

barrywhart commented 8 years ago

Have you tried running "pip freeze"? I believe that'll tell you the versions of currently installed Python packages.

barrywhart commented 8 years ago

Or "pip show".

http://stackoverflow.com/questions/10214827/find-which-version-of-package-is-installed-with-pip

CogumelosMaravilha commented 8 years ago

Or pip list. Yes I can type pip freeze|grep petrel or petrel -version isn't this better?

barrywhart commented 8 years ago

I'll look into it at some point -- it shouldn't be much work. Just wanted to provide you an alternative for now.

CogumelosMaravilha commented 8 years ago

Hi Barry, Something is wrong with Petrel 1.0.1. I have a topology that runs ok on later version, and don't start at 1.0.1. Perhaps on Storm version 1.0.2 when you have a full patch version for the early problem, you can add the -v or -version. By the way how can I change the name of the GenericTopology?

barrywhart commented 8 years ago

What do you mean by "later version"? 1.0.1 is the latest.

Can you be more specific what you mean by changing the name?

CogumelosMaravilha commented 8 years ago

Sorry earlier version! petrel submit --config topology.yaml --venv self --logdir pwd I always get a GenericTopology on the jar file. I want to change the name.

barrywhart commented 8 years ago

The file it creates is called topology.jar. Do you mean you want to change the name of the file or the Java class? Why is this important/useful?

Maybe it will help me understand if you can fill in the blanks below: As a __, I want to __ so that I can ____.

barrywhart commented 8 years ago

When you run on 1.0.1, do you get any errors, either written to the console or the logs? Have you tried running the word count sample? I tested with that before uploading the latest version to Pypi.

Can you please create separate tickets for your requests? We are discussing three different questions here:

barrywhart commented 8 years ago

BTW, you can specify the topology name on the Petrel command line. This is only applicable when submitting to a cluster, not when running in local mode. See the following code:

https://github.com/AirSage/Petrel/blob/master/petrel/petrel/cmdline.py#L91-L93

CogumelosMaravilha commented 8 years ago

Hi Barry, Lets see point by point. When I compile my topology for later submission; petrel submit --config topology.yaml --venv self --logdir 'pwd' $jar -xvf topology.jar |less created: META-INF/ inflated: META-INF/MANIFEST.MF created: storm/ created: storm/petrel/ inflated: storm/petrel/GenericTopology.class I allway get a GenericTopology.class, and if I want to submit 2 topologies I cant because both have the same name. How can I change this name?

CogumelosMaravilha commented 8 years ago

Hi allways submit my topology like this; storm jar topology.jar storm.petrel.GenericTopology Generic -c strom.petrel.GenericTopology Generic -c nimbus.host=127.0.0.1

barrywhart commented 8 years ago

Also, you were saying your topology won't start on 1.0.1. I asked some questions above about that.

CogumelosMaravilha commented 8 years ago

Hi Barry, By mistake I was using my stom.yaml 0.1.0 on 1.0.1. That's why topology never start and never log nothing! Solved.

CogumelosMaravilha commented 8 years ago

Today I saw the warning; 622 [main] WARN o.a.s.u.NimbusClient - Using deprecated config nimbus.host for backward compatibility. Please update your storm.yaml so it only has config nimbus.seeds

barrywhart commented 8 years ago

Cool, I'm glad you figured out the version issue. I created a new issue for the Storm setting: https://github.com/AirSage/Petrel/issues/78.