Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-27420

No such method exception with shaded codahale metric pattern

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Information Provided
    • 4.0.0-alpha-1
    • Not Applicable
    • Hive

    Description

      HIVE-22059 causes failure to start Hive server and metastore safely failing due to missing method error:

      java.lang.NoSuchMethodError: com.github.joshelser.dropwizard.metrics.hadoop.HadoopMetrics2Reporter.forRegistry(Lorg/apache/hive/com/codahale/metrics/MetricRegistry;)Lcom/github/joshelser/dropwizard/metrics/hadoop/HadoopMetrics2Reporter$Builder;
          at org.apache.hadoop.hive.metastore.metrics.Metrics.<init>(Metrics.java:286) ~[hive-exec-3.1.4.3.2.2.0-1.jar:3.1.4.3.2.2.0-1]
          at org.apache.hadoop.hive.metastore.metrics.Metrics.initialize(Metrics.java:71) ~[hive-exec-3.1.4.3.2.2.0-1.jar:3.1.4.3.2.2.0-1]
          at org.apache.hadoop.hive.metastore.HiveMetaStore.main(HiveMetaStore.java:306) [hive-exec-3.1.4.3.2.2.0-1.jar:3.1.4.3.2.2.0-1]
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_362]
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_362]
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_362]
          at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_362]
          at org.apache.hadoop.util.RunJar.run(RunJar.java:323) [hadoop-common-3.2.3.3.2.2.0-1.jar:?]
          at org.apache.hadoop.util.RunJar.main(RunJar.java:236) [hadoop-common-3.2.3.3.2.2.0-1.jar:?]

      This is caused as class pattern is shaded and relocated causing above no such method error

      <pattern>com.codahale.metrics</pattern>
      <shadedPattern>org.apache.hive.com.codahale.metrics</shadedPattern> 

      Attachments

        Issue Links

          Activity

            People

              shubh_init Shubham Sharma
              shubh_init Shubham Sharma
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: