azkaban-plugins
azkaban-plugins copied to clipboard
Use Reportal plugin to run Hive SQL error
At the ReportalAbstractRunner class, `if (requiresOutput()) { // Get output stream to data String locationTemp = ("./reportal/" + jobTitle + ".csv").replace("//", "/"); File tempOutput = new File(locationTemp); tempOutput.getParentFile().mkdirs(); tempOutput.createNewFile(); outputStream = new BoundedOutputStream(new BufferedOutputStream( new FileOutputStream(tempOutput)), outputCapacity);
// Run the reportal
runReportal();
// Cleanup the reportal
try {
outputStream.close();
} catch (IOException e) {
// We can safely ignore this exception since we're just making sure the
// stream is closed.
}
} else {
runReportal();
}
}`
I got exception:
23-08-2016 14:28:11 CST counttest INFO - Exception in thread "main" java.lang.reflect.InvocationTargetException 23-08-2016 14:28:11 CST counttest INFO - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 23-08-2016 14:28:11 CST counttest INFO - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 23-08-2016 14:28:11 CST counttest INFO - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 23-08-2016 14:28:11 CST counttest INFO - at java.lang.reflect.Method.invoke(Method.java:606) 23-08-2016 14:28:11 CST counttest INFO - at azkaban.jobtype.HadoopJavaJobRunnerMain.runMethod(HadoopJavaJobRunnerMain.java:214) 23-08-2016 14:28:11 CST counttest INFO - at azkaban.jobtype.HadoopJavaJobRunnerMain.(HadoopJavaJobRunnerMain.java:167) 23-08-2016 14:28:11 CST counttest INFO - at azkaban.jobtype.HadoopJavaJobRunnerMain.main(HadoopJavaJobRunnerMain.java:76) 23-08-2016 14:28:11 CST counttest INFO - Caused by: java.io.IOException: No such file or directory 23-08-2016 14:28:11 CST counttest INFO - at java.io.UnixFileSystem.createFileExclusively(Native Method) 23-08-2016 14:28:11 CST counttest INFO - at java.io.File.createNewFile(File.java:1006) 23-08-2016 14:28:11 CST counttest INFO - at azkaban.jobtype.ReportalAbstractRunner.run(ReportalAbstractRunner.java:141) 23-08-2016 14:28:11 CST counttest INFO - ... 7 more