Created
September 22, 2016 06:52
-
-
Save anonymous/8df8e05ffc16e620bbc030e1034da3c4 to your computer and use it in GitHub Desktop.
@test public void dagToStringConvert() { LogicalPlan dag = new LogicalPlan(); Application app = new Application(); Configuration conf = new Configuration(false); conf.addResource("dt-site-pi.xml"); app.populateDAG(dag, conf); LogicalPlanSerializer serializer = new LogicalPlanSerializer(); JSONObject json = serializer.convertToJsonObject(dag); S…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void dagToStringConvert() | |
{ | |
LogicalPlan dag = new LogicalPlan(); | |
Application app = new Application(); | |
Configuration conf = new Configuration(false); | |
conf.addResource("dt-site-pi.xml"); | |
app.populateDAG(dag, conf); | |
LogicalPlanSerializer serializer = new LogicalPlanSerializer(); | |
JSONObject json = serializer.convertToJsonObject(dag); | |
StringWriter sw = new StringWriter(); | |
PrintWriter writer = new PrintWriter(sw); | |
writer.write(json.toString()); | |
writer.flush(); | |
System.out.println(sw.getBuffer()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment