HBase
  1. HBase
  2. HBASE-11599

BloomFilterFactory.IO_STOREFILE_DELETEFAMILY_BLOOM_ENABLED is never used

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Not A Problem
    • Affects Version/s: 1.0.0, 0.94.21, 0.98.4, 2.0.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      BloomFilterFactory.IO_STOREFILE_DELETEFAMILY_BLOOM_ENABLED is not used anywhere. I think we should clean it.

        Activity

        Hide
        Ranjana Rajendran added a comment -

        IO_STOREFILE_DELETEFAMILY_BLOOM_ENABLED is set to the string "io.storefile.delete.family.bloom.enabled". I do not see any place that the value of this variable is set to false. Yet, there is a function isDeleteFamilyBloomEnabled(Configuration conf) which checks the value of this variable to be true. This function is called at one place to decide to log a debug message and return from a function without continuing.

        Show
        Ranjana Rajendran added a comment - IO_STOREFILE_DELETEFAMILY_BLOOM_ENABLED is set to the string "io.storefile.delete.family.bloom.enabled". I do not see any place that the value of this variable is set to false. Yet, there is a function isDeleteFamilyBloomEnabled(Configuration conf) which checks the value of this variable to be true. This function is called at one place to decide to log a debug message and return from a function without continuing.
        Hide
        Apekshit Sharma added a comment -

        Hi Ranjana

        I believe IO_STOREFILE_DELETEFAMILY_BLOOM_ENABLED simply stores the name of a configuration setting which can be set to true or false in some config file. So users can have following in their config,
        io.storefile.delete.family.bloom.enabled = true/false

        You're right that it's only used in one place, in function isDeleteFamilyBloomEnabled(Configuration conf)

        public static boolean isDeleteFamilyBloomEnabled(Configuration conf) {
          return conf.getBoolean(IO_STOREFILE_DELETE_FAMILY_BLOOM_ENABLED, true);
        }
        

        However, it's not trying to check value of the variable to be true, instead, getBoolean(String name, boolean defaultValue) tries to get the value of 'name' setting from the configuration 'conf' and returns it. If the setting is not found or is mis-configured (a value other that true or false - case insensitive), it returns defaultValue.

        Since users may be using it, I think we shouldn't clean it.

        Show
        Apekshit Sharma added a comment - Hi Ranjana I believe IO_STOREFILE_DELETEFAMILY_BLOOM_ENABLED simply stores the name of a configuration setting which can be set to true or false in some config file. So users can have following in their config, io.storefile.delete.family.bloom.enabled = true/false You're right that it's only used in one place, in function isDeleteFamilyBloomEnabled(Configuration conf) public static boolean isDeleteFamilyBloomEnabled(Configuration conf) { return conf.getBoolean(IO_STOREFILE_DELETE_FAMILY_BLOOM_ENABLED, true ); } However, it's not trying to check value of the variable to be true, instead, getBoolean(String name, boolean defaultValue) tries to get the value of 'name' setting from the configuration 'conf' and returns it. If the setting is not found or is mis-configured (a value other that true or false - case insensitive), it returns defaultValue. Since users may be using it, I think we shouldn't clean it.
        Hide
        Jonathan Hsieh added a comment -

        +1 closing this out.

        Show
        Jonathan Hsieh added a comment - +1 closing this out.

          People

          • Assignee:
            Apekshit Sharma
            Reporter:
            Jean-Marc Spaggiari
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development