You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by am...@apache.org on 2018/12/09 07:31:06 UTC
[drill] branch master updated (637354e -> e478213)
This is an automated email from the ASF dual-hosted git repository.
amansinha pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git.
from 637354e DRILL-6751: Upgrade Apache parent POM to version 21
new f6d54b4 DRILL-6883: Force reload of options after resetting parameter
new 0543dbb DRILL-6874: Close input stream after AsyncPageReaderTask is completed
new e478213 DRILL-6887: Fix FunctionInitializerTest.init() failure
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../parquet/columnreaders/AsyncPageReader.java | 7 ++++
exec/java-exec/src/main/resources/rest/options.ftl | 38 +++++++++++++++++-----
.../java-exec/src/test/resources/drill-udf/pom.xml | 3 ++
3 files changed, 40 insertions(+), 8 deletions(-)
[drill] 01/03: DRILL-6883: Force reload of options after resetting
parameter
Posted by am...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
amansinha pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git
commit f6d54b480a123724f4cca7d146b0a5c3fb077652
Author: Kunal Khatua <kk...@maprtech.com>
AuthorDate: Wed Dec 5 23:34:26 2018 -0800
DRILL-6883: Force reload of options after resetting parameter
If an update is initiated, the webpage loaded changes. Attempting a reset tries to reload this page, but it does not show the updated values from the back end.
This patch forces the reload of updated values by redirecting to /options page
Use AJAX call for Update and Reset
Eliminates the need for window.location=<redirectURL>
is Number check
Added comments to explain extraction
close apache/drill#1563
---
exec/java-exec/src/main/resources/rest/options.ftl | 38 +++++++++++++++++-----
1 file changed, 30 insertions(+), 8 deletions(-)
diff --git a/exec/java-exec/src/main/resources/rest/options.ftl b/exec/java-exec/src/main/resources/rest/options.ftl
index 7ac8a2e..a8e03fa 100644
--- a/exec/java-exec/src/main/resources/rest/options.ftl
+++ b/exec/java-exec/src/main/resources/rest/options.ftl
@@ -22,9 +22,32 @@
<script type="text/javascript" language="javascript" src="/static/js/jquery.dataTables-1.10.16.min.js"> </script>
<script type="text/javascript" language="javascript" src="/static/js/dataTables.colVis-1.1.0.min.js"></script>
<script>
- function resetToDefault(optionName, optionValue, optionKind) {
- $.post("/option/"+optionName, {kind: optionKind, name: optionName, value: optionValue}, function (status) { location.reload(true); } );
+ //Alter System Values
+ function alterSysOption(optionName, optionValue, optionKind) {
+ $.post("/option/"+optionName, {kind: optionKind, name: optionName, value: optionValue}, function () {
+ location.reload(true);
+ });
+ }
+
+ //Read Values and apply
+ function alterSysOptionUsingId(optionRawName) {
+ //Escaping '.' for id search
+ let optionName = optionRawName.replace(/\./gi, "\\.");
+ //Extracting datatype from the form
+ let optionKind = $("#"+optionName+" input[name='kind']").attr("value");
+ //Extracting value from the form's INPUT element
+ let optionValue = $("#"+optionName+" input[name='value']").val();
+ if (optionKind == "BOOLEAN") {
+ //Extracting boolean value from the form's SELECT element (since this is a dropdown input)
+ optionValue = $("#"+optionName+" select[name='value']").val();
+ } else if (optionKind != "STRING") { //i.e. it is a number (FLOAT/DOUBLE/LONG)
+ if (isNaN(optionValue)) {
+ alert(optionValue+" is not a valid number for option: "+optionName);
+ return;
+ }
}
+ alterSysOption(optionRawName, optionValue, optionKind);
+ }
</script>
<!-- List of Option Descriptions -->
<script src="/dynamic/options.describe.js"></script>
@@ -75,7 +98,7 @@ table.sortable thead .sorting_desc { background-image: url("/static/img/black-de
<tr id="row-${i}">
<td style="font-family:Courier New; vertical-align:middle" id='optionName'>${option.getName()}</td>
<td>
- <form class="form-inline" role="form" action="/option/${option.getName()}" method="POST">
+ <form class="form-inline" role="form" id="${option.getName()}">
<div class="form-group">
<input type="hidden" class="form-control" name="kind" value="${option.getKind()}">
<input type="hidden" class="form-control" name="name" value="${option.getName()}">
@@ -89,10 +112,9 @@ table.sortable thead .sorting_desc { background-image: url("/static/img/black-de
<input type="text" class="form-control" placeholder="${option.getValueAsString()}" name="value" value="${option.getValueAsString()}">
</#if>
<div class="input-group-btn">
- <button class="btn btn-default" type="submit">Update</button>
- <button class="btn btn-default" onClick="resetToDefault('${option.getName()}','${option.getDefaultValue()}', '${option.getKind()}')" type="button"
- <#if option.getDefaultValue() == option.getValueAsString()>disabled="true" style="pointer-events:none" <#else>
- title="Reset to ${option.getDefaultValue()}"</#if>>Reset</button>
+ <button class="btn btn-default" type="button" onclick="alterSysOptionUsingId('${option.getName()}')">Update</button>
+ <button class="btn btn-default" type="button" onclick="alterSysOption('${option.getName()}','${option.getDefaultValue()}', '${option.getKind()}')" <#if option.getDefaultValue() == option.getValueAsString()>disabled="true" style="pointer-events:none" <#else>
+ title="Reset to ${option.getDefaultValue()}"</#if>>Default</button>
</div>
</div>
</div>
@@ -127,7 +149,7 @@ table.sortable thead .sorting_desc { background-image: url("/static/img/black-de
//Inject Descriptions for table
let size = $('#optionsTbl tbody tr').length;
for (i = 1; i <= size; i++) {
- let currRow = $("#row-"+i);
+ let currRow = $("#row-"+i);
let optionName = currRow.find("#optionName").text();
let setOptDescrip = currRow.find("#description").text(getDescription(optionName));
}
[drill] 02/03: DRILL-6874: Close input stream after
AsyncPageReaderTask is completed
Posted by am...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
amansinha pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git
commit 0543dbb356c669132c8ac75a99b318661bdcf664
Author: Bohdan Kazydub <bo...@gmail.com>
AuthorDate: Thu Dec 6 15:03:25 2018 +0200
DRILL-6874: Close input stream after AsyncPageReaderTask is completed
close apache/drill#1565
---
.../drill/exec/store/parquet/columnreaders/AsyncPageReader.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/columnreaders/AsyncPageReader.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/columnreaders/AsyncPageReader.java
index e429fb6..8b5c926 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/columnreaders/AsyncPageReader.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/columnreaders/AsyncPageReader.java
@@ -417,6 +417,13 @@ class AsyncPageReader extends PageReader {
if (totalValuesRead >= totalValuesCount) {
try {
queue.put(ReadStatus.EMPTY);
+ // Some InputStreams (like S3ObjectInputStream) should be closed
+ // as soon as possible to make the connection reusable.
+ try {
+ parent.inputStream.close();
+ } catch (IOException e) {
+ logger.trace(String.format("[%s]: Failure while closing InputStream", name), e);
+ }
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
// Do nothing.
[drill] 03/03: DRILL-6887: Fix FunctionInitializerTest.init()
failure
Posted by am...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
amansinha pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git
commit e4782133563e365c858bcfb2b23845e4b0299dff
Author: Vitalii Diravka <vi...@gmail.com>
AuthorDate: Fri Dec 7 15:55:48 2018 +0200
DRILL-6887: Fix FunctionInitializerTest.init() failure
close apache/drill#1566
---
exec/java-exec/src/test/resources/drill-udf/pom.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/exec/java-exec/src/test/resources/drill-udf/pom.xml b/exec/java-exec/src/test/resources/drill-udf/pom.xml
index 0e25cba..0a68198 100644
--- a/exec/java-exec/src/test/resources/drill-udf/pom.xml
+++ b/exec/java-exec/src/test/resources/drill-udf/pom.xml
@@ -28,6 +28,8 @@
<version>1.0</version>
<properties>
+ <maven.compiler.source>1.8</maven.compiler.source>
+ <maven.compiler.target>1.8</maven.compiler.target>
<jar.finalName>${project.name}</jar.finalName>
<custom.buildDirectory>${project.basedir}/target</custom.buildDirectory>
<drill.version>1.13.0</drill.version>
@@ -58,6 +60,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
+ <version>3.8.0</version>
<configuration>
<includes>
<include>${include.files}</include>