Skip to content

Commit

Permalink
HIVE-15144: JSON.org license is now CatX (Owen O'Malley, reviewed by …
Browse files Browse the repository at this point in the history
…Alan Gates)
  • Loading branch information
pengchengxiong committed Jul 10, 2017
1 parent 45a1ec8 commit 7580de9
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 48 deletions.
22 changes: 0 additions & 22 deletions binary-package-licenses/org.json-LICENSE

This file was deleted.

3 changes: 1 addition & 2 deletions common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,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>
Expand Down
2 changes: 1 addition & 1 deletion jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,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>
Expand Down
7 changes: 5 additions & 2 deletions llap-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -231,6 +230,10 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId>
</dependency>

<!-- test inter-project -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
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;
Expand Down Expand Up @@ -79,8 +81,6 @@
import org.eclipse.jetty.rewrite.handler.Rule;
import org.eclipse.jetty.util.ssl.SslContextFactory;
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;
Expand Down Expand Up @@ -642,7 +642,7 @@ private void writeConfigJson(Path tmpDir, final FileSystem lfs,
}

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();

Expand Down
16 changes: 14 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@
<javax-servlet.version>3.1.0</javax-servlet.version>
<javolution.version>5.5.1</javolution.version>
<jdo-api.version>3.0.1</jdo-api.version>
<jettison.version>1.1</jettison.version>
<jetty.version>9.3.8.v20160314</jetty.version>
<jersey.version>1.14</jersey.version>
<!-- Glassfish jersey is included for Spark client test only -->
Expand All @@ -170,7 +171,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>
Expand Down Expand Up @@ -609,6 +610,17 @@
<artifactId>jackson-xc</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<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>
Expand Down Expand Up @@ -655,7 +667,7 @@
<version>${datanucleus-jdo.version}</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<groupId>com.tdunning</groupId>
<artifactId>json</artifactId>
<version>${json.version}</version>
</dependency>
Expand Down
5 changes: 2 additions & 3 deletions ql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -446,9 +446,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>
Expand Down Expand Up @@ -883,7 +882,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>
Expand Down
27 changes: 14 additions & 13 deletions ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,27 +139,27 @@ static JSONObject getJSONDependencies(ExplainWork work)
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;
Expand Down Expand Up @@ -238,10 +238,11 @@ ImmutablePair<Boolean, JSONObject> outputPlanVectorization(PrintStream out, bool
}
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);
}
}

Expand Down Expand Up @@ -278,7 +279,7 @@ public JSONObject getJSONPlan(PrintStream out, List<Task<?>> tasks, Task<?> fetc
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;
Expand All @@ -287,7 +288,7 @@ public JSONObject getJSONPlan(PrintStream out, List<Task<?>> tasks, Task<?> fetc
if (out != null) {
out.println();
}

if (jsonOutput) {
outJSONObject.put("PLAN VECTORIZATION", planVecPair.right);
}
Expand Down Expand Up @@ -405,7 +406,7 @@ public int execute(DriverContext driverContext) {
if (jsonParser != null) {
jsonParser.print(jsonPlan, null);
LOG.info("JsonPlan is augmented to " + jsonPlan.toString());
}
}
out.print(jsonPlan);
}
}
Expand Down Expand Up @@ -617,9 +618,9 @@ else if (ent.getValue() != null) {

/**
* 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
*/
Expand Down

0 comments on commit 7580de9

Please sign in to comment.