You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gora.apache.org by "raf shin (JIRA)" <ji...@apache.org> on 2012/05/09 08:58:23 UTC

[jira] [Created] (GORA-128) HBaseStore should be configurable to work with different qurom other than default one set in hbase-site.xml.

raf shin created GORA-128:
-----------------------------

             Summary: 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


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

        

[jira] [Closed] (GORA-128) HBaseStore should be configurable to work with different qurom other than default one set in hbase-site.xml.

Posted by "Ferdy Galema (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GORA-128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ferdy Galema closed GORA-128.
-----------------------------

       Resolution: Not A Problem
    Fix Version/s:     (was: 0.3)
    
> 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
>    Affects Versions: 0.2
>            Reporter: raf shin
>              Labels: gora-hbase
>
> 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

        

[jira] [Commented] (GORA-128) HBaseStore should be configurable to work with different qurom other than default one set in hbase-site.xml.

Posted by "Ferdy Galema (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] [Updated] (GORA-128) HBaseStore should be configurable to work with different qurom other than default one set in hbase-site.xml.

Posted by "Lewis John McGibbney (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GORA-128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lewis John McGibbney updated GORA-128:
--------------------------------------

    Affects Version/s: 0.2
        Fix Version/s: 0.3
    
> 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
>    Affects Versions: 0.2
>            Reporter: raf shin
>              Labels: gora-hbase
>             Fix For: 0.3
>
>         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

        

[jira] [Updated] (GORA-128) HBaseStore should be configurable to work with different qurom other than default one set in hbase-site.xml.

Posted by "Ferdy Galema (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GORA-128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ferdy Galema updated GORA-128:
------------------------------

    Attachment: GORA-128.patch
    
> 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

        

[jira] [Updated] (GORA-128) HBaseStore should be configurable to work with different qurom other than default one set in hbase-site.xml.

Posted by "Ferdy Galema (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GORA-128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ferdy Galema updated GORA-128:
------------------------------

    Attachment:     (was: GORA-128.patch)
    
> 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
>    Affects Versions: 0.2
>            Reporter: raf shin
>              Labels: gora-hbase
>             Fix For: 0.3
>
>
> 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

        

[jira] [Commented] (GORA-128) HBaseStore should be configurable to work with different qurom other than default one set in hbase-site.xml.

Posted by "Ferdy Galema (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GORA-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281619#comment-13281619 ] 

Ferdy Galema commented on GORA-128:
-----------------------------------

My previously suggested patch is not necessary (removed the patch to avoid confusion). In fact, the requested feature already works by simply providing the right hbase.zookeeper.quorum property to the initialized store. It will override the value in hbase-site.xml.
                
> 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
>    Affects Versions: 0.2
>            Reporter: raf shin
>              Labels: gora-hbase
>
> 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