hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vino...@apache.org
Subject [3/3] hadoop git commit: HADOOP-13428. Fixed hadoop-common build files to generate jdiff by working around a jdiff-bug. Contributed by Wangda Tan.
Date Sat, 20 Aug 2016 02:31:32 GMT
HADOOP-13428. Fixed hadoop-common build files to generate jdiff by working around a jdiff-bug.
Contributed by Wangda Tan.

(cherry picked from commit 99603e902244f17b04cfd55122f47355d070b588)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/67a4d3cc
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/67a4d3cc
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/67a4d3cc

Branch: refs/heads/branch-3.0.0-alpha1
Commit: 67a4d3cce1e39813cbc7ec3c6535fbc5b6dee96e
Parents: 25f2325
Author: Vinod Kumar Vavilapalli (I am also known as @tshooter.) <vinodkv@apache.org>
Authored: Fri Aug 19 19:08:53 2016 -0700
Committer: Vinod Kumar Vavilapalli (I am also known as @tshooter.) <vinodkv@apache.org>
Committed: Fri Aug 19 19:31:17 2016 -0700

----------------------------------------------------------------------
 .../dev-support/jdiff-workaround.patch          |    98 +
 .../jdiff/Apache_Hadoop_Common_2.7.2.xml        | 46648 +++++++++++++++++
 hadoop-common-project/hadoop-common/pom.xml     |     2 +
 hadoop-project-dist/pom.xml                     |    44 +-
 4 files changed, 46789 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/67a4d3cc/hadoop-common-project/hadoop-common/dev-support/jdiff-workaround.patch
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/dev-support/jdiff-workaround.patch b/hadoop-common-project/hadoop-common/dev-support/jdiff-workaround.patch
new file mode 100644
index 0000000..8f87d40
--- /dev/null
+++ b/hadoop-common-project/hadoop-common/dev-support/jdiff-workaround.patch
@@ -0,0 +1,98 @@
+diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/MetricsSystem.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/MetricsSystem.java
+index a277abd..ed7c709 100644
+--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/MetricsSystem.java
++++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/MetricsSystem.java
+@@ -43,18 +43,6 @@
+   public abstract MetricsSystem init(String prefix);
+
+   /**
+-   * Register a metrics source
+-   * @param <T>   the actual type of the source object
+-   * @param source object to register
+-   * @param name  of the source. Must be unique or null (then extracted from
+-   *              the annotations of the source object.)
+-   * @param desc  the description of the source (or null. See above.)
+-   * @return the source object
+-   * @exception MetricsException
+-   */
+-  public abstract <T> T register(String name, String desc, T source);
+-
+-  /**
+    * Unregister a metrics source
+    * @param name of the source. This is the name you use to call register()
+    */
+@@ -77,18 +65,19 @@
+    */
+   @InterfaceAudience.Private
+   public abstract MetricsSource getSource(String name);
++
+
+   /**
+-   * Register a metrics sink
+-   * @param <T>   the type of the sink
+-   * @param sink  to register
+-   * @param name  of the sink. Must be unique.
+-   * @param desc  the description of the sink
+-   * @return the sink
++   * Register a metrics source
++   * @param <T>   the actual type of the source object
++   * @param source object to register
++   * @param name  of the source. Must be unique or null (then extracted from
++   *              the annotations of the source object.)
++   * @param desc  the description of the source (or null. See above.)
++   * @return the source object
+    * @exception MetricsException
+    */
+-  public abstract <T extends MetricsSink>
+-  T register(String name, String desc, T sink);
++  public abstract <T> T register(String name, String desc, T source);
+
+   /**
+    * Register a callback interface for JMX events
+diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/impl/MetricsSystemImpl.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/impl/MetricsSystemImpl.java
+index 6986edb..eeea81f 100644
+--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/impl/MetricsSystemImpl.java
++++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/impl/MetricsSystemImpl.java
+@@ -270,27 +270,6 @@ void registerSource(String name, String desc, MetricsSource source)
{
+     LOG.debug("Registered source "+ name);
+   }
+
+-  @Override public synchronized <T extends MetricsSink>
+-  T register(final String name, final String description, final T sink) {
+-    LOG.debug(name +", "+ description);
+-    if (allSinks.containsKey(name)) {
+-      LOG.warn("Sink "+ name +" already exists!");
+-      return sink;
+-    }
+-    allSinks.put(name, sink);
+-    if (config != null) {
+-      registerSink(name, description, sink);
+-    }
+-    // We want to re-register the sink to pick up new config
+-    // when the metrics system restarts.
+-    register(name, new AbstractCallback() {
+-      @Override public void postStart() {
+-        register(name, description, sink);
+-      }
+-    });
+-    return sink;
+-  }
+-
+   synchronized void registerSink(String name, String desc, MetricsSink sink) {
+     checkNotNull(config, "config");
+     MetricsConfig conf = sinkConfigs.get(name);
+diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/impl/TestGangliaMetrics.java
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/impl/TestGangliaMetrics.java
+index c19d238..f8412f1 100644
+--- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/impl/TestGangliaMetrics.java
++++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/impl/TestGangliaMetrics.java
+@@ -130,8 +130,8 @@ public void testTagsForPrefix() throws Exception {
+     GangliaMetricsTestHelper.setDatagramSocket(gsink31, mockds31);
+
+     // register the sinks
+-    ms.register("gsink30", "gsink30 desc", gsink30);
+-    ms.register("gsink31", "gsink31 desc", gsink31);
++    //ms.register("gsink30", "gsink30 desc", gsink30);
++    //ms.register("gsink31", "gsink31 desc", gsink31);
+     ms.publishMetricsNow(); // publish the metrics
+
+     ms.stop();


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message