0
votes

I am trying to load hbase table using phoenix CsvBulkLoadTool() from jboss. it's running but it's not taking configuration from hbase-site.xml kept in the WEB-INF/classes folder.

when i am running through command line it's taking hbase-site.xml property's from the classpath specified in it.

INFO QueryUtil:335 Creating connection with the jdbc url: jdbc:phoenix:localhost:2181:/hbase;

but in hbase-site.xml zookeeper address is not localhost now it is working with -z option only.

2

2 Answers

0
votes

Put the hbase-site.xml's all configuration in other configuration files that are picking from the location.You can put it in the core-site.xml it will pick configuration from there.

0
votes

Keep the core-site.xml and hbase-site.xml file in the folder of your choice as required. Then add them as resources to org.apache.hadoop.conf.Configuration instance.

Configuration conf = new Configuration(false);
conf.addResource("/path/to/core-site.xml");
conf.addResource("/path/to/hbase-site.xml");

Now pass this conf to your CsvBulkLoadTool job instance:

CsvBulkLoadTool job = new CsvBulkLoadTool();
job.setConf(conf);