hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From md...@apache.org
Subject [1/2] hbase git commit: HBASE-16338 Remove Jackson1 deps
Date Fri, 20 Oct 2017 14:20:38 GMT
Repository: hbase
Updated Branches:
  refs/heads/master a43a00e89 -> 5facaded9


http://git-wip-us.apache.org/repos/asf/hbase/blob/5facaded/hbase-server/src/main/resources/hbase-webapps/regionserver/processRS.jsp
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/resources/hbase-webapps/regionserver/processRS.jsp b/hbase-server/src/main/resources/hbase-webapps/regionserver/processRS.jsp
index cc18d5b..f0df0c0 100644
--- a/hbase-server/src/main/resources/hbase-webapps/regionserver/processRS.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/regionserver/processRS.jsp
@@ -29,7 +29,7 @@
   import="java.lang.management.GarbageCollectorMXBean"
   import="org.apache.hadoop.hbase.util.JSONMetricUtil"
   import="org.apache.hadoop.hbase.procedure2.util.StringUtils"
-  import="org.codehaus.jackson.JsonNode"
+  import="com.fasterxml.jackson.databind.JsonNode"
 %>
 <%
 RuntimeMXBean runtimeBean = ManagementFactory.getRuntimeMXBean();

http://git-wip-us.apache.org/repos/asf/hbase/blob/5facaded/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestBlockCacheReporting.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestBlockCacheReporting.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestBlockCacheReporting.java
index ee5a364..dab8673 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestBlockCacheReporting.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestBlockCacheReporting.java
@@ -23,6 +23,8 @@ import java.io.IOException;
 import java.util.Map;
 import java.util.NavigableSet;
 
+import com.fasterxml.jackson.core.JsonGenerationException;
+import com.fasterxml.jackson.databind.JsonMappingException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
@@ -32,8 +34,6 @@ import org.apache.hadoop.hbase.testclassification.IOTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
 import org.apache.hadoop.hbase.io.hfile.TestCacheConfig.DataCacheEntry;
 import org.apache.hadoop.hbase.io.hfile.TestCacheConfig.IndexCacheEntry;
-import org.codehaus.jackson.JsonGenerationException;
-import org.codehaus.jackson.map.JsonMappingException;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/hbase/blob/5facaded/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestJSONMetricUtil.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestJSONMetricUtil.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestJSONMetricUtil.java
index 30da26a..1135039 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestJSONMetricUtil.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestJSONMetricUtil.java
@@ -22,6 +22,7 @@ import java.lang.management.GarbageCollectorMXBean;
 import java.lang.management.ManagementFactory;
 import java.util.Hashtable;
 import java.util.List;
+import java.util.Map;
 
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
@@ -29,13 +30,14 @@ import javax.management.openmbean.CompositeData;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.testclassification.MiscTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.JsonProcessingException;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -51,17 +53,14 @@ public class TestJSONMetricUtil {
     String[] values = {"MemoryPool", "Par Eden Space"};
     String[] values2 = {"MemoryPool", "Par Eden Space", "Test"};
     String[] emptyValue = {};
-    Hashtable<String, String> properties = JSONMetricUtil.buldKeyValueTable(keys, values);
-    Hashtable<String, String> nullObject = JSONMetricUtil.buldKeyValueTable(keys, values2);
-    Hashtable<String, String> nullObject1 = JSONMetricUtil.buldKeyValueTable(keys,
emptyValue);
-    Hashtable<String, String> nullObject2 = JSONMetricUtil.buldKeyValueTable(emptyKey,
values2);
-    Hashtable<String, String> nullObject3 = JSONMetricUtil.buldKeyValueTable(emptyKey,
emptyValue);
-    assertEquals(properties.get("type"), values[0]);
-    assertEquals(properties.get("name"), values[1]);
-    assertEquals(nullObject, null);
-    assertEquals(nullObject1, null);
-    assertEquals(nullObject2, null);
-    assertEquals(nullObject3, null);
+    Map<String, String> properties = JSONMetricUtil.buldKeyValueTable(keys, values);
+    assertEquals(values[0], properties.get("type"));
+    assertEquals(values[1], properties.get("name"));
+
+    assertNull(JSONMetricUtil.buldKeyValueTable(keys, values2));
+    assertNull(JSONMetricUtil.buldKeyValueTable(keys, emptyValue));
+    assertNull(JSONMetricUtil.buldKeyValueTable(emptyKey, values2));
+    assertNull(JSONMetricUtil.buldKeyValueTable(emptyKey, emptyValue));
   }
 
   @Test
@@ -73,10 +72,10 @@ public class TestJSONMetricUtil {
     JsonNode r2 = JSONMetricUtil.searchJson(node, "data2");
     JsonNode r3 = JSONMetricUtil.searchJson(node, "data3");
     JsonNode r4 = JSONMetricUtil.searchJson(node, "data4");
-    assertEquals(r1.getIntValue(), 100);
-    assertEquals(r2.getTextValue(), "hello");
-    assertEquals(r3.get(0).getIntValue(), 1);
-    assertEquals(r4.getIntValue(), 0);
+    assertEquals(100, r1.intValue());
+    assertEquals("hello", r2.textValue());
+    assertEquals(1, r3.get(0).intValue());
+    assertEquals(0, r4.intValue());
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/hbase/blob/5facaded/hbase-shaded/hbase-shaded-mapreduce/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-shaded/hbase-shaded-mapreduce/pom.xml b/hbase-shaded/hbase-shaded-mapreduce/pom.xml
index 2afa3c2..1f2a2bf 100644
--- a/hbase-shaded/hbase-shaded-mapreduce/pom.xml
+++ b/hbase-shaded/hbase-shaded-mapreduce/pom.xml
@@ -145,10 +145,6 @@
                 <groupId>org.glassfish.jersey.containers</groupId>
                 <artifactId>jersey-container-servlet-core</artifactId>
               </exclusion>
-              <exclusion>
-                <groupId>org.glassfish.jersey.media</groupId>
-                <artifactId>jersey-media-json-jackson1</artifactId>
-              </exclusion>
             </exclusions>
         </dependency>
     </dependencies>

http://git-wip-us.apache.org/repos/asf/hbase/blob/5facaded/hbase-shaded/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-shaded/pom.xml b/hbase-shaded/pom.xml
index 4104946..7f92901 100644
--- a/hbase-shaded/pom.xml
+++ b/hbase-shaded/pom.xml
@@ -176,6 +176,10 @@
                                         <pattern>com.dropwizard</pattern>
                                         <shadedPattern>org.apache.hadoop.hbase.shaded.com.dropwizard</shadedPattern>
                                     </relocation>
+                                    <relocation>
+                                        <pattern>com.fasterxml</pattern>
+                                        <shadedPattern>org.apache.hadoop.hbase.shaded.com.fasterxml</shadedPattern>
+                                    </relocation>
 
                                     <!-- top level io -->
                                     <relocation>

http://git-wip-us.apache.org/repos/asf/hbase/blob/5facaded/hbase-shell/src/main/ruby/hbase/taskmonitor.rb
----------------------------------------------------------------------
diff --git a/hbase-shell/src/main/ruby/hbase/taskmonitor.rb b/hbase-shell/src/main/ruby/hbase/taskmonitor.rb
index 849752b..1580486 100644
--- a/hbase-shell/src/main/ruby/hbase/taskmonitor.rb
+++ b/hbase-shell/src/main/ruby/hbase/taskmonitor.rb
@@ -74,7 +74,7 @@ module Hbase
     # Returns a filtered list of tasks on the given host
     def tasksOnHost(filter, host)
       java_import 'java.net.URL'
-      java_import 'org.codehaus.jackson.map.ObjectMapper'
+      java_import 'com.fasterxml.jackson.databind.ObjectMapper'
 
       infoport = @admin.getClusterStatus.getLoad(host).getInfoServerPort.to_s
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/5facaded/hbase-spark/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-spark/pom.xml b/hbase-spark/pom.xml
index 320104b..ba54e99 100644
--- a/hbase-spark/pom.xml
+++ b/hbase-spark/pom.xml
@@ -124,6 +124,21 @@
       <scope>test</scope>
     </dependency>
     <dependency>
+      <groupId>com.fasterxml.jackson.module</groupId>
+      <artifactId>jackson-module-scala_${scala.binary.version}</artifactId>
+      <version>${jackson.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.scala-lang</groupId>
+          <artifactId>scala-library</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.scala-lang</groupId>
+          <artifactId>scala-reflect</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
       <groupId>org.apache.hadoop</groupId>
       <artifactId>hadoop-client</artifactId>
       <version>${hadoop-two.version}</version>
@@ -336,6 +351,11 @@
     </dependency>
     <dependency>
       <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-protocol-shaded</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
       <artifactId>hbase-annotations</artifactId>
       <version>${project.version}</version>
     </dependency>

http://git-wip-us.apache.org/repos/asf/hbase/blob/5facaded/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index cb8b11f..8e1d7c7 100755
--- a/pom.xml
+++ b/pom.xml
@@ -1399,11 +1399,10 @@
     <httpclient.version>4.5.3</httpclient.version>
     <httpcore.version>4.4.6</httpcore.version>
     <metrics-core.version>3.2.1</metrics-core.version>
-    <jackson.version>2.23.2</jackson.version>
+    <jackson.version>2.9.1</jackson.version>
     <jaxb-api.version>2.2.12</jaxb-api.version>
     <jetty.version>9.4.6.v20170531</jetty.version>
     <jetty-jsp.version>9.2.19.v20160908</jetty-jsp.version>
-    <jackson1.version>1.9.13</jackson1.version>
     <servlet.api.version>3.1.0</servlet.api.version>
     <wx.rs.api.version>2.0.1</wx.rs.api.version>
     <jersey.version>2.25.1</jersey.version>
@@ -1871,28 +1870,15 @@
         <artifactId>joni</artifactId>
         <version>${joni.version}</version>
       </dependency>
-      <!-- While jackson is also a dependency of jersey it
-           can bring in jars from different, incompatible versions. We force
-           the same version with these dependencies -->
       <dependency>
-        <groupId>org.codehaus.jackson</groupId>
-        <artifactId>jackson-core-asl</artifactId>
-        <version>${jackson1.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.codehaus.jackson</groupId>
-        <artifactId>jackson-mapper-asl</artifactId>
-        <version>${jackson1.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.codehaus.jackson</groupId>
-        <artifactId>jackson-jaxrs</artifactId>
-        <version>${jackson1.version}</version>
+        <groupId>com.fasterxml.jackson.jaxrs</groupId>
+        <artifactId>jackson-jaxrs-json-provider</artifactId>
+        <version>${jackson.version}</version>
       </dependency>
       <dependency>
-        <groupId>org.codehaus.jackson</groupId>
-        <artifactId>jackson-xc</artifactId>
-        <version>${jackson1.version}</version>
+        <groupId>com.fasterxml.jackson.core</groupId>
+        <artifactId>jackson-databind</artifactId>
+        <version>${jackson.version}</version>
       </dependency>
       <dependency>
         <groupId>org.jamon</groupId>
@@ -1982,11 +1968,6 @@
         <version>${jersey.version}</version>
       </dependency>
       <dependency>
-        <groupId>org.glassfish.jersey.media</groupId>
-        <artifactId>jersey-media-json-jackson1</artifactId>
-        <version>${jackson.version}</version>
-      </dependency>
-      <dependency>
         <!--This lib has JspC in it. Needed precompiling jsps in hbase-rest, etc.-->
         <groupId>org.glassfish.web</groupId>
         <artifactId>javax.servlet.jsp</artifactId>
@@ -2409,6 +2390,14 @@
                 <groupId>javax.inject</groupId>
                 <artifactId>javax.inject</artifactId>
               </exclusion>
+              <exclusion>
+                <groupId>org.codehaus.jackson</groupId>
+                <artifactId>jackson-core-asl</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>org.codehaus.jackson</groupId>
+                <artifactId>jackson-mapper-asl</artifactId>
+              </exclusion>
             </exclusions>
           </dependency>
           <dependency>
@@ -2467,6 +2456,14 @@
                 <groupId>xerces</groupId>
                 <artifactId>xercesImpl</artifactId>
               </exclusion>
+              <exclusion>
+                <groupId>org.codehaus.jackson</groupId>
+                <artifactId>jackson-core-asl</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>org.codehaus.jackson</groupId>
+                <artifactId>jackson-mapper-asl</artifactId>
+              </exclusion>
             </exclusions>
             <version>${hadoop-two.version}</version>
           </dependency>
@@ -2497,6 +2494,14 @@
                 <groupId>xerces</groupId>
                 <artifactId>xercesImpl</artifactId>
               </exclusion>
+              <exclusion>
+                <groupId>org.codehaus.jackson</groupId>
+                <artifactId>jackson-core-asl</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>org.codehaus.jackson</groupId>
+                <artifactId>jackson-mapper-asl</artifactId>
+              </exclusion>
             </exclusions>
           </dependency>
           <dependency>
@@ -2537,6 +2542,14 @@
                 <groupId>junit</groupId>
                 <artifactId>junit</artifactId>
               </exclusion>
+             <exclusion>
+               <groupId>org.codehaus.jackson</groupId>
+               <artifactId>jackson-core-asl</artifactId>
+             </exclusion>
+             <exclusion>
+               <groupId>org.codehaus.jackson</groupId>
+               <artifactId>jackson-mapper-asl</artifactId>
+             </exclusion>
             </exclusions>
           </dependency>
           <dependency>
@@ -2623,6 +2636,14 @@
                 <groupId>javax.inject</groupId>
                 <artifactId>javax.inject</artifactId>
               </exclusion>
+              <exclusion>
+                <groupId>org.codehaus.jackson</groupId>
+                <artifactId>jackson-core-asl</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>org.codehaus.jackson</groupId>
+                <artifactId>jackson-mapper-asl</artifactId>
+              </exclusion>
            </exclusions>
          </dependency>
          <dependency>
@@ -2669,6 +2690,14 @@
                <groupId>xerces</groupId>
                <artifactId>xercesImpl</artifactId>
              </exclusion>
+             <exclusion>
+               <groupId>org.codehaus.jackson</groupId>
+               <artifactId>jackson-core-asl</artifactId>
+             </exclusion>
+             <exclusion>
+               <groupId>org.codehaus.jackson</groupId>
+               <artifactId>jackson-mapper-asl</artifactId>
+             </exclusion>
            </exclusions>
            <version>${hadoop-three.version}</version>
          </dependency>
@@ -2695,6 +2724,14 @@
                <groupId>xerces</groupId>
                <artifactId>xercesImpl</artifactId>
              </exclusion>
+             <exclusion>
+               <groupId>org.codehaus.jackson</groupId>
+               <artifactId>jackson-core-asl</artifactId>
+             </exclusion>
+             <exclusion>
+               <groupId>org.codehaus.jackson</groupId>
+               <artifactId>jackson-mapper-asl</artifactId>
+             </exclusion>
            </exclusions>
          </dependency>
          <dependency>
@@ -2741,6 +2778,14 @@
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
              </exclusion>
+             <exclusion>
+               <groupId>org.codehause.jackson</groupId>
+               <artifactId>jackson-core-asl</artifactId>
+             </exclusion>
+             <exclusion>
+               <groupId>org.codehause.jackson</groupId>
+               <artifactId>jackson-mapper-asl</artifactId>
+             </exclusion>
            </exclusions>
          </dependency>
          <dependency>


Mime
View raw message