Skip to content

Commit

Permalink
Merged support for HDP2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
rcongiu committed Oct 6, 2015
1 parent e85a7d3 commit 00fb118
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 65 deletions.
59 changes: 0 additions & 59 deletions json-serde-hdp23-shim/pom.xml

This file was deleted.

Expand Up @@ -578,9 +578,16 @@ public void testSerializeWithMapping() throws SerDeException, JSONException {
Object obj = serde.serialize(row, soi); Object obj = serde.serialize(row, soi);


assertTrue(obj instanceof Text); assertTrue(obj instanceof Text);
assertEquals("{\"timestamp\":7898,\"two\":43.2,\"one\":true,\"three\":[],\"four\":\"value1\"}", obj.toString()); String objs = obj.toString();


System.out.println("Output object " + obj.toString()); // this is what we get.. but the order of the elements may vary...
String res = "{\"timestamp\":7898,\"two\":43.2,\"one\":true,\"three\":[],\"four\":\"value1\"}";
String[] r2 = res.substring(1,res.length() - 1).split(",");

// they should be the same...let's hope spacing is the same
assertEquals(objs.length() , res.length() );

for(String s: r2) { assertTrue(objs.contains(s)); }
} }


// {"one":true, "timestamp":1234567, "three":["red","yellow",["blue","azure","cobalt","teal"],"orange"],"two":19.5,"four":"poop"} // {"one":true, "timestamp":1234567, "three":["red","yellow",["blue","azure","cobalt","teal"],"orange"],"two":19.5,"four":"poop"}
Expand Down
5 changes: 2 additions & 3 deletions pom.xml
Expand Up @@ -78,11 +78,11 @@
</activation> </activation>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<serde.shim>json-serde-hdp23-shim</serde.shim> <serde.shim>json-serde-cdh5-shim</serde.shim>
<cdh.version>${hdp23.version}</cdh.version> <cdh.version>${hdp23.version}</cdh.version>
<cdh.hive.version>${hdp23.hive.version}</cdh.hive.version> <cdh.hive.version>${hdp23.hive.version}</cdh.hive.version>
<cdh.hadoop.version>${hdp23.hadoop.version}</cdh.hadoop.version> <cdh.hadoop.version>${hdp23.hadoop.version}</cdh.hadoop.version>
<cdh.shim>hdp23</cdh.shim> <cdh.shim>cdh5</cdh.shim>
</properties> </properties>
</profile> </profile>
</profiles> </profiles>
Expand All @@ -91,7 +91,6 @@
<module>json</module> <module>json</module>
<module>json-serde-cdh4-shim</module> <module>json-serde-cdh4-shim</module>
<module>json-serde-cdh5-shim</module> <module>json-serde-cdh5-shim</module>
<module>json-serde-hdp23-shim</module>
<module>json-serde</module> <module>json-serde</module>
</modules> </modules>


Expand Down

0 comments on commit 00fb118

Please sign in to comment.