hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Hsieh (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HBASE-8197) Cannot distinguish between HBase default config value and client overridden config value
Date Thu, 28 Mar 2013 00:11:16 GMT

    [ https://issues.apache.org/jira/browse/HBASE-8197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13615910#comment-13615910
] 

Jonathan Hsieh edited comment on HBASE-8197 at 3/28/13 12:09 AM:
-----------------------------------------------------------------

Looks like what you need is available hm.. the diff between older hadoop and hadoop2 is this:

in Hadoop's Configuration.java file.

https://github.com/apache/hadoop-common/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java#L2113
{code}
      if (updatingResource != null) {
        String[] sources = updatingResource.get(name);
        if(sources != null) {
          for(String s : sources) {
            Element sourceNode = doc.createElement("source");
            sourceNode.appendChild(doc.createTextNode(s));
            propNode.appendChild(sourceNode);
          }
        }
      }
{code}


And your can get the chain via: Configuraiton.getPropertySources. 
https://github.com/apache/hadoop-common/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java#L1172

[~giacomotaylor] how about we change this into a documentation jira (which would be something
along the line of if you use hadoop2's hadoop-common's configuratoin you get this).?
                
      was (Author: jmhsieh):
    Looks like what you need is available hm.. the diff between older hadoop and hadoop2 is
this:

in Hadoop's Configuration.java file.

https://github.com/apache/hadoop-common/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java#L2113
{code}
      if (updatingResource != null) {
        String[] sources = updatingResource.get(name);
        if(sources != null) {
          for(String s : sources) {
            Element sourceNode = doc.createElement("source");
            sourceNode.appendChild(doc.createTextNode(s));
            propNode.appendChild(sourceNode);
          }
        }
      }
{code}


And your can get the chain via: Configuraiton.getPropertySources. 
https://github.com/apache/hadoop-common/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java#L1172

[~jtaylor@cobaltgroup.com] how about we change this into a documentation jira (which would
be something along the line of if you use hadoop2's hadoop-common's configuratoin you get
this).?
                  
> Cannot distinguish between HBase default config value and client overridden config value
> ----------------------------------------------------------------------------------------
>
>                 Key: HBASE-8197
>                 URL: https://issues.apache.org/jira/browse/HBASE-8197
>             Project: HBase
>          Issue Type: Bug
>          Components: Usability
>    Affects Versions: 0.94.6
>            Reporter: James Taylor
>            Priority: Minor
>
> By HBase setting default values in hbase-default.xml, it makes it difficult for a platform
to know if a value has been overridden by the client. For example, Phoenix has a default value
it would like to use for hbase.client.scanner.caching. I'd like to be able to call config.setIfUnset
option to use our default value if a client hasn't already provided their own. Since HBase
sets this in hbase-default.xml to 1, I can't differentiate between the client have a value
in their hbase-sites.xml as 1 versus the default value we're getting from HBase.
> Wouldn't it be better if HBase had constants defined in a Java interface that would be
used by HBase as the default value if none other is provided, like this:
>     config.getInt("hbase.client.scanner.caching", HBaseDefault.CLIENT_SCANNER_CACHING);

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message