drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacq...@apache.org
Subject [14/16] incubator-drill git commit: Remove extraneous System.out.print statements.
Date Wed, 12 Nov 2014 04:11:31 GMT
Remove extraneous System.out.print statements.


Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/968ba617
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/968ba617
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/968ba617

Branch: refs/heads/master
Commit: 968ba617d0fbb7084cb1f0883bd134c32c62e7e1
Parents: ab154b5
Author: Jacques Nadeau <jacques@apache.org>
Authored: Sun Nov 9 20:37:58 2014 -0800
Committer: Jacques Nadeau <jacques@apache.org>
Committed: Tue Nov 11 16:48:46 2014 -0800

----------------------------------------------------------------------
 .../apache/drill/exec/compile/MergeAdapter.java  |  2 +-
 .../drill/exec/expr/fn/impl/StringFunctions.java |  2 --
 .../exec/expr/fn/impl/conv/JsonConvertTo.java    |  2 +-
 .../physical/impl/filter/FilterTemplate4.java    |  1 -
 .../drill/exec/record/VectorContainer.java       |  3 ---
 .../drill/exec/server/rest/QueryWrapper.java     | 19 +++++++++++--------
 .../drill/exec/vector/VectorValidator.java       |  2 +-
 7 files changed, 14 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/968ba617/exec/java-exec/src/main/java/org/apache/drill/exec/compile/MergeAdapter.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/compile/MergeAdapter.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/compile/MergeAdapter.java
index 6a6be50..62d439c 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/compile/MergeAdapter.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/compile/MergeAdapter.java
@@ -94,7 +94,7 @@ class MergeAdapter extends ClassVisitor {
 
   @Override
   public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
-    System.out.println("Annotation");
+//    System.out.println("Annotation");
     return super.visitAnnotation(desc, visible);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/968ba617/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/StringFunctions.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/StringFunctions.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/StringFunctions.java
index d6afa6a..bad394c 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/StringFunctions.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/StringFunctions.java
@@ -1031,14 +1031,12 @@ public class StringFunctions{
     public void eval() {
       final int len = in.end - in.start;
       int num = nTimes.value;
-      System.out.println(len + ":" + num);
       out.start = 0;
       out.buffer = buffer = buffer.reallocIfNeeded( len * num );
       for (int i =0; i < num; i++) {
         in.buffer.getBytes(in.start, out.buffer, i * len, len);
       }
       out.end = len * num;
-      System.out.println(out.end);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/968ba617/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/JsonConvertTo.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/JsonConvertTo.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/JsonConvertTo.java
index c87bd5c..7f7d6f2 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/JsonConvertTo.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/JsonConvertTo.java
@@ -57,7 +57,7 @@ public class JsonConvertTo {
 
         jsonWriter.write(input);
       } catch (Exception e) {
-        System.out.println(" msg = " + e.getMessage() + " trace : " + e.getStackTrace());
+        throw new RuntimeException(e);
       }
 
       byte [] bytea = stream.toByteArray();

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/968ba617/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/filter/FilterTemplate4.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/filter/FilterTemplate4.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/filter/FilterTemplate4.java
index a1769b9..0ea53ac 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/filter/FilterTemplate4.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/filter/FilterTemplate4.java
@@ -47,7 +47,6 @@ public abstract class FilterTemplate4 implements Filterer {
     for (int i = 0; i < incomingSelectionVector.getCount(); i++) {
       int index = incomingSelectionVector.get(i);
       if (doEval(index, 0)) {
-        System.out.println(" (match): " + index + " (i: " + i + ") ");
         outgoingSelectionVector.set(outPos++, index);
       }
     }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/968ba617/exec/java-exec/src/main/java/org/apache/drill/exec/record/VectorContainer.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/record/VectorContainer.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/record/VectorContainer.java
index fde727f..24b8a4b 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/record/VectorContainer.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/record/VectorContainer.java
@@ -308,9 +308,6 @@ public class VectorContainer extends AbstractMapVector implements Iterable<Vecto
 
   @Override
   public int getRecordCount() {
-    if (recordCount < 0) {
-      System.out.println();
-    }
     Preconditions.checkState(recordCount != -1, "Record count not set for this vector container");
     return recordCount;
   }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/968ba617/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/QueryWrapper.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/QueryWrapper.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/QueryWrapper.java
index 7bf3909..da134af 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/QueryWrapper.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/QueryWrapper.java
@@ -33,6 +33,7 @@ import org.apache.drill.exec.client.DrillClient;
 import org.apache.drill.exec.coord.ClusterCoordinator;
 import org.apache.drill.exec.exception.SchemaChangeException;
 import org.apache.drill.exec.memory.BufferAllocator;
+import org.apache.drill.exec.physical.impl.flatten.FlattenRecordBatch;
 import org.apache.drill.exec.proto.UserBitShared;
 import org.apache.drill.exec.record.RecordBatchLoader;
 import org.apache.drill.exec.record.VectorWrapper;
@@ -48,6 +49,8 @@ import com.fasterxml.jackson.annotation.JsonProperty;
 @XmlRootElement
 public class QueryWrapper {
 
+  static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(FlattenRecordBatch.class);
+
   private String query;
   private String queryType;
 
@@ -77,15 +80,15 @@ public class QueryWrapper {
 
   public List<Map<String, Object>> run(DrillConfig config, ClusterCoordinator
coordinator, BufferAllocator allocator)
     throws Exception {
-    DrillClient client = new DrillClient(config, coordinator, allocator);
-    Listener listener = new Listener(new RecordBatchLoader(allocator));
+    try(DrillClient client = new DrillClient(config, coordinator, allocator)){
+      Listener listener = new Listener(new RecordBatchLoader(allocator));
 
-    client.connect();
-    client.runQuery(getType(), query, listener);
+      client.connect();
+      client.runQuery(getType(), query, listener);
 
-    List<Map<String, Object>> result = listener.waitForCompletion();
-    client.close();
-    return result;
+      List<Map<String, Object>> result = listener.waitForCompletion();
+      return result;
+    }
   }
 
   @Override
@@ -110,7 +113,7 @@ public class QueryWrapper {
     @Override
     public void submissionFailed(RpcException ex) {
       exception = ex;
-      System.out.println("Query failed: " + ex.getMessage());
+      logger.error("Query Failed", ex);
       latch.countDown();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/968ba617/exec/java-exec/src/main/java/org/apache/drill/exec/vector/VectorValidator.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/vector/VectorValidator.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/vector/VectorValidator.java
index 6283f35..7856fad 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/vector/VectorValidator.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/vector/VectorValidator.java
@@ -67,7 +67,7 @@ public class VectorValidator {
       }
     }
     if (hash == 0) {
-      System.out.println(hash);
+//      System.out.println(hash);
     }
   }
 }


Mime
View raw message