Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
In HadoopFileFormatter, If rowWriter intialization fails because of,say, HDFS permission issue. The close() method (called in finally block in ResultFormatter class) throws an NPE.
Code snippet -
public void setupOutputs() throws IOException {
String pathStr = ctx.getResultSetParentDir();
if (StringUtils.isBlank(pathStr))
String outputPathStr = Strings.isNullOrEmpty(ctx.getQueryName()) ? ""
: LensFileOutputFormat.getValidOutputFileName(ctx.getQueryName()) + "-";
outputPath = new Path(pathStr, outputPathStr + ctx.getQueryHandle().toString());
Path tmpWorkPath = new Path(pathStr, ctx.getQueryHandle().toString() + ".tmp");
try
catch (IOException e)
{ throw new IllegalArgumentException("Could not create tmp path"); }}
@Override
public void close() throws IOException