Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-11188

"Inconsistent configuration" for SchemaMetrics is always shown

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.94.19
    • 0.94.20
    • metrics
    • None
    • Reviewed
    • Hide
      Region servers with the default value for hbase.metrics.showTableName will stop showing the error message "ERROR org.apache.hadoop.hbase.regionserver.metrics.SchemaMetrics: Inconsistent configuration. Previous configuration for using table name in metrics: true, new configuration: false".
      Region servers configured with hbase.metrics.showTableName=false should now get a message like this one: "ERROR org.apache.hadoop.hbase.regionserver.metrics.SchemaMetrics: Inconsistent configuration. Previous configuration for using table name in metrics: false, new configuration: true", and it's nothing to be concerned about.
      Show
      Region servers with the default value for hbase.metrics.showTableName will stop showing the error message "ERROR org.apache.hadoop.hbase.regionserver.metrics.SchemaMetrics: Inconsistent configuration. Previous configuration for using table name in metrics: true, new configuration: false". Region servers configured with hbase.metrics.showTableName=false should now get a message like this one: "ERROR org.apache.hadoop.hbase.regionserver.metrics.SchemaMetrics: Inconsistent configuration. Previous configuration for using table name in metrics: false, new configuration: true", and it's nothing to be concerned about.

    Description

      Some users have been complaining about this message:

      ERROR org.apache.hadoop.hbase.regionserver.metrics.SchemaMetrics: Inconsistent configuration. Previous configuration for using table name in metrics: true, new configuration: false
      

      The interesting thing is that we see it with default configurations, which made me think that some code path must have been passing the wrong thing. I found that if SchemaConfigured is passed a null Configuration in its constructor that it will then pass null to SchemaMetrics#configureGlobally which will interpret useTableName as being false:

        public static void configureGlobally(Configuration conf) {
          if (conf != null) {
            final boolean useTableNameNew =
                conf.getBoolean(SHOW_TABLE_NAME_CONF_KEY, false);
            setUseTableName(useTableNameNew);
          } else {
            setUseTableName(false);
          }
        }
      

      It should be set to true since that's the new default, meaning we missed it in HBASE-5671.

      I found one code path that passes a null configuration, StoreFile.Reader extends SchemaConfigured and uses the constructor that only passes a Path, so the Configuration is set to null.

      I'm planning on just passing true instead of false, fixing the problem for almost everyone (those that disable this feature will get the error message). IMO it's not worth more efforts since it's a 0.94-only problem and it's not actually doing anything bad.

      I'm closing both HBASE-10990 and HBASE-10946 as duplicates.

      Attachments

        1. HBASE-11188-0.94.patch
          0.5 kB
          Jean-Daniel Cryans
        2. HBASE-11188-0.94-v2.patch
          0.7 kB
          Jean-Daniel Cryans

        Activity

          People

            jdcryans Jean-Daniel Cryans
            jdcryans Jean-Daniel Cryans
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: