Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Drill >> mail # dev >> [08/10] git commit: Simple reformatting


Copy link to this message
-
[08/10] git commit: Simple reformatting
Simple reformatting
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/8a571b3e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/8a571b3e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/8a571b3e

Branch: refs/heads/master
Commit: 8a571b3ea04f439b3303d7154b1450abcb2bf320
Parents: b44b6c7
Author: Jacques Nadeau <[EMAIL PROTECTED]>
Authored: Fri Nov 8 09:20:28 2013 -0800
Committer: Jacques Nadeau <[EMAIL PROTECTED]>
Committed: Fri Nov 8 09:20:28 2013 -0800

----------------------------------------------------------------------
 .../physical/impl/trace/TraceBatchCreator.java  |  16 +-
 .../physical/impl/trace/TraceRecordBatch.java   | 224 +++++++++----------
 .../apache/drill/exec/record/WritableBatch.java |  52 +++--
 3 files changed, 138 insertions(+), 154 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/8a571b3e/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/trace/TraceBatchCreator.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/trace/TraceBatchCreator.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/trace/TraceBatchCreator.java
index e857c25..a24ec70 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/trace/TraceBatchCreator.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/trace/TraceBatchCreator.java
@@ -29,13 +29,13 @@ import com.google.common.base.Preconditions;
 import java.util.List;
 
 public class TraceBatchCreator implements BatchCreator<Trace> {
-    static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TraceBatchCreator.class);
-
-    @Override
-    public RecordBatch getBatch(FragmentContext context, Trace config, List<RecordBatch> children) throws ExecutionSetupException {
-        //Preconditions.checkArgument(children.size() == 1);
-        return new TraceRecordBatch(config, children.iterator().next(), context);
-    }
-
+  static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TraceBatchCreator.class);
+
+  @Override
+  public RecordBatch getBatch(FragmentContext context, Trace config, List<RecordBatch> children)
+      throws ExecutionSetupException {
+    // Preconditions.checkArgument(children.size() == 1);
+    return new TraceRecordBatch(config, children.iterator().next(), context);
+  }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/8a571b3e/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 b73ddc1..1b990c9 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
@@ -65,139 +65,125 @@ import org.apache.hadoop.fs.Path;
  * same set of value vectors (and selection vectors) to its parent record
  * batch
  */
-public class TraceRecordBatch extends AbstractSingleRecordBatch<Trace>
-{
-    static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TraceRecordBatch.class);
-
-    private SelectionVector2 sv = null;
-
-    /* Tag associated with each trace operator */
-    final String traceTag;
-
-    /* Location where the log should be dumped */
-    private final String logLocation;
-
-    /* File descriptors needed to be able to dump to log file */
-    private OutputStream fos;
-
-    public TraceRecordBatch(Trace pop, RecordBatch incoming, FragmentContext context)
-    {
-        super(pop, context, incoming);
-        this.traceTag = pop.traceTag;
-        logLocation = context.getConfig().getString(ExecConstants.TRACE_DUMP_DIRECTORY);
-
-        String fileName = getFileName();
-
-        /* Create the log file we will dump to and initialize the file descriptors */
-        try
-        {
-          Configuration conf = new Configuration();
-          conf.set("fs.name.default", ExecConstants.TRACE_DUMP_FILESYSTEM);
-          FileSystem fs = FileSystem.get(conf);
-
-            /* create the file */
-          fos = fs.create(new Path(fileName));
-        } catch (IOException e)
-        {
-            logger.error("Unable to create file: " + fileName);
-        }
-    }
+public class TraceRecordBatch extends AbstractSingleRecordBatch<Trace> {
+  static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TraceRecordBatch.class);
+
+  private SelectionVector2 sv = null;
+
+  /* Tag associated with each trace operator */
+  final String traceTag;
+
+  /* Location where the log should be dumped */
+  private final String logLocation;
+
+  /* File descriptors needed to be able to dump to log file */
+  private OutputStream fos;
+
+  public TraceRecordBatch(Trace pop, RecordBatch incoming, FragmentContext context) {
+    super(pop, context, incoming);
+    this.traceTag = pop.traceTag;
+    logLocation = context.getConfig().getString(ExecConstants.TRACE_DUMP_DIRECTORY);
+
+    String fileName = getFileName();
+
+    /* Create the log file we will dump to and initialize the file descriptors */
+    try {
+      Configuration conf = new Configuration();
+      conf.set("fs.name.default", ExecConstants.TRACE_DUMP_FILESYSTEM);
+      FileSystem fs = FileSystem.get(conf);
 
-    @Override
-    public int getRecordCount()
-    {
-        if (sv == null)
-            return incoming.getRecordCount();
-        else
-           return sv.getCount();
+      /* create the file */
+      fos = fs.create(new Path(fileName))