Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper >> mail # user >> Determining network interface


Copy link to this message
-
Re: Determining network interface
We purposefully don't expose that through the public api. However take
a look at

org.apache.zookeeper.ZooKeeper.testableLocalSocketAddress()

(not part of the public api though, so it might change in future)

Patrick

On Wed, Jun 20, 2012 at 11:57 AM, Grigory Dzhavadyan
<[EMAIL PROTECTED]> wrote:
> I have a client that connects to Zookeeper and has to publish its IP
> address in a certain node. The machine that runs the client can have
> multiple NICs and I want to publish the IP address of the one through
> which the machine is connected to the zookeeper server. Is there a way
> to determine which network interface I am connected to zookeeper
> through?
>
> Thanks,
> Grigory
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB