Automatically obtaining zookeeper server version

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Automatically obtaining zookeeper server version

Keith Turner
A bit ago I wrote a blog post[1] about building shaded jars to run
Fluo applications with Spark.  In this post I advocated for building
the shaded jars with the versions of Fluo, Accumuo and ZooKeeper on
the system.  For obtaining the ZooKeeper version, I suggested the
following bash command in the post.

ZOOKEEPER_SERVER=localhost
ZOOKEEPER_VERSION=`echo status | nc $ZOOKEEPER_SERVER 2181 | grep
version: | sed 's/.*version: \([0-9.]*\).*/\1/'`

I was looking at this post recently and wondering if there is a better
way to get this info for ZooKeeper.  Does anyone know a
better/different way to accomplish this?

Thanks

Keith

[1]: http://fluo.apache.org/blog/2016/12/22/spark-load/
Reply | Threaded
Open this post in threaded view
|

Re: Automatically obtaining zookeeper server version

hanm
Server version is also exposed through JMX - that might be a better
alternative than using four letter words, which will be deprecated in
future.

On Mon, Apr 3, 2017 at 10:16 AM, Keith Turner <[hidden email]> wrote:

> A bit ago I wrote a blog post[1] about building shaded jars to run
> Fluo applications with Spark.  In this post I advocated for building
> the shaded jars with the versions of Fluo, Accumuo and ZooKeeper on
> the system.  For obtaining the ZooKeeper version, I suggested the
> following bash command in the post.
>
> ZOOKEEPER_SERVER=localhost
> ZOOKEEPER_VERSION=`echo status | nc $ZOOKEEPER_SERVER 2181 | grep
> version: | sed 's/.*version: \([0-9.]*\).*/\1/'`
>
> I was looking at this post recently and wondering if there is a better
> way to get this info for ZooKeeper.  Does anyone know a
> better/different way to accomplish this?
>
> Thanks
>
> Keith
>
> [1]: http://fluo.apache.org/blog/2016/12/22/spark-load/
>



--
Cheers
Michael.
Reply | Threaded
Open this post in threaded view
|

Re: Automatically obtaining zookeeper server version

Marcos Juarez
- "Server version is also exposed through JMX - that might be a better
- alternative than using four letter words, which will be deprecated in
- future."

Is there a timeline and/or plan for this happening?  We're currently
building out our infrastructure monitoring, and it would be useful to have
a more specific target date:

Thanks,

Marcos

On Mon, Apr 3, 2017 at 11:56 AM, Michael Han <[hidden email]> wrote:

> Server version is also exposed through JMX - that might be a better
> alternative than using four letter words, which will be deprecated in
> future.
>
> On Mon, Apr 3, 2017 at 10:16 AM, Keith Turner <[hidden email]> wrote:
>
> > A bit ago I wrote a blog post[1] about building shaded jars to run
> > Fluo applications with Spark.  In this post I advocated for building
> > the shaded jars with the versions of Fluo, Accumuo and ZooKeeper on
> > the system.  For obtaining the ZooKeeper version, I suggested the
> > following bash command in the post.
> >
> > ZOOKEEPER_SERVER=localhost
> > ZOOKEEPER_VERSION=`echo status | nc $ZOOKEEPER_SERVER 2181 | grep
> > version: | sed 's/.*version: \([0-9.]*\).*/\1/'`
> >
> > I was looking at this post recently and wondering if there is a better
> > way to get this info for ZooKeeper.  Does anyone know a
> > better/different way to accomplish this?
> >
> > Thanks
> >
> > Keith
> >
> > [1]: http://fluo.apache.org/blog/2016/12/22/spark-load/
> >
>
>
>
> --
> Cheers
> Michael.
>
Reply | Threaded
Open this post in threaded view
|

Re: Automatically obtaining zookeeper server version

hanm
>> Is there a timeline and/or plan for this happening?

Deprecate does not imply the feature is going to be removed instantly - the
four letter word feature is likely to be present in next server releases
for 3.5/3.6 release line and 3.4.x releases due to compatibility guarantees
ZooKeeper provides. The complete removal of the feature, if community
decides to do so, probably will only happen on a 3.7 or 4.0 (if it ever
has) release, for same compatibility concerns. For now in the near future
releases (3.4.11, 3.5.3) the feature is just disabled by default but you
can still turn it on and use it. If you are using four letter words
already, then the Admin Server
<https://zookeeper.apache.org/doc/trunk/zookeeperAdmin.html#sc_adminserver>
(only
in 3.5) should be an easy alternative which provides similar interfaces.
And you can also use JMX as previously mentioned.



On Mon, Apr 3, 2017 at 3:06 PM, Marcos Juarez <[hidden email]> wrote:

> - "Server version is also exposed through JMX - that might be a better
> - alternative than using four letter words, which will be deprecated in
> - future."
>
> Is there a timeline and/or plan for this happening?  We're currently
> building out our infrastructure monitoring, and it would be useful to have
> a more specific target date:
>
> Thanks,
>
> Marcos
>
> On Mon, Apr 3, 2017 at 11:56 AM, Michael Han <[hidden email]> wrote:
>
> > Server version is also exposed through JMX - that might be a better
> > alternative than using four letter words, which will be deprecated in
> > future.
> >
> > On Mon, Apr 3, 2017 at 10:16 AM, Keith Turner <[hidden email]> wrote:
> >
> > > A bit ago I wrote a blog post[1] about building shaded jars to run
> > > Fluo applications with Spark.  In this post I advocated for building
> > > the shaded jars with the versions of Fluo, Accumuo and ZooKeeper on
> > > the system.  For obtaining the ZooKeeper version, I suggested the
> > > following bash command in the post.
> > >
> > > ZOOKEEPER_SERVER=localhost
> > > ZOOKEEPER_VERSION=`echo status | nc $ZOOKEEPER_SERVER 2181 | grep
> > > version: | sed 's/.*version: \([0-9.]*\).*/\1/'`
> > >
> > > I was looking at this post recently and wondering if there is a better
> > > way to get this info for ZooKeeper.  Does anyone know a
> > > better/different way to accomplish this?
> > >
> > > Thanks
> > >
> > > Keith
> > >
> > > [1]: http://fluo.apache.org/blog/2016/12/22/spark-load/
> > >
> >
> >
> >
> > --
> > Cheers
> > Michael.
> >
>



--
Cheers
Michael.