Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-3688

Copy storm.daemon.metrics.reporter.plugin.* configs from Config class to DaemonConfig class and deprecate them in Config class

    XMLWordPrintableJSON

Details

    • Task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      After the change in STORM-3670, the following configs

       public static final String STORM_DAEMON_METRICS_REPORTER_PLUGIN_LOCALE = "storm.daemon.metrics.reporter.plugin.locale";
      public static final String STORM_DAEMON_METRICS_REPORTER_PLUGIN_RATE_UNIT = "storm.daemon.metrics.reporter.plugin.rate.unit";
      public static final String STORM_DAEMON_METRICS_REPORTER_PLUGIN_DURATION_UNIT = "storm.daemon.metrics.reporter.plugin.duration.unit";
      
      

      are only used in daemon side. We can't move it to DaemonConfig from Config class because if a topology code refers to them directly, it will break (ClassNotFoundException) if the variables are moved out of Config class in a newer version of storm cluster.

      A better way is to duplicate them in DaemonConfig and "@deprecate" them in Config class.

      While doing so, I saw errors unit test (nimbus_test.clj)

      [INFO] --- clojure-maven-plugin:1.7.1:test (test-clojure) @ storm-core ---
      Exception in thread "main" Syntax error compiling at (org/apache/storm/nimbus_test.clj:1:1).
      	at clojure.lang.Compiler.load(Compiler.java:7647)
      	at clojure.lang.RT.loadResourceScript(RT.java:381)
      	at clojure.lang.RT.loadResourceScript(RT.java:372)
      	at clojure.lang.RT.load(RT.java:463)
      	at clojure.lang.RT.load(RT.java:428)
      	at clojure.core$load$fn__6824.invoke(core.clj:6126)
      	at clojure.core$load.invokeStatic(core.clj:6125)
      	at clojure.core$load.doInvoke(core.clj:6109)
      	at clojure.lang.RestFn.invoke(RestFn.java:408)
      	at clojure.core$load_one.invokeStatic(core.clj:5908)
      	at clojure.core$load_one.invoke(core.clj:5903)
      	at clojure.core$load_lib$fn__6765.invoke(core.clj:5948)
      	at clojure.core$load_lib.invokeStatic(core.clj:5947)
      	at clojure.core$load_lib.doInvoke(core.clj:5928)
      	at clojure.lang.RestFn.applyTo(RestFn.java:142)
      	at clojure.core$apply.invokeStatic(core.clj:667)
      	at clojure.core$load_libs.invokeStatic(core.clj:5985)
      	at clojure.core$load_libs.doInvoke(core.clj:5969)
      	at clojure.lang.RestFn.applyTo(RestFn.java:137)
      	at clojure.core$apply.invokeStatic(core.clj:667)
      	at clojure.core$require.invokeStatic(core.clj:6007)
      	at clojure.core$require.doInvoke(core.clj:6007)
      	at clojure.lang.RestFn.invoke(RestFn.java:408)
      	at org.apache.storm.testrunner$eval194$iter__195__199$fn__200$fn__201.invoke(test_runner.clj:43)
      	at org.apache.storm.testrunner$eval194$iter__195__199$fn__200.invoke(test_runner.clj:42)
      	at clojure.lang.LazySeq.sval(LazySeq.java:42)
      	at clojure.lang.LazySeq.seq(LazySeq.java:51)
      	at clojure.lang.RT.seq(RT.java:531)
      	at clojure.core$seq__5387.invokeStatic(core.clj:137)
      	at clojure.core$dorun.invokeStatic(core.clj:3133)
      	at clojure.core$dorun.invoke(core.clj:3133)
      	at org.apache.storm.testrunner$eval194.invokeStatic(test_runner.clj:42)
      	at org.apache.storm.testrunner$eval194.invoke(test_runner.clj:42)
      	at clojure.lang.Compiler.eval(Compiler.java:7176)
      	at clojure.lang.Compiler.load(Compiler.java:7635)
      	at clojure.lang.Compiler.loadFile(Compiler.java:7573)
      	at clojure.main$load_script.invokeStatic(main.clj:452)
      	at clojure.main$script_opt.invokeStatic(main.clj:512)
      	at clojure.main$script_opt.invoke(main.clj:507)
      	at clojure.main$main.invokeStatic(main.clj:598)
      	at clojure.main$main.doInvoke(main.clj:561)
      	at clojure.lang.RestFn.applyTo(RestFn.java:137)
      	at clojure.lang.Var.applyTo(Var.java:705)
      	at clojure.main.main(main.java:37)
      Caused by: java.lang.IllegalStateException: STORM-DAEMON-METRICS-REPORTER-PLUGIN-DURATION-UNIT already refers to: #'org.apache.storm.daemon-config/STORM-DAEMON-METRICS-REPORTER-PLUGIN-DURATION-UNIT in namespace: org.apache.storm.nimbus-test
      	at clojure.lang.Namespace.warnOrFailOnReplace(Namespace.java:88)
      	at clojure.lang.Namespace.reference(Namespace.java:110)
      	at clojure.lang.Namespace.refer(Namespace.java:168)
      	at clojure.core$refer.invokeStatic(core.clj:4252)
      	at clojure.core$refer.doInvoke(core.clj:4217)
      	at clojure.lang.RestFn.invoke(RestFn.java:410)
      	at clojure.lang.AFn.applyToHelper(AFn.java:154)
      	at clojure.lang.RestFn.applyTo(RestFn.java:132)
      	at clojure.core$apply.invokeStatic(core.clj:667)
      	at clojure.core$load_lib.invokeStatic(core.clj:5966)
      	at clojure.core$load_lib.doInvoke(core.clj:5928)
      	at clojure.lang.RestFn.applyTo(RestFn.java:142)
      	at clojure.core$apply.invokeStatic(core.clj:667)
      	at clojure.core$load_libs.invokeStatic(core.clj:5989)
      	at clojure.core$load_libs.doInvoke(core.clj:5969)
      	at clojure.lang.RestFn.applyTo(RestFn.java:137)
      	at clojure.core$apply.invokeStatic(core.clj:669)
      	at clojure.core$use.invokeStatic(core.clj:6093)
      	at clojure.core$use.doInvoke(core.clj:6093)
      	at clojure.lang.RestFn.invoke(RestFn.java:408)
      	at org.apache.storm.nimbus_test$eval212$loading__6706__auto____213.invoke(nimbus_test.clj:16)
      	at org.apache.storm.nimbus_test$eval212.invokeStatic(nimbus_test.clj:16)
      	at org.apache.storm.nimbus_test$eval212.invoke(nimbus_test.clj:16)
      	at clojure.lang.Compiler.eval(Compiler.java:7176)
      	at clojure.lang.Compiler.eval(Compiler.java:7165)
      	at clojure.lang.Compiler.load(Compiler.java:7635)
      	... 43 more
      

      So I filed this as a separate task. And anyone can work on it later.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ethanli Ethan Li
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: