Repository: asterixdb
Updated Branches:
  refs/heads/master 0aeebae06 -> d49bc6eb1


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/d49bc6eb/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/AbstractMultiNCIntegrationTest.java
----------------------------------------------------------------------
diff --git 
a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/AbstractMultiNCIntegrationTest.java
 
b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/AbstractMultiNCIntegrationTest.java
index 890ab0a..4163e46 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/AbstractMultiNCIntegrationTest.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/AbstractMultiNCIntegrationTest.java
@@ -26,6 +26,7 @@ import java.util.List;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.commons.io.FileUtils;
 import org.apache.hyracks.api.client.HyracksConnection;
 import org.apache.hyracks.api.client.IHyracksClientConnection;
@@ -45,7 +46,7 @@ import org.apache.hyracks.control.nc.NodeControllerService;
 import org.apache.hyracks.control.nc.resources.memory.FrameManager;
 import org.apache.hyracks.dataflow.common.comm.io.ResultFrameTupleAccessor;
 import org.apache.hyracks.dataflow.common.comm.util.ByteBufferInputStream;
-import org.json.JSONArray;
+import com.fasterxml.jackson.databind.node.ArrayNode;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Rule;
@@ -123,7 +124,7 @@ public abstract class AbstractMultiNCIntegrationTest {
 
     protected void runTest(JobSpecification spec) throws Exception {
         if (LOGGER.isLoggable(Level.INFO)) {
-            LOGGER.info(spec.toJSON().toString(2));
+            LOGGER.info(spec.toJSON().asText());
         }
         JobId jobId = hcc.startJob(spec, EnumSet.of(JobFlag.PROFILE_RUNTIME));
         if (LOGGER.isLoggable(Level.INFO)) {
@@ -141,7 +142,8 @@ public abstract class AbstractMultiNCIntegrationTest {
             IHyracksDataset hyracksDataset = new HyracksDataset(hcc, 
spec.getFrameSize(), nReaders);
             IHyracksDatasetReader reader = hyracksDataset.createReader(jobId, 
spec.getResultSetIds().get(0));
 
-            JSONArray resultRecords = new JSONArray();
+            ObjectMapper om = new ObjectMapper();
+            ArrayNode resultRecords = om.createArrayNode();
             ByteBufferInputStream bbis = new ByteBufferInputStream();
 
             int readSize = reader.read(resultFrame);
@@ -156,7 +158,7 @@ public abstract class AbstractMultiNCIntegrationTest {
                         bbis.setByteBuffer(resultFrame.getBuffer(), start);
                         byte[] recordBytes = new byte[length];
                         bbis.read(recordBytes, 0, length);
-                        resultRecords.put(new String(recordBytes, 0, length));
+                        resultRecords.add(new String(recordBytes, 0, length));
                     }
                 } finally {
                     try {

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/d49bc6eb/hyracks-fullstack/hyracks/hyracks-server/pom.xml
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-server/pom.xml 
b/hyracks-fullstack/hyracks/hyracks-server/pom.xml
index 70e47fe..3667951 100644
--- a/hyracks-fullstack/hyracks/hyracks-server/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-server/pom.xml
@@ -164,11 +164,6 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.json</groupId>
-      <artifactId>json</artifactId>
-      <version>20090211</version>
-    </dependency>
-    <dependency>
       <groupId>org.apache.httpcomponents</groupId>
       <artifactId>httpcore</artifactId>
       <version>4.4.5</version>
@@ -183,5 +178,9 @@
       <artifactId>hyracks-control-nc</artifactId>
       <version>${project.version}</version>
     </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+    </dependency>
   </dependencies>
 </project>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/d49bc6eb/hyracks-fullstack/hyracks/hyracks-server/src/test/java/org/apache/hyracks/server/test/NCServiceIT.java
----------------------------------------------------------------------
diff --git 
a/hyracks-fullstack/hyracks/hyracks-server/src/test/java/org/apache/hyracks/server/test/NCServiceIT.java
 
b/hyracks-fullstack/hyracks/hyracks-server/src/test/java/org/apache/hyracks/server/test/NCServiceIT.java
index 8d1246b..2185826 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-server/src/test/java/org/apache/hyracks/server/test/NCServiceIT.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-server/src/test/java/org/apache/hyracks/server/test/NCServiceIT.java
@@ -23,6 +23,8 @@ import java.io.IOException;
 import java.net.InetAddress;
 import java.util.logging.Logger;
 
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import junit.framework.Assert;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.http.HttpResponse;
@@ -32,8 +34,8 @@ import org.apache.http.client.methods.HttpGet;
 import org.apache.http.impl.client.HttpClients;
 import org.apache.http.util.EntityUtils;
 import org.apache.hyracks.server.process.HyracksVirtualCluster;
-import org.json.JSONArray;
-import org.json.JSONObject;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -111,15 +113,17 @@ public class NCServiceIT {
     @Test
     public void IsNodelistCorrect() throws Exception {
         // Ping the nodelist HTTP API
+
+        ObjectMapper om = new ObjectMapper();
         String localhost = InetAddress.getLoopbackAddress().getHostAddress();
         String response = getHttp("http://"; + localhost + ":12345/rest/nodes");
-        JSONObject result = new JSONObject(response);
-        JSONArray nodes = result.getJSONArray("result");
-        int numNodes = nodes.length();
+        JsonNode result = om.readTree(response);
+        JsonNode nodes = result.get("result");
+        int numNodes = nodes.size();
         Assert.assertEquals("Wrong number of nodes!", 2, numNodes);
-        for (int i = 0; i < nodes.length(); i++) {
-            JSONObject node = nodes.getJSONObject(i);
-            String id = node.getString("node-id");
+        for (int i = 0; i < nodes.size(); i++) {
+            JsonNode node = nodes.get(i);
+            String id = node.get("node-id").asText();
             if (id.equals("red") || id.equals("blue")) {
                 continue;
             }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/d49bc6eb/hyracks-fullstack/hyracks/hyracks-storage-common/pom.xml
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-common/pom.xml 
b/hyracks-fullstack/hyracks/hyracks-storage-common/pom.xml
index 5aebb22..724df9e 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-common/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-storage-common/pom.xml
@@ -46,10 +46,5 @@
       <artifactId>hyracks-api</artifactId>
       <version>${project.version}</version>
     </dependency>
-    <dependency>
-      <groupId>org.apache.hyracks</groupId>
-      <artifactId>hyracks-api</artifactId>
-      <version>${project.version}</version>
-    </dependency>
   </dependencies>
 </project>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/d49bc6eb/hyracks-fullstack/pom.xml
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/pom.xml b/hyracks-fullstack/pom.xml
index 9cd9841..7390905 100644
--- a/hyracks-fullstack/pom.xml
+++ b/hyracks-fullstack/pom.xml
@@ -108,6 +108,16 @@
         <artifactId>commons-io</artifactId>
         <version>${commons.io.version}</version>
       </dependency>
+      <dependency>
+        <groupId>com.fasterxml.jackson.core</groupId>
+        <artifactId>jackson-databind</artifactId>
+        <version>2.8.4</version>
+      </dependency>
+      <dependency>
+        <groupId>com.fasterxml.jackson.core</groupId>
+        <artifactId>jackson-core</artifactId>
+        <version>2.8.4</version>
+      </dependency>
     </dependencies>
   </dependencyManagement>
 

Reply via email to