(String name, String[] script)
| 69 | } |
| 70 | |
| 71 | private Map<String, List<PigStats>> runScript(String name, String[] script) throws Exception { |
| 72 | String scriptName = name + "_testScript.py"; |
| 73 | Util.createLocalInputFile(scriptName, script); |
| 74 | ScriptEngine scriptEngine = ScriptEngine.getInstance("jython"); |
| 75 | PigServer pigServer = new PigServer(cluster.getExecType(), cluster.getProperties()); |
| 76 | Map<String, List<PigStats>> statsMap = scriptEngine.run(pigServer.getPigContext(), scriptName); |
| 77 | return statsMap; |
| 78 | } |
| 79 | |
| 80 | private PigStats runSimpleScript(String name, String[] script) throws Exception { |
| 81 | Map<String, List<PigStats>> statsMap = runScript(name, script); |
no test coverage detected