Hi Akmal, It will be better if you use name service value. You will not need to worry about which NN is active. I believe you can find that property in Hadoop's core-site.xml file.
Sent from my iPhone On Sep 24, 2015, at 7:23 AM, Akmal Abbasov <akmal.abba...@icloud.com> wrote: >> My suggestion is different. You should put remote NN HA configuration in >> hdfs-site.xml. > ok, in case I’ll put it, still how I can determine which of those 2 namenodes > is active? > >> On 24 Sep 2015, at 15:56, Serega Sheypak <serega.shey...@gmail.com> wrote: >> >> 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 <akmal.abba...@icloud.com>: >> >>>> 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 <serega.shey...@gmail.com> >>>> 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 <akmal.abba...@icloud.com>: >>>> >>>>> 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. >