Have no Idea, some guys try to use "curl" to determine active NN. My suggestion is different. You should put remote NN HA configuration in hdfs-site.xml.
2015-09-24 14:33 GMT+02:00 Akmal Abbasov <[email protected]>: > > add remote cluster HA configuration to your "local" hdfs client > > configuration > I am using the following command in script > $HBASE_PATH/bin/hbase org.apache.hadoop.hbase.snapshot.ExportSnapshot > -snapshot snapshot-name -copy-to hdfs://remote_hbase_master/hbase > <hdfs://remote_hbase_master/hbase> > In this case how I can know which namenode is active? > > Thanks! > > > On 23 Sep 2015, at 12:14, Serega Sheypak <[email protected]> > wrote: > > > >> 1. to know which of the HDFS namenode is active > > add remote cluster HA configuration to your "local" hdfs client > > configuration > > > >> Afaik, it should be done through zookeeper, but through which API it > will > > be more convenient? > > no,no,no > > use hdfs-site.xml configuration. > > You need to add configuration for remote NN HA and your local hdfs client > > would correctly resolve active NN. > > > > 2015-09-23 11:32 GMT+02:00 Akmal Abbasov <[email protected]>: > > > >> Hi all, > >> I would like to know the best practice when exporting a snapshot to > remote > >> hbase cluster with ha configuration. > >> My assumption is: > >> 1. to know which of the HDFS namenode is active > >> 2. export snapshot to active namenode > >> > >> Since I need to do this programmatically what is the best way to know > >> which namenode is active? > >> Afaik, it should be done through zookeeper, but through which API it > will > >> be more convenient? > >> > >> Thanks. > >
