> On Oct. 7, 2014, 6:18 p.m., Tom Beerbower wrote: > > ambari-server/src/main/java/org/apache/ambari/server/api/services/serializers/JsonSerializer.java, > > line 147 > > <https://reviews.apache.org/r/26413/diff/1/?file=714609#file714609line147> > > > > Could this just be reduced to ... > > > > node.getChildren().size() > 1 > > > > ?
Tom, this is necessary, because if we have one child it means that child will be deserialized as object or property. If we have more than two children it should be deserialized as Array. - Dmytro ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/26413/#review55673 ----------------------------------------------------------- On Oct. 7, 2014, 5:59 p.m., Dmitro Lisnichenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/26413/ > ----------------------------------------------------------- > > (Updated Oct. 7, 2014, 5:59 p.m.) > > > Review request for Ambari, Dmytro Sen and Tom Beerbower. > > > Bugs: AMBARI-7676 > https://issues.apache.org/jira/browse/AMBARI-7676 > > > Repository: ambari > > > Description > ------- > > Content of files that is presented at > /api/v1/stacks/HDP/versions/2.2/services/HDFS/configurations/content# > generates invalid json. Commas are missing between sections. > Result of validation: > Error: Parse error on line 14: > ...fs-log4j.xml" }} { "href" : "http:/ > ---------------------^ > Expecting 'EOF', '}', ',', ']' > I've attached JSON I've got > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/api/services/serializers/JsonSerializer.java > 59d5a8a > > ambari-server/src/test/java/org/apache/ambari/server/api/services/serializers/JsonSerializerTest.java > 90063a0 > > Diff: https://reviews.apache.org/r/26413/diff/ > > > Testing > ------- > > [INFO] > ------------------------------------------------------------------------ > [INFO] Reactor Summary: > [INFO] > [INFO] Ambari Main ....................................... SUCCESS [3.560s] > [INFO] Apache Ambari Project POM ......................... SUCCESS [0.257s] > [INFO] Ambari Web ........................................ SUCCESS [33.899s] > [INFO] Ambari Views ...................................... SUCCESS [1.492s] > [INFO] Ambari Admin View ................................. SUCCESS [8.862s] > [INFO] Ambari Server ..................................... FAILURE > [21:30.575s] > [INFO] Ambari Agent ...................................... SKIPPED > [INFO] Ambari Client ..................................... SKIPPED > [INFO] Ambari Python Client .............................. SKIPPED > [INFO] Ambari Groovy Client .............................. SKIPPED > [INFO] Ambari Shell ...................................... SKIPPED > [INFO] Ambari Python Shell ............................... SKIPPED > [INFO] Ambari Groovy Shell ............................... SKIPPED > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD FAILURE > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 22:19.290s > [INFO] Finished at: Tue Oct 07 19:55:33 FET 2014 > [INFO] Final Memory: 33M/396M > [INFO] > ------------------------------------------------------------------------ > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) > > Tests are failing on trunk. Will retest later. > > > Thanks, > > Dmitro Lisnichenko > >
