hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas Liochon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-8810) Bring in code constants in line with default xml's
Date Thu, 04 Jul 2013 07:44:22 GMT

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

Nicolas Liochon commented on HBASE-8810:

bq. So, styling hbase-default.xml to produce a constants file to include would be a bunch
of work, too much work. (bunch of ugly xsl).

I was thinking about something like this:
- hand written XML file, as today, except it is NOT loaded. We always use the code defaults
- so we have one duplication (on this file and in the code), and we check it with a test.

void testDefaultOk(){
    Configuration file = new Configuration();

     Class<?> code = HConstant.class;
    for (String key: file.keys){
      String fileVal = file.get(key);
      String codeVal = "" + code.getField("DEFAULT_" + key).val;
      Assert.assertEquals(codeVal, fileVal)

The issue with the generation .xml --> java is that we will need to add the typing in the
xml (w/o this, we won't find an heuristic to choose between long & integer imho).

> Bring in code constants in line with default xml's
> --------------------------------------------------
>                 Key: HBASE-8810
>                 URL: https://issues.apache.org/jira/browse/HBASE-8810
>             Project: HBase
>          Issue Type: Bug
>          Components: Usability
>            Reporter: Elliott Clark
>            Assignee: Elliott Clark
>             Fix For: 0.95.2
>         Attachments: 8810.txt, 8810v2.txt, hbase-default_to_java_constants.xsl, HBaseDefaultXMLConstants.java
> After the defaults were changed in the xml some constants were left the same.

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

View raw message