FileSystem fs = FileSystem.get(conf);
File f = File.createTempFile("TestSemanticAnalyzer", "explain");
Path tmp = new Path(f.getPath());
fs.create(tmp);
fs.deleteOnExit(tmp);
ExplainWork work = new ExplainWork(tmp, sem.getParseContext(), sem.getRootTasks(),
sem.getFetchTask(), astStringTree, sem, true, false, false, false, false);
ExplainTask task = new ExplainTask();
task.setWork(work);
task.initialize(conf, plan, null);
task.execute(null);