This is an automated email from the ASF dual-hosted git repository.

gates pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/branch-2 by this push:
     new 50679d1  HIVE-15144: JSON.org license is now CatX (Owen O'Malley, 
reviewed by Alan Gates)
50679d1 is described below

commit 50679d18ad59acebed2fc900ef387817573cf178
Author: Pengcheng Xiong <[email protected]>
AuthorDate: Mon Jul 10 15:54:23 2017 -0700

    HIVE-15144: JSON.org license is now CatX (Owen O'Malley, reviewed by Alan 
Gates)
---
 binary-package-licenses/org.json-LICENSE           | 22 -------------------
 common/pom.xml                                     |  3 +--
 jdbc/pom.xml                                       |  2 +-
 llap-server/pom.xml                                |  7 ++++--
 .../hadoop/hive/llap/cli/LlapServiceDriver.java    |  6 +++---
 pom.xml                                            | 20 +++++++++++++----
 ql/pom.xml                                         |  5 ++---
 .../apache/hadoop/hive/ql/exec/ExplainTask.java    | 25 +++++++++++-----------
 8 files changed, 41 insertions(+), 49 deletions(-)

diff --git a/binary-package-licenses/org.json-LICENSE 
b/binary-package-licenses/org.json-LICENSE
deleted file mode 100644
index a8c1705..0000000
--- a/binary-package-licenses/org.json-LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright (c) 2002 JSON.org
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-The Software shall be used for Good, not Evil.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/common/pom.xml b/common/pom.xml
index cee3cc1..55b1cd4 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -184,9 +184,8 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.json</groupId>
+      <groupId>com.tdunning</groupId>
       <artifactId>json</artifactId>
-      <version>${json.version}</version>
     </dependency>
     <dependency>
       <groupId>io.dropwizard.metrics</groupId>
diff --git a/jdbc/pom.xml b/jdbc/pom.xml
index de28a1d..ccafff2 100644
--- a/jdbc/pom.xml
+++ b/jdbc/pom.xml
@@ -251,7 +251,7 @@
                   <exclude>org.htrace:*</exclude>
                   <exclude>org.mortbay.jetty:*</exclude>
                   <exclude>org.xerial.snappy:*</exclude>
-                  <exclude>org.json:*</exclude>
+                  <exclude>com.tdunning:*</exclude>
                   <exclude>tomcat:*</exclude>
                   <exclude>xmlenc:*</exclude>
                   <exclude>xerces:*</exclude>
diff --git a/llap-server/pom.xml b/llap-server/pom.xml
index 266fc0d..4c9a4f0 100644
--- a/llap-server/pom.xml
+++ b/llap-server/pom.xml
@@ -96,9 +96,8 @@
       <version>${libthrift.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.json</groupId>
+      <groupId>com.tdunning</groupId>
       <artifactId>json</artifactId>
-      <version>${json.version}</version>
     </dependency>
     <dependency>
       <groupId>org.apache.hadoop</groupId>
@@ -227,6 +226,10 @@
         </exclusion>
       </exclusions>
     </dependency>
+    <dependency>
+      <groupId>org.codehaus.jettison</groupId>
+      <artifactId>jettison</artifactId>
+    </dependency>
 
     <!-- test inter-project -->
     <dependency>
diff --git 
a/llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapServiceDriver.java 
b/llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapServiceDriver.java
index 03ca62c..7b9f0aa 100644
--- 
a/llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapServiceDriver.java
+++ 
b/llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapServiceDriver.java
@@ -52,6 +52,8 @@ import 
org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos;
 import org.apache.hadoop.hive.llap.tezplugins.LlapTezUtils;
 import org.apache.hadoop.registry.client.binding.RegistryUtils;
 import org.apache.tez.dag.api.TezConfiguration;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.hadoop.conf.Configuration;
@@ -78,8 +80,6 @@ import org.apache.hadoop.mapreduce.Job;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.eclipse.jetty.server.ssl.SslSocketConnector;
 import org.joda.time.DateTime;
-import org.json.JSONException;
-import org.json.JSONObject;
 
 import com.google.common.base.Preconditions;
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
@@ -638,7 +638,7 @@ public class LlapServiceDriver {
   }
 
   private JSONObject createConfigJson(long containerSize, long cache, long xmx,
-      String java_home) throws JSONException {
+                                      String java_home) throws JSONException {
     // extract configs for processing by the python fragments in Slider
     JSONObject configs = new JSONObject();
 
diff --git a/pom.xml b/pom.xml
index e9f7b42..88fa618 100644
--- a/pom.xml
+++ b/pom.xml
@@ -161,6 +161,7 @@
     <javolution.version>5.5.1</javolution.version>
     <jdo-api.version>3.0.1</jdo-api.version>
     <jetty.version>7.6.0.v20120127</jetty.version>
+    <jettison.version>1.1</jettison.version>
     <jersey.version>1.14</jersey.version>
     <!-- Glassfish jersey is included for Spark client test only -->
     <glassfish.jersey.version>2.22.2</glassfish.jersey.version>
@@ -168,7 +169,7 @@
     <jms.version>1.1</jms.version>
     <joda.version>2.8.1</joda.version>
     <jodd.version>3.5.2</jodd.version>
-    <json.version>20090211</json.version>
+    <json.version>1.8</json.version>
     <junit.version>4.11</junit.version>
     <kryo.version>3.0.3</kryo.version>
     <libfb303.version>0.9.3</libfb303.version>
@@ -608,8 +609,19 @@
         <version>${jackson.version}</version>
       </dependency>
       <dependency>
-        <groupId>org.eclipse.jetty.aggregate</groupId>
-        <artifactId>jetty-all-server</artifactId>
+        <groupId>org.codehaus.jettison</groupId>
+        <artifactId>jettison</artifactId>
+        <version>${jettison.version}</version>
+        <exclusions>
+          <exclusion>
+            <groupId>stax</groupId>
+            <artifactId>stax-api</artifactId>
+          </exclusion>
+        </exclusions>
+      </dependency>
+      <dependency>
+        <groupId>org.eclipse.jetty</groupId>
+        <artifactId>jetty-rewrite</artifactId>
         <version>${jetty.version}</version>
       </dependency>
       <dependency>
@@ -633,7 +645,7 @@
         <version>${datanucleus-jdo.version}</version>
       </dependency>
       <dependency>
-        <groupId>org.json</groupId>
+        <groupId>com.tdunning</groupId>
         <artifactId>json</artifactId>
         <version>${json.version}</version>
       </dependency>
diff --git a/ql/pom.xml b/ql/pom.xml
index 8c86826..00ac4c2 100644
--- a/ql/pom.xml
+++ b/ql/pom.xml
@@ -428,9 +428,8 @@
       <version>${gson.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.json</groupId>
+      <groupId>com.tdunning</groupId>
       <artifactId>json</artifactId>
-      <version>${json.version}</version>
     </dependency>
     <dependency>
       <groupId>stax</groupId>
@@ -860,7 +859,7 @@
                   <include>commons-lang:commons-lang</include>
                   <include>org.apache.commons:commons-lang3</include>
                   <include>org.jodd:jodd-core</include>
-                  <include>org.json:json</include>
+                  <include>com.tdunning:json</include>
                   <include>org.apache.avro:avro</include>
                   <include>org.apache.avro:avro-mapred</include>
                   <include>org.apache.hive.shims:hive-shims-0.23</include>
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java 
b/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java
index 4c24ab4..5f0ace2 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java
@@ -140,27 +140,27 @@ public class ExplainTask extends Task<ExplainWork> 
implements Serializable {
     assert(work.getDependency());
 
     JSONObject outJSONObject = new JSONObject(new LinkedHashMap<>());
-    List<Map<String, String>> inputTableInfo = new ArrayList<Map<String, 
String>>();
-    List<Map<String, String>> inputPartitionInfo = new ArrayList<Map<String, 
String>>();
+    JSONArray inputTableInfo = new JSONArray();
+    JSONArray inputPartitionInfo = new JSONArray();
     for (ReadEntity input: work.getInputs()) {
       switch (input.getType()) {
         case TABLE:
           Table table = input.getTable();
-          Map<String, String> tableInfo = new LinkedHashMap<String, String>();
+          JSONObject tableInfo = new JSONObject();
           tableInfo.put("tablename", table.getCompleteName());
           tableInfo.put("tabletype", table.getTableType().toString());
           if ((input.getParents() != null) && (!input.getParents().isEmpty())) 
{
             tableInfo.put("tableParents", input.getParents().toString());
           }
-          inputTableInfo.add(tableInfo);
+          inputTableInfo.put(tableInfo);
           break;
         case PARTITION:
-          Map<String, String> partitionInfo = new HashMap<String, String>();
+          JSONObject partitionInfo = new JSONObject();
           partitionInfo.put("partitionName", 
input.getPartition().getCompleteName());
           if ((input.getParents() != null) && (!input.getParents().isEmpty())) 
{
             partitionInfo.put("partitionParents", 
input.getParents().toString());
           }
-          inputPartitionInfo.add(partitionInfo);
+          inputPartitionInfo.put(partitionInfo);
           break;
         default:
           break;
@@ -238,10 +238,11 @@ public class ExplainTask extends Task<ExplainWork> 
implements Serializable {
     }
     if (jsonOutput) {
       json.put("enabled", isVectorizationEnabled);
+      JSONArray jsonArray = new 
JSONArray(Arrays.asList(isVectorizationEnabledCondName));
       if (!isVectorizationEnabled) {
-        json.put("enabledConditionsNotMet", isVectorizationEnabledCondList);
+        json.put("enabledConditionsNotMet", jsonArray);
       } else {
-        json.put("enabledConditionsMet", isVectorizationEnabledCondList);
+        json.put("enabledConditionsMet", jsonArray);
       }
     }
 
@@ -278,7 +279,7 @@ public class ExplainTask extends Task<ExplainWork> 
implements Serializable {
     boolean suppressOthersForVectorization = false;
     if (this.work != null && this.work.isVectorization()) {
       ImmutablePair<Boolean, JSONObject> planVecPair = 
outputPlanVectorization(out, jsonOutput);
-  
+
       if (this.work.isVectorizationOnly()) {
         // Suppress the STAGES if vectorization is off.
         suppressOthersForVectorization = !planVecPair.left;
@@ -287,7 +288,7 @@ public class ExplainTask extends Task<ExplainWork> 
implements Serializable {
       if (out != null) {
         out.println();
       }
-  
+
       if (jsonOutput) {
         outJSONObject.put("PLAN VECTORIZATION", planVecPair.right);
       }
@@ -609,9 +610,9 @@ public class ExplainTask extends Task<ExplainWork> 
implements Serializable {
 
   /**
    * Retruns a map which have either primitive or string keys.
-   * 
+   *
    * This is neccessary to discard object level comparators which may sort the 
objects based on some non-trivial logic.
-   * 
+   *
    * @param mp
    * @return
    */

Reply via email to