[
https://issues.apache.org/jira/browse/GORA-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271226#comment-13271226
]
Ferdy Galema commented on GORA-128:
-----------------------------------
Hi Raf,
This was something I already had running in a local branch; I solved this by
using a configuration property that determines if HBaseConfiguration should
wrap the Configuration by adding (and thus overriding) hbase properties from
the hbase-site.xml
See:
public void initialize(Class<K> keyClass, Class<T> persistentClass,
Properties properties) throws IOException {
super.initialize(keyClass, persistentClass, properties);
- this.conf = HBaseConfiguration.create(getConf());
+
+ if (conf.getBoolean("gora.hbasestore.add.hbaseconf", true)) {
+ HBaseConfiguration.addHbaseResources(getConf());
+ }
admin = new HBaseAdmin(this.conf);
This should solve your issue. You can simply set the right quorum on the passed
conf and set gora.hbasestore.add.hbaseconf to false. Can you verify this?
(Please note that Properties will be deprecated.)
> HBaseStore should be configurable to work with different qurom other than
> default one set in hbase-site.xml.
> ------------------------------------------------------------------------------------------------------------
>
> Key: GORA-128
> URL: https://issues.apache.org/jira/browse/GORA-128
> Project: Apache Gora
> Issue Type: New Feature
> Components: storage-hbase
> Reporter: raf shin
> Labels: gora-hbase
> Attachments: GORA-128.patch
>
>
> gora-hbase should be able to read/write from more than one hbase cluster. so
> it needs to connect to more than one zookeeper qurom. so when initializing in
> HbaseStore.initialize(...) we should get the configuration or property from
> caller and set those properties in the created HBaseConfiguration.
> @Override
> public void initialize(Class<K> keyClass, Class<T> persistentClass,
> Properties properties) throws IOException {
> super.initialize(keyClass, persistentClass, properties);
> this.conf = new HBaseConfiguration();
> +
> String key;
> while(properties.keys().hasMoreElement()){
> key = properties.keys().getNext();
> conf.set(key,properties.keys().get(key));
> }
> HBaseAdmin admin = new HBaseAdmin(conf);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira