You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by ja...@apache.org on 2013/12/02 05:23:56 UTC
[09/10] git commit: DRILL-297: Trace operator throws NPE if the
configured path is not writable
DRILL-297: Trace operator throws NPE if the configured path is not writable
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/366bf8e4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/366bf8e4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/366bf8e4
Branch: refs/heads/master
Commit: 366bf8e4564333dd26b1f5672d4dd0fea28afacc
Parents: 316ce8a
Author: Mehant Baid <me...@github.com>
Authored: Sun Dec 1 20:09:04 2013 -0800
Committer: Jacques Nadeau <ja...@apache.org>
Committed: Sun Dec 1 20:09:04 2013 -0800
----------------------------------------------------------------------
.../apache/drill/exec/physical/impl/trace/TraceRecordBatch.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/366bf8e4/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/trace/TraceRecordBatch.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/trace/TraceRecordBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/trace/TraceRecordBatch.java
index 1b990c9..c138aba 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/trace/TraceRecordBatch.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/trace/TraceRecordBatch.java
@@ -32,6 +32,7 @@ import io.netty.buffer.CompositeByteBuf;
import org.apache.drill.exec.ExecConstants;
import org.apache.drill.exec.cache.VectorAccessibleSerializable;
import org.apache.drill.exec.exception.SchemaChangeException;
+import org.apache.drill.common.exceptions.ExecutionSetupException;
import org.apache.drill.exec.expr.TypeHelper;
import org.apache.drill.exec.memory.BufferAllocator;
import org.apache.drill.exec.ops.FragmentContext;
@@ -79,7 +80,7 @@ public class TraceRecordBatch extends AbstractSingleRecordBatch<Trace> {
/* File descriptors needed to be able to dump to log file */
private OutputStream fos;
- public TraceRecordBatch(Trace pop, RecordBatch incoming, FragmentContext context) {
+ public TraceRecordBatch(Trace pop, RecordBatch incoming, FragmentContext context) throws ExecutionSetupException {
super(pop, context, incoming);
this.traceTag = pop.traceTag;
logLocation = context.getConfig().getString(ExecConstants.TRACE_DUMP_DIRECTORY);
@@ -95,7 +96,7 @@ public class TraceRecordBatch extends AbstractSingleRecordBatch<Trace> {
/* create the file */
fos = fs.create(new Path(fileName));
} catch (IOException e) {
- logger.error("Unable to create file: " + fileName);
+ throw new ExecutionSetupException("Unable to create file: " + fileName + " check permissions or if directory exists", e);
}
}