You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by ja...@apache.org on 2015/05/16 03:38:40 UTC

[1/7] drill git commit: Update sqlline for small rc0 issues.

Repository: drill
Updated Branches:
  refs/heads/master d8b197596 -> 13a0c3c70


Update sqlline for small rc0 issues.


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

Branch: refs/heads/master
Commit: dd35b270fdb91dc6387f541f889bd64c721eef04
Parents: d8b1975
Author: Jacques Nadeau <ja...@apache.org>
Authored: Fri May 15 16:19:02 2015 -0700
Committer: Jacques Nadeau <ja...@apache.org>
Committed: Fri May 15 16:19:02 2015 -0700

----------------------------------------------------------------------
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/dd35b270/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e4b7bb4..521e05f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1033,7 +1033,7 @@
           <dependency>
             <groupId>sqlline</groupId>
             <artifactId>sqlline</artifactId>
-            <version>1.1.9-drill-r3</version>
+            <version>1.1.9-drill-r4</version>
           </dependency>
 
           <dependency>
@@ -1371,7 +1371,7 @@
           <dependency>
             <groupId>sqlline</groupId>
             <artifactId>sqlline</artifactId>
-            <version>1.1.9-drill-r3</version>
+            <version>1.1.9-drill-r4</version>
           </dependency>
           <!-- Test Dependencies -->
           <dependency>


[5/7] drill git commit: DRILL-3092: Fix memory leak risk near uses of RecordBatchData classes that need to have their resources freed upon an allocation or other runtime failure.

Posted by ja...@apache.org.
DRILL-3092: Fix memory leak risk near uses of RecordBatchData classes that need to have their resources freed upon an allocation or other runtime failure.


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

Branch: refs/heads/master
Commit: e838abf8850726d039de47732eb5a713c8bf51ba
Parents: 30f5892
Author: Jason Altekruse <al...@gmail.com>
Authored: Thu May 14 17:32:09 2015 -0700
Committer: Jacques Nadeau <ja...@apache.org>
Committed: Fri May 15 17:38:27 2015 -0700

----------------------------------------------------------------------
 .../exec/physical/impl/TopN/TopNBatch.java      | 26 +++++---
 .../exec/physical/impl/join/HashJoinBatch.java  | 22 ++++---
 .../physical/impl/join/NestedLoopJoinBatch.java | 12 +++-
 .../impl/producer/ProducerConsumerBatch.java    |  2 +-
 .../physical/impl/sort/RecordBatchData.java     |  7 +++
 .../physical/impl/xsort/ExternalSortBatch.java  | 62 +++++++++++---------
 6 files changed, 85 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/e838abf8/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/TopN/TopNBatch.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/TopN/TopNBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/TopN/TopNBatch.java
index 349f1b1..516b028 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/TopN/TopNBatch.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/TopN/TopNBatch.java
@@ -217,15 +217,23 @@ public class TopNBatch extends AbstractRecordBatch<TopN> {
           countSincePurge += incoming.getRecordCount();
           batchCount++;
           RecordBatchData batch = new RecordBatchData(incoming);
-          batch.canonicalize();
-          if (priorityQueue == null) {
-            priorityQueue = createNewPriorityQueue(context, config.getOrderings(), new ExpandableHyperContainer(batch.getContainer()), MAIN_MAPPING, LEFT_MAPPING, RIGHT_MAPPING);
-          }
-          priorityQueue.add(context, batch);
-          if (countSincePurge > config.getLimit() && batchCount > batchPurgeThreshold) {
-            purge();
-            countSincePurge = 0;
-            batchCount = 0;
+          boolean success = false;
+          try {
+            batch.canonicalize();
+            if (priorityQueue == null) {
+              priorityQueue = createNewPriorityQueue(context, config.getOrderings(), new ExpandableHyperContainer(batch.getContainer()), MAIN_MAPPING, LEFT_MAPPING, RIGHT_MAPPING);
+            }
+            priorityQueue.add(context, batch);
+            if (countSincePurge > config.getLimit() && batchCount > batchPurgeThreshold) {
+              purge();
+              countSincePurge = 0;
+              batchCount = 0;
+            }
+            success = true;
+          } finally {
+            if (!success) {
+              batch.clear();
+            }
           }
           break;
         default:

http://git-wip-us.apache.org/repos/asf/drill/blob/e838abf8/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/HashJoinBatch.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/HashJoinBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/HashJoinBatch.java
index 6490251..5fd866f 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/HashJoinBatch.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/HashJoinBatch.java
@@ -389,14 +389,22 @@ public class HashJoinBatch extends AbstractRecordBatch<HashJoinPOP> {
                      * records that have matching keys on the probe side.
                      */
         RecordBatchData nextBatch = new RecordBatchData(right);
-        if (hyperContainer == null) {
-          hyperContainer = new ExpandableHyperContainer(nextBatch.getContainer());
-        } else {
-          hyperContainer.addBatch(nextBatch.getContainer());
-        }
+        boolean success = false;
+        try {
+          if (hyperContainer == null) {
+            hyperContainer = new ExpandableHyperContainer(nextBatch.getContainer());
+          } else {
+            hyperContainer.addBatch(nextBatch.getContainer());
+          }
 
-        // completed processing a batch, increment batch index
-        buildBatchIndex++;
+          // completed processing a batch, increment batch index
+          buildBatchIndex++;
+          success = true;
+        } finally {
+          if (!success) {
+            nextBatch.clear();
+          }
+        }
         break;
       }
       // Get the next record batch

http://git-wip-us.apache.org/repos/asf/drill/blob/e838abf8/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/NestedLoopJoinBatch.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/NestedLoopJoinBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/NestedLoopJoinBatch.java
index 9bcea60..2d37fa5 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/NestedLoopJoinBatch.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/NestedLoopJoinBatch.java
@@ -342,8 +342,16 @@ public class NestedLoopJoinBatch extends AbstractRecordBatch<NestedLoopJoinPOP>
 
   private void addBatchToHyperContainer(RecordBatch inputBatch) {
     RecordBatchData batchCopy = new RecordBatchData(inputBatch);
-    rightCounts.addLast(inputBatch.getRecordCount());
-    rightContainer.addBatch(batchCopy.getContainer());
+    boolean success = false;
+    try {
+      rightCounts.addLast(inputBatch.getRecordCount());
+      rightContainer.addBatch(batchCopy.getContainer());
+      success = true;
+    } finally {
+      if (!success) {
+        batchCopy.clear();
+      }
+    }
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/drill/blob/e838abf8/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/producer/ProducerConsumerBatch.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/producer/ProducerConsumerBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/producer/ProducerConsumerBatch.java
index bca9622..b9a1641 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/producer/ProducerConsumerBatch.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/producer/ProducerConsumerBatch.java
@@ -171,7 +171,7 @@ public class ProducerConsumerBatch extends AbstractRecordBatch {
           }
         }
         if (wrapper!=null) {
-          wrapper.batch.getContainer().zeroVectors();
+          wrapper.batch.clear();
         }
         cleanUpLatch.countDown();
       }

http://git-wip-us.apache.org/repos/asf/drill/blob/e838abf8/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/sort/RecordBatchData.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/sort/RecordBatchData.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/sort/RecordBatchData.java
index fbd472e..af774db 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/sort/RecordBatchData.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/sort/RecordBatchData.java
@@ -96,4 +96,11 @@ public class RecordBatchData {
     return container;
   }
 
+  public void clear() {
+    if (sv2 != null) {
+      sv2.clear();
+    }
+    container.clear();
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/drill/blob/e838abf8/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java
index de4a86e..8871a5f 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java
@@ -305,36 +305,44 @@ public class ExternalSortBatch extends AbstractRecordBatch<ExternalSort> {
           sorter.sort(sv2);
 //          logger.debug("Took {} us to sort {} records", w.elapsed(TimeUnit.MICROSECONDS), count);
           RecordBatchData rbd = new RecordBatchData(incoming);
-          if (incoming.getSchema().getSelectionVectorMode() == SelectionVectorMode.NONE) {
-            rbd.setSv2(sv2);
-          }
-          batchGroups.add(new BatchGroup(rbd.getContainer(), rbd.getSv2()));
-          batchesSinceLastSpill++;
-          if (// We have spilled at least once and the current memory used is more than the 75% of peak memory used.
-              (spillCount > 0 && totalSizeInMemory > .75 * highWaterMark) ||
-              // If we haven't spilled so far, do we have enough memory for MSorter if this turns out to be the last incoming batch?
-              (spillCount == 0 && !hasMemoryForInMemorySort(totalCount)) ||
-              // current memory used is more than 95% of memory usage limit of this operator
-              (totalSizeInMemory > .95 * popConfig.getMaxAllocation()) ||
-              // current memory used is more than 95% of memory usage limit of this fragment
-              (totalSizeInMemory > .95 * oContext.getAllocator().getFragmentLimit()) ||
-              // Number of incoming batches (BatchGroups) exceed the limit and number of incoming batches accumulated
-              // since the last spill exceed the defined limit
-              (batchGroups.size() > SPILL_THRESHOLD && batchesSinceLastSpill >= SPILL_BATCH_GROUP_SIZE)) {
-
-            if (firstSpillBatchCount == 0) {
-              firstSpillBatchCount = batchGroups.size();
+          boolean success = false;
+          try {
+            if (incoming.getSchema().getSelectionVectorMode() == SelectionVectorMode.NONE) {
+              rbd.setSv2(sv2);
             }
-
-            if (spilledBatchGroups.size() > firstSpillBatchCount / 2) {
-              logger.info("Merging spills");
-              spilledBatchGroups.addFirst(mergeAndSpill(spilledBatchGroups));
+            batchGroups.add(new BatchGroup(rbd.getContainer(), rbd.getSv2()));
+            batchesSinceLastSpill++;
+            if (// We have spilled at least once and the current memory used is more than the 75% of peak memory used.
+                (spillCount > 0 && totalSizeInMemory > .75 * highWaterMark) ||
+                // If we haven't spilled so far, do we have enough memory for MSorter if this turns out to be the last incoming batch?
+                (spillCount == 0 && !hasMemoryForInMemorySort(totalCount)) ||
+                // current memory used is more than 95% of memory usage limit of this operator
+                (totalSizeInMemory > .95 * popConfig.getMaxAllocation()) ||
+                // current memory used is more than 95% of memory usage limit of this fragment
+                (totalSizeInMemory > .95 * oContext.getAllocator().getFragmentLimit()) ||
+                // Number of incoming batches (BatchGroups) exceed the limit and number of incoming batches accumulated
+                // since the last spill exceed the defined limit
+                (batchGroups.size() > SPILL_THRESHOLD && batchesSinceLastSpill >= SPILL_BATCH_GROUP_SIZE)) {
+
+              if (firstSpillBatchCount == 0) {
+                firstSpillBatchCount = batchGroups.size();
+              }
+
+              if (spilledBatchGroups.size() > firstSpillBatchCount / 2) {
+                logger.info("Merging spills");
+                spilledBatchGroups.addFirst(mergeAndSpill(spilledBatchGroups));
+              }
+              spilledBatchGroups.add(mergeAndSpill(batchGroups));
+              batchesSinceLastSpill = 0;
             }
-            spilledBatchGroups.add(mergeAndSpill(batchGroups));
-            batchesSinceLastSpill = 0;
-          }
-          long t = w.elapsed(TimeUnit.MICROSECONDS);
+            long t = w.elapsed(TimeUnit.MICROSECONDS);
 //          logger.debug("Took {} us to sort {} records", t, count);
+            success = true;
+          } finally {
+            if (!success) {
+              rbd.clear();
+            }
+          }
           break;
         case OUT_OF_MEMORY:
           logger.debug("received OUT_OF_MEMORY, trying to spill");


[4/7] drill git commit: Add bounds check in setByte() method

Posted by ja...@apache.org.
Add bounds check in setByte() method


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

Branch: refs/heads/master
Commit: c9a9b7c9481e4ea7533a8271c5ba3201e12a346c
Parents: e838abf
Author: Steven Phillips <sm...@apache.org>
Authored: Fri May 15 15:12:18 2015 -0700
Committer: Jacques Nadeau <ja...@apache.org>
Committed: Fri May 15 17:38:27 2015 -0700

----------------------------------------------------------------------
 exec/java-exec/src/main/java/io/netty/buffer/DrillBuf.java | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/c9a9b7c9/exec/java-exec/src/main/java/io/netty/buffer/DrillBuf.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/io/netty/buffer/DrillBuf.java b/exec/java-exec/src/main/java/io/netty/buffer/DrillBuf.java
index 6f61f30..3ec6b3e 100644
--- a/exec/java-exec/src/main/java/io/netty/buffer/DrillBuf.java
+++ b/exec/java-exec/src/main/java/io/netty/buffer/DrillBuf.java
@@ -615,6 +615,7 @@ public final class DrillBuf extends AbstractByteBuf implements AutoCloseable {
   }
 
   public void setByte(int index, byte b){
+    chk(index, 1);
     PlatformDependent.putByte(addr(index), b);
   }
 


[6/7] drill git commit: DRILL-3107: Dynamic partition pruning fails on Windows (TestDirectoryExplorerUDFs)

Posted by ja...@apache.org.
DRILL-3107: Dynamic partition pruning fails on Windows (TestDirectoryExplorerUDFs)


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

Branch: refs/heads/master
Commit: e877417028762c80a6f03259eee5c0edbfb981de
Parents: d03a4d6
Author: Aditya Kishore <ad...@apache.org>
Authored: Fri May 15 10:13:04 2015 -0700
Committer: Jacques Nadeau <ja...@apache.org>
Committed: Fri May 15 17:38:28 2015 -0700

----------------------------------------------------------------------
 exec/java-exec/src/main/codegen/templates/DirectoryExplorers.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/e8774170/exec/java-exec/src/main/codegen/templates/DirectoryExplorers.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/codegen/templates/DirectoryExplorers.java b/exec/java-exec/src/main/codegen/templates/DirectoryExplorers.java
index 85e0842..c97e34b 100644
--- a/exec/java-exec/src/main/codegen/templates/DirectoryExplorers.java
+++ b/exec/java-exec/src/main/codegen/templates/DirectoryExplorers.java
@@ -38,6 +38,7 @@ import javax.inject.Inject;
  */
 public class DirectoryExplorers {
   static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DirectoryExplorers.class);
+  private static final String FILE_SEPARATOR = "/";
 
   <#list [ { "name" : "\"maxdir\"", "functionClassName" : "MaxDir", "comparison" : "compareTo(curr) < 0", "goal" : "maximum", "comparisonType" : "case-sensitive"},
            { "name" : "\"imaxdir\"", "functionClassName" : "IMaxDir", "comparison" : "compareToIgnoreCase(curr) < 0", "goal" : "maximum", "comparisonType" : "case-insensitive"},
@@ -93,7 +94,7 @@ public class DirectoryExplorers {
           subPartitionStr = curr;
         }
       }
-      String[] subPartitionParts = subPartitionStr.split(java.io.File.separator);
+      String[] subPartitionParts = subPartitionStr.split(FILE_SEPARATOR);
       subPartitionStr = subPartitionParts[subPartitionParts.length - 1];
       byte[] result = subPartitionStr.getBytes();
       out.buffer = buffer = buffer.reallocIfNeeded(result.length);


[3/7] drill git commit: DRILL-3102: The doc link on Drill Web UI points to the old wiki page

Posted by ja...@apache.org.
DRILL-3102: The doc link on Drill Web UI points to the old wiki page


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

Branch: refs/heads/master
Commit: d03a4d667182929edbc32066e04037ecce1db6d7
Parents: c9a9b7c
Author: Aditya Kishore <ad...@apache.org>
Authored: Fri May 15 13:13:36 2015 -0700
Committer: Jacques Nadeau <ja...@apache.org>
Committed: Fri May 15 17:38:27 2015 -0700

----------------------------------------------------------------------
 INSTALL.md                                         | 3 +--
 README.md                                          | 2 +-
 distribution/src/resources/README.md               | 2 +-
 exec/java-exec/src/main/resources/rest/generic.ftl | 2 +-
 exec/java-exec/src/main/resources/rest/options.ftl | 4 ++--
 5 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/d03a4d66/INSTALL.md
----------------------------------------------------------------------
diff --git a/INSTALL.md b/INSTALL.md
index 8ecb636..7c65611 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -43,5 +43,4 @@ Currently, the Apache Drill build process is known to work on Linux, Windows and
     
 ## More information 
 
-For more information including how to run a Apache Drill cluster, visit the [Apache Drill Wiki](https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+Wiki)
-
+For more information including how to run a Apache Drill cluster, visit the [Apache Drill Documentation](http://drill.apache.org/docs/)

http://git-wip-us.apache.org/repos/asf/drill/blob/d03a4d66/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 69da92f..0c89ec1 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@ Apache Drill is a distributed MPP query layer that supports SQL and alternative
 Please read INSTALL.md for setting up and running Apache Drill.
 
 ## More Information
-Please see the [Apache Drill Website](http://drill.apache.org/) or the [Apache Drill Wiki](https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+Wiki) for more information including:
+Please see the [Apache Drill Website](http://drill.apache.org/) or the [Apache Drill Documentation](http://drill.apache.org/docs/) for more information including:
 
  * Remote Execution Installation Instructions
  * Information about how to submit logical and distributed physical plans

http://git-wip-us.apache.org/repos/asf/drill/blob/d03a4d66/distribution/src/resources/README.md
----------------------------------------------------------------------
diff --git a/distribution/src/resources/README.md b/distribution/src/resources/README.md
index f333b38..40feb29 100644
--- a/distribution/src/resources/README.md
+++ b/distribution/src/resources/README.md
@@ -41,4 +41,4 @@ Drill comes preinstalled with a number of example data files including a small c
     
 ## More information 
 
-For more information including how to run a Apache Drill cluster, visit the [Apache Drill Wiki](https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+Wiki)
+For more information including how to run a Apache Drill cluster, visit the [Apache Drill Documentation](http://drill.apache.org/docs/)

http://git-wip-us.apache.org/repos/asf/drill/blob/d03a4d66/exec/java-exec/src/main/resources/rest/generic.ftl
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/resources/rest/generic.ftl b/exec/java-exec/src/main/resources/rest/generic.ftl
index 1c229b6..9df2424 100644
--- a/exec/java-exec/src/main/resources/rest/generic.ftl
+++ b/exec/java-exec/src/main/resources/rest/generic.ftl
@@ -62,7 +62,7 @@
             </ul>
             <ul class="nav navbar-nav navbar-right">
               <li><a href="/options">Options</a></li>
-              <li><a href="https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+Wiki">Wiki</a>
+              <li><a href="http://drill.apache.org/docs/">Documentation</a>
             </ul>
           </div>
         </div>

http://git-wip-us.apache.org/repos/asf/drill/blob/d03a4d66/exec/java-exec/src/main/resources/rest/options.ftl
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/resources/rest/options.ftl b/exec/java-exec/src/main/resources/rest/options.ftl
index 0092faa..7ba1250 100644
--- a/exec/java-exec/src/main/resources/rest/options.ftl
+++ b/exec/java-exec/src/main/resources/rest/options.ftl
@@ -19,7 +19,7 @@
   </div>
   <h4>System options</h4>
   <div align="right">
-    <a href="https://cwiki.apache.org/confluence/display/DRILL/Planning+and+Execution+Options">Documentation</a>
+    <a href="http://drill.apache.org/docs/planning-and-execution-options/">Documentation</a>
   </div>
   <div class="table-responsive">
     <table class="table table-hover">
@@ -44,4 +44,4 @@
   </div>
 </#macro>
 
-<@page_html/>
\ No newline at end of file
+<@page_html/>


[7/7] drill git commit: DRILL-3115: SQLLine colors do not work well with CYGWIN

Posted by ja...@apache.org.
DRILL-3115: SQLLine colors do not work well with CYGWIN


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

Branch: refs/heads/master
Commit: 13a0c3c70991f29ca240adcac32b11b0d4fef21e
Parents: e877417
Author: Aditya Kishore <ad...@apache.org>
Authored: Fri May 15 16:57:33 2015 -0700
Committer: Jacques Nadeau <ja...@apache.org>
Committed: Fri May 15 17:41:52 2015 -0700

----------------------------------------------------------------------
 distribution/src/resources/sqlline | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/13a0c3c7/distribution/src/resources/sqlline
----------------------------------------------------------------------
diff --git a/distribution/src/resources/sqlline b/distribution/src/resources/sqlline
index 2c9c783..e494a72 100644
--- a/distribution/src/resources/sqlline
+++ b/distribution/src/resources/sqlline
@@ -45,10 +45,14 @@ bin=`cd "$bin">/dev/null; pwd`
 
 DRILL_SHELL_JAVA_OPTS="$DRILL_SHELL_JAVA_OPTS -Dlog.path=$DRILL_LOG_DIR/sqlline.log -Dlog.query.path=$DRILL_LOG_DIR/sqlline_queries.json"
 
+if ! $is_cygwin; then
+  DRILL_SHELL_OPTS="$DRILL_SHELL_OPTS --color=true"
+fi
+
 if [ -n "$QUERY" ] ; then
   echo $QUERY | exec "$JAVA" $DRILL_SHELL_JAVA_OPTS $DRILL_JAVA_OPTS -cp $CP sqlline.SqlLine -d org.apache.drill.jdbc.Driver  --maxWidth=10000 "${ARGS[@]}"
 elif [ -n "$FILE" ] ; then
   exec "$JAVA" $DRILL_SHELL_JAVA_OPTS $DRILL_JAVA_OPTS -cp $CP sqlline.SqlLine -d org.apache.drill.jdbc.Driver  --maxWidth=10000 "${ARGS[@]}" --run=$FILE
 else
-  exec "$JAVA" $DRILL_SHELL_JAVA_OPTS $DRILL_JAVA_OPTS -cp $CP sqlline.SqlLine --color=true -d org.apache.drill.jdbc.Driver --maxWidth=10000 "${ARGS[@]}"
+  exec "$JAVA" $DRILL_SHELL_JAVA_OPTS $DRILL_JAVA_OPTS -cp $CP sqlline.SqlLine -d org.apache.drill.jdbc.Driver --maxWidth=10000 $DRILL_SHELL_OPTS "${ARGS[@]}"
 fi


[2/7] drill git commit: DRILL-3110: Coerce Java's Direct OutOfMemoryErrors to look like reservation failures to follow existing Drill behavior paths.

Posted by ja...@apache.org.
DRILL-3110: Coerce Java's Direct OutOfMemoryErrors to look like reservation failures to follow existing Drill behavior paths.


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

Branch: refs/heads/master
Commit: 30f589204aeae2568a58efe595b5e516f4cddfed
Parents: dd35b27
Author: Jacques Nadeau <ja...@apache.org>
Authored: Fri May 15 16:50:01 2015 -0700
Committer: Jacques Nadeau <ja...@apache.org>
Committed: Fri May 15 17:37:28 2015 -0700

----------------------------------------------------------------------
 .../org/apache/drill/exec/memory/Accountor.java |  4 +++
 .../drill/exec/memory/TopLevelAllocator.java    | 35 +++++++++++++++-----
 2 files changed, 31 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/30f58920/exec/java-exec/src/main/java/org/apache/drill/exec/memory/Accountor.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/memory/Accountor.java b/exec/java-exec/src/main/java/org/apache/drill/exec/memory/Accountor.java
index eb932ad..ad6a787 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/memory/Accountor.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/memory/Accountor.java
@@ -197,6 +197,10 @@ public class Accountor {
     }
   }
 
+  void release(long size) {
+    remainder.returnAllocation(size);
+  }
+
   public void release(DrillBuf buf, long size) {
     remainder.returnAllocation(size);
     if (ENABLE_ACCOUNTING) {

http://git-wip-us.apache.org/repos/asf/drill/blob/30f58920/exec/java-exec/src/main/java/org/apache/drill/exec/memory/TopLevelAllocator.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/memory/TopLevelAllocator.java b/exec/java-exec/src/main/java/org/apache/drill/exec/memory/TopLevelAllocator.java
index f6a37e7..e2d5b18 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/memory/TopLevelAllocator.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/memory/TopLevelAllocator.java
@@ -95,10 +95,20 @@ public class TopLevelAllocator implements BufferAllocator {
     if(!acct.reserve(min)) {
       return null;
     }
-    UnsafeDirectLittleEndian buffer = innerAllocator.directBuffer(min, max);
-    DrillBuf wrapped = new DrillBuf(this, acct, buffer);
-    acct.reserved(min, wrapped);
-    return wrapped;
+
+    try {
+      UnsafeDirectLittleEndian buffer = innerAllocator.directBuffer(min, max);
+      DrillBuf wrapped = new DrillBuf(this, acct, buffer);
+      acct.reserved(min, wrapped);
+      return wrapped;
+    } catch (OutOfMemoryError e) {
+      if ("Direct buffer memory".equals(e.getMessage())) {
+        acct.release(min);
+        return null;
+      } else {
+        throw e;
+      }
+    }
   }
 
   @Override
@@ -244,10 +254,19 @@ public class TopLevelAllocator implements BufferAllocator {
         return null;
       }
 
-      UnsafeDirectLittleEndian buffer = innerAllocator.directBuffer(size, max);
-      DrillBuf wrapped = new DrillBuf(this, childAcct, buffer);
-      childAcct.reserved(buffer.capacity(), wrapped);
-      return wrapped;
+      try {
+        UnsafeDirectLittleEndian buffer = innerAllocator.directBuffer(size, max);
+        DrillBuf wrapped = new DrillBuf(this, childAcct, buffer);
+        childAcct.reserved(buffer.capacity(), wrapped);
+        return wrapped;
+      } catch (OutOfMemoryError e) {
+        if ("Direct buffer memory".equals(e.getMessage())) {
+          childAcct.release(size);
+          return null;
+        } else {
+          throw e;
+        }
+      }
     }
 
     public DrillBuf buffer(int size) {