Repository: drill-site Updated Branches: refs/heads/asf-site 680076959 -> 0ed9349ff
Drill Doc Edits Project: http://git-wip-us.apache.org/repos/asf/drill-site/repo Commit: http://git-wip-us.apache.org/repos/asf/drill-site/commit/0ed9349f Tree: http://git-wip-us.apache.org/repos/asf/drill-site/tree/0ed9349f Diff: http://git-wip-us.apache.org/repos/asf/drill-site/diff/0ed9349f Branch: refs/heads/asf-site Commit: 0ed9349ff84a10cb73abcb35d424e3e572f3ac14 Parents: 6800769 Author: Bridget Bevens <[email protected]> Authored: Fri Aug 7 16:03:06 2015 -0700 Committer: Bridget Bevens <[email protected]> Committed: Fri Aug 7 16:03:06 2015 -0700 ---------------------------------------------------------------------- .../index.html | 2 +- .../index.html | 6 +- docs/configuring-user-authentication/index.html | 22 ++-- docs/data-type-conversion/index.html | 110 ++++++++++++++++++- docs/hive-storage-plugin/index.html | 2 +- docs/json-data-model/index.html | 1 - docs/querying-parquet-files/index.html | 16 ++- docs/supported-data-types/index.html | 2 +- feed.xml | 4 +- 9 files changed, 146 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/drill-site/blob/0ed9349f/docs/aggregate-and-aggregate-statistical/index.html ---------------------------------------------------------------------- diff --git a/docs/aggregate-and-aggregate-statistical/index.html b/docs/aggregate-and-aggregate-statistical/index.html index 7fd6d75..08c0766 100644 --- a/docs/aggregate-and-aggregate-statistical/index.html +++ b/docs/aggregate-and-aggregate-statistical/index.html @@ -1268,7 +1268,7 @@ Population variance of input values (the population standard deviated squared)</ Sample variance of input values (sample standard deviation squared)</li> </ul> -<p>These functions take a SMALLINT, INTEGER, BIGINT, FLOAT, DOUBLE, or DECIMAL expression as the argument. If the expression is FLOAT, the function returns DOUBLE; otherwise, the function returns DECIMAL.</p> +<p>These functions take a SMALLINT, INTEGER, BIGINT, FLOAT, DOUBLE, or DECIMAL expression as the argument. If the expression is FLOAT, the function returns DOUBLE; otherwise, the function returns DECIMAL. As previously mentioned, DECIMAL is disabled. You can <a href="docs/supported-data-types/#enabling-the-decimal-type">enable the DECIMAL type</a>, but this is not recommended.</p> http://git-wip-us.apache.org/repos/asf/drill-site/blob/0ed9349f/docs/configuring-resources-for-a-shared-drillbit/index.html ---------------------------------------------------------------------- diff --git a/docs/configuring-resources-for-a-shared-drillbit/index.html b/docs/configuring-resources-for-a-shared-drillbit/index.html index e82fbe1..dcd97c8 100644 --- a/docs/configuring-resources-for-a-shared-drillbit/index.html +++ b/docs/configuring-resources-for-a-shared-drillbit/index.html @@ -1032,15 +1032,15 @@ <p>To configure parallelization, configure the following options in the <code>sys.options</code> table:</p> <ul> -<li><code>planner.width.max.per.node</code><br> +<li><code>planner.width.max_per_node</code><br> The maximum degree of distribution of a query across cores and cluster nodes.</li> -<li><code>planner.width.max.per.query</code><br> +<li><code>planner.width.max_per_query</code><br> Same as max per node but applies to the query as executed by the entire cluster.</li> </ul> <h3 id="planner.width.max_per_node">planner.width.max_per_node</h3> -<p>Configure the <code>planner.width.max.per.node</code> to achieve fine grained, absolute control over parallelization. In this context <em>width</em> refers to fanout or distribution potential: the ability to run a query in parallel across the cores on a node and the nodes on a cluster. A physical plan consists of intermediate operations, known as query "fragments," that run concurrently, yielding opportunities for parallelism above and below each exchange operator in the plan. An exchange operator represents a breakpoint in the execution flow where processing can be distributed. For example, a single-process scan of a file may flow into an exchange operator, followed by a multi-process aggregation fragment.</p> +<p>Configure the <code>planner.width.max_per_node</code> to achieve fine grained, absolute control over parallelization. In this context <em>width</em> refers to fanout or distribution potential: the ability to run a query in parallel across the cores on a node and the nodes on a cluster. A physical plan consists of intermediate operations, known as query "fragments," that run concurrently, yielding opportunities for parallelism above and below each exchange operator in the plan. An exchange operator represents a breakpoint in the execution flow where processing can be distributed. For example, a single-process scan of a file may flow into an exchange operator, followed by a multi-process aggregation fragment.</p> <p>The maximum width per node defines the maximum degree of parallelism for any fragment of a query, but the setting applies at the level of a single node in the cluster. The <em>default</em> maximum degree of parallelism per node is calculated as follows, with the theoretical maximum automatically scaled back (and rounded down) so that only 70% of the actual available capacity is taken into account: number of active drillbits (typically one per node) * number of cores per node * 0.7</p> http://git-wip-us.apache.org/repos/asf/drill-site/blob/0ed9349f/docs/configuring-user-authentication/index.html ---------------------------------------------------------------------- diff --git a/docs/configuring-user-authentication/index.html b/docs/configuring-user-authentication/index.html index 2134500..5fd9df5 100644 --- a/docs/configuring-user-authentication/index.html +++ b/docs/configuring-user-authentication/index.html @@ -1032,19 +1032,27 @@ <h3 id="installing-and-configuring-pam">Installing and Configuring PAM</h3> -<p>Install and configure the provided Drill PAM. Drill only supports the PAM provided here. Optionally, you can <a href="/docs/configuring-user-authentication/#implementing-and-configuring-a-custom-authenticator">build and implement a custom authenticator</a>.</p> +<p>Install and configure the provided Drill PAM. Drill only supports the PAM provided here. Optionally, you can <a href="/docs/configuring-user-authentication/#implementing-and-configuring-a-custom-authenticator">build and implement a custom authenticator</a>. </p> + +<div class="admonition note"> + <p class="first admonition-title">Note</p> + <p class="last">Do not point to an existing directory where other Hadoop components are installed. Other file system libraries can conflict with the Drill libraries and cause system errors. </p> +</div> + <p>Complete the following steps to install and configure PAM for Drill:</p> <ol> <li>Download the <code>tar.gz</code> file for the Linux platform:<br> <a href="http://sourceforge.net/projects/jpam/files/jpam/jpam-1.1/">http://sourceforge.net/projects/jpam/files/jpam/jpam-1.1/</a></li> -<li>Untar the file, and copy the <code>libjpam.so</code> file into a directory.<br> +<li>Untar the file, and copy the <code>libjpam.so</code> file into a directory that does not contain other Hadoop components.<br> Example:<code>/opt/pam/</code></li> -<li>Run the following command, and include the directory where you put the <code>libjpam.so</code> file:<br> -<code>export DRILLBIT_JAVA_OPTS=" -Djava.library.path=<directory>"</code><br> -Example: <code>export DRILLBIT_JAVA_OPTS=" -Djava.library.path=/opt/pam/"</code></li> -<li><p>Add the following block to <code>drill.exec</code> in the <code>drill-override.conf</code> file located in <code><DRILLINSTALL_HOME>/conf/</code>: </p> +<li><p>Add the following line to <code><DRILL_HOME>/conf/drill-env.sh</code>, including the directory where the <code>libjpam.so</code> file is located: </p> + +<p><code>export DRILLBIT_JAVA_OPTS="-Djava.library.path=<directory>"</code> </p> + +<p>Example: <code>export DRILLBIT_JAVA_OPTS="-Djava.library.path=/opt/pam/"</code> </p></li> +<li><p>Add the following configuration to the <code>drill.exec</code> block in <code><DRILL_HOME>/conf/drill-override.conf</code>: </p> <div class="highlight"><pre><code class="language-text" data-lang="text"> drill.exec { security.user.auth { enabled: true, @@ -1134,7 +1142,7 @@ Example: <code>export DRILLBIT_JAVA_OPTS=" -Djava.library.path=/opt/pam/&qu </code></pre></div></li> <li><p>Add the JAR file that you built to the following directory on each Drill node:<br> <code><DRILLINSTALL_HOME>/jars</code></p></li> -<li><p>Add the following block to the <code>drill.exec</code> section in the <code>drill-override.conf</code> file located in <code><DRILLINSTALL_HOME>/conf/</code>: </p> +<li><p>Add the following configuration to the <code>drill.exec</code> block in the <code>drill-override.conf</code> file located in <code><DRILLINSTALL_HOME>/conf/</code>: </p> <div class="highlight"><pre><code class="language-text" data-lang="text"> drill.exec { security.user.auth { enabled: true, http://git-wip-us.apache.org/repos/asf/drill-site/blob/0ed9349f/docs/data-type-conversion/index.html ---------------------------------------------------------------------- diff --git a/docs/data-type-conversion/index.html b/docs/data-type-conversion/index.html index e556160..59854b9 100644 --- a/docs/data-type-conversion/index.html +++ b/docs/data-type-conversion/index.html @@ -1012,6 +1012,7 @@ <ul> <li><a href="/docs/data-type-conversion#cast">CAST</a></li> <li><a href="/docs/data-type-conversion#convert_to-and-convert_from">CONVERT_TO and CONVERT_FROM</a></li> +<li><a href="/docs/data-type-conversion#string_binary-function">STRING_BINARY</a> and <a href="/docs/data-type-conversion#binary_string-function">BINARY_STRING</a></li> <li><a href="/docs/data-type-conversion#other-data-type-conversions">Other Data Type Conversions</a></li> </ul> @@ -1164,6 +1165,8 @@ data as encoded VARBINARY data. To read HBase data in Drill, convert every colum <p>CONVERT_TO also converts an SQL data type to complex types, including HBase byte arrays, JSON and Parquet arrays, and maps. CONVERT_FROM converts from complex types, including HBase arrays, JSON and Parquet arrays and maps to an SQL data type. </p> +<p>Use the BINARY_STRING and STRING_BINARY custom Drill functions with CONVERT_TO and CONVERT_FROM to see readable results of your conversions.</p> + <h3 id="conversion-of-data-types-examples">Conversion of Data Types Examples</h3> <p>This example shows how to use the CONVERT_FROM function to convert complex HBase data to a readable type. The example summarizes and continues the <a href="/docs/querying-hbase">"Query HBase"</a> example. The <a href="/docs/querying-hbase">"Query HBase"</a> example stores the following data in the students table on the Drill Sandbox: </p> @@ -1378,6 +1381,111 @@ FROM tmp.`json2parquet2`; </code></pre></div></li> </ol> +<h2 id="string_binary-function">STRING_BINARY function</h2> + +<p>Converts a VARBINARY type into a hexadecimal-encoded string.</p> + +<h3 id="string_binary-syntax">STRING_BINARY Syntax</h3> +<div class="highlight"><pre><code class="language-text" data-lang="text">STRING_BINARY(expression) +</code></pre></div> +<p><em>expression</em> is a byte array, such as {(byte)0xca, (byte)0xfe, (byte)0xba, (byte)0xbe}</p> + +<p>This function returns a hexadecimal string, such as "\xca\xfe\xba\xbe". You can use this function with CONVERT_TO when you want to test the effects of a conversion.</p> + +<h3 id="string_binary-examples">STRING_BINARY Examples</h3> +<div class="highlight"><pre><code class="language-text" data-lang="text">SELECT + STRING_BINARY(CONVERT_TO(1, 'INT')) as i, + STRING_BINARY(CONVERT_TO(1, 'INT_BE')) as i_be, + STRING_BINARY(CONVERT_TO(1, 'BIGINT')) as l, + STRING_BINARY(CONVERT_TO(1, 'BIGINT')) as l_be, + STRING_BINARY(CONVERT_TO(1, 'INT_HADOOPV')) as l_be +FROM (VALUES (1)); +</code></pre></div> +<p>Output is:</p> +<div class="highlight"><pre><code class="language-text" data-lang="text">+-------------------+-------------------+-----------------------------------+-----------------------------------+--------+ +| i | i_be | l | l_be | l_be0 | ++-------------------+-------------------+-----------------------------------+-----------------------------------+--------+ +| \x01\x00\x00\x00 | \x00\x00\x00\x01 | \x01\x00\x00\x00\x00\x00\x00\x00 | \x01\x00\x00\x00\x00\x00\x00\x00 | \x01 | ++-------------------+-------------------+-----------------------------------+-----------------------------------+--------+ +1 row selected (0.323 seconds) +</code></pre></div> +<p>Encode 'hello' in UTF-8 and UTF-16 VARBINARY encoding and return the results as a VARCHAR.</p> +<div class="highlight"><pre><code class="language-text" data-lang="text">SELECT + STRING_BINARY(CONVERT_TO('hello', 'UTF8')) u8, + STRING_BINARY(CONVERT_TO('hello', 'UTF16')) u16 +FROM (VALUES (1)); +</code></pre></div><div class="highlight"><pre><code class="language-text" data-lang="text">+--------+------------------------------------+ +| u8 | u16 | ++--------+------------------------------------+ +| hello | \xFE\xFF\x00h\x00e\x00l\x00l\x00o | ++--------+------------------------------------+ +1 row selected (0.168 seconds) +</code></pre></div> +<h2 id="binary_string-function">BINARY_STRING function</h2> + +<p>Converts a hexadecimal-encoded string into a VARBINARY type. </p> + +<h3 id="binary_string-syntax">BINARY_STRING Syntax</h3> +<div class="highlight"><pre><code class="language-text" data-lang="text">BINARY_STRING(expression) +</code></pre></div> +<p><em>expression</em> is a hexadecimal string, such as "\xca\xfe\xba\xbe".</p> + +<p>This function returns a byte array, such as {(byte)0xca, (byte)0xfe, (byte)0xba, (byte)0xbe}. You can use this function with CONVERT_FROM for readable results.</p> + +<h3 id="binary_string-example">BINARY_STRING Example</h3> + +<p>Converts a VARBINARY type into a hexadecimal-encoded string.</p> + +<h3 id="binary_string-syntax">BINARY_STRING Syntax</h3> +<div class="highlight"><pre><code class="language-text" data-lang="text">BINARY_STRING(expression) +</code></pre></div> +<p><em>expression</em> is a byte array, such as {(byte)0xca, (byte)0xfe, (byte)0xba, (byte)0xbe}.</p> + +<p>This function returns a hexadecimal-encoded string, such as "\xca\xfe\xba\xbe". You can use this function with CONVERT_TO for readable results.</p> + +<h3 id="binary_string-examples">BINARY_STRING Examples</h3> + +<p>Decode the hexadecimal string 000000C8 expressed in four octets \x00\x00\x00\xC8 into its big endian four-byte integer equivalent. </p> +<div class="highlight"><pre><code class="language-text" data-lang="text">SELECT CONVERT_FROM(BINARY_STRING('\x00\x00\x00\xC8'), 'INT_BE') AS cnvrt +FROM (VALUES (1)); +</code></pre></div> +<p>Output is:</p> +<div class="highlight"><pre><code class="language-text" data-lang="text">+--------+ +| cnvrt | ++--------+ +| 200 | ++--------+ +1 row selected (0.133 seconds) +</code></pre></div> +<p>Decode the same hexadecimal string into its little endian four-byte signed integer equivalent.</p> +<div class="highlight"><pre><code class="language-text" data-lang="text">SELECT CONVERT_FROM(BINARY_STRING('\x00\x00\x00\xC8'), 'INT') AS cnvrt FROM (VALUES (1)); +</code></pre></div> +<p>Output is:</p> +<div class="highlight"><pre><code class="language-text" data-lang="text">+-------------+ +| cnvrt | ++-------------+ +| -939524096 | ++-------------+ +1 row selected (0.133 seconds) +</code></pre></div> +<p>Convert a hexadecimal number BEBAFECA to its decimal equivalent and then to its VARBINARY equivalent, which is how the value is represented in HBase.</p> +<div class="highlight"><pre><code class="language-text" data-lang="text">SELECT CONVERT_FROM(BINARY_STRING('\xBE\xBA\xFE\xCA'), 'INT_BE') FROM (VALUES (1)); + ++--------------+ +| EXPR$0 | ++--------------+ +| -1095041334 | ++--------------+ + +SELECT CONVERT_TO(-1095041334, 'INT_BE') FROM (VALUES (1)); + ++--------------+ +| EXPR$0 | ++--------------+ +| [B@10c24faf | ++--------------+ +1 row selected (0.161 seconds) +</code></pre></div> <h2 id="other-data-type-conversions">Other Data Type Conversions</h2> <p>Drill supports the format for date and time literals shown in the following examples:</p> @@ -1727,7 +1835,7 @@ use in your Drill queries as described in this section:</p> <h3 id="to_date-usage-notes">TO_DATE Usage Notes</h3> -<p>Specify a format using patterns defined in <a href="http://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html">Joda DateTimeFormat class</a>. The TO_TIMESTAMP function takes a Unix epoch timestamp. The TO_DATE function takes a UNIX epoch timestamp in milliseconds.</p> +<p>Specify a format using patterns defined in <a href="http://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html">Joda DateTimeFormat class</a>. The TO_TIMESTAMP function takes a Unix epoch timestamp. The TO_DATE function takes a UNIX epoch timestamp in milliseconds. The <a href="/docs/date-time-functions-and-arithmetic/#unix_timestamp">UNIX_TIMESTAMP</a> function converts a time string to a UNIX timestamp in seconds. </p> <p>To compare dates in the WHERE clause, use TO_DATE on the value in the date column and in the comparison value. For example:</p> <div class="highlight"><pre><code class="language-text" data-lang="text">SELECT <fields> FROM <plugin> WHERE TO_DATE(<field>, <format>) < TO_DATE (<value>, <format>); http://git-wip-us.apache.org/repos/asf/drill-site/blob/0ed9349f/docs/hive-storage-plugin/index.html ---------------------------------------------------------------------- diff --git a/docs/hive-storage-plugin/index.html b/docs/hive-storage-plugin/index.html index 643a1be..3214649 100644 --- a/docs/hive-storage-plugin/index.html +++ b/docs/hive-storage-plugin/index.html @@ -1054,7 +1054,7 @@ in a Hive storage plugin configuration to configure a connection to Drill.</p> <ul> <li><code>hdfs://</code></li> -<li><code>hdfs://<authority>:<port></code></li> +<li><code>hdfs://<hostname>:<port></code></li> </ul></li> <li><p>If you are running Drill and Hive in a secure MapR cluster, remove the following line from the configuration:<br> <code>"hive.metastore.sasl.enabled" : "false"</code></p></li> http://git-wip-us.apache.org/repos/asf/drill-site/blob/0ed9349f/docs/json-data-model/index.html ---------------------------------------------------------------------- diff --git a/docs/json-data-model/index.html b/docs/json-data-model/index.html index 1282a27..6191aee 100644 --- a/docs/json-data-model/index.html +++ b/docs/json-data-model/index.html @@ -1405,7 +1405,6 @@ WHERE t.birth.bearer.max_hdl < 160; <li><a href="/docs/json-data-model/#empty-array">Empty array</a></li> <li><a href="/docs/json-data-model/#lengthy-json-objects">Lengthy JSON objects</a></li> <li><a href="/docs/json-data-model/#complex-json-objects">Complex JSON objects</a></li> -<li><a href="/docs/json-data-model/#nested-column-names">Nested column names</a></li> <li><a href="/docs/json-data-model/#schema-changes">Schema changes</a></li> <li><a href="/docs/json-data-model/#selecting-all-in-a-json-directory-query">Selecting all in a JSON directory query</a></li> </ul> http://git-wip-us.apache.org/repos/asf/drill-site/blob/0ed9349f/docs/querying-parquet-files/index.html ---------------------------------------------------------------------- diff --git a/docs/querying-parquet-files/index.html b/docs/querying-parquet-files/index.html index 2870c59..bb4dd9c 100644 --- a/docs/querying-parquet-files/index.html +++ b/docs/querying-parquet-files/index.html @@ -1007,13 +1007,25 @@ <div class="int_text" align="left"> - <p>Your Drill installation includes a <code>sample-data</code> directory with Parquet files + <!-- Drill 1.2 extends SQL for performant querying of Parquet files. By including a command in a query to cache Parquet file metadata, you trigger the generation of metadata files in the directory of Parquet files and its subdirectories. + +You need to include the command in only the first query of a file or directory. Subsequent can queries return results quickly because Drill refers to the cached metadata. Drill updates metadata automatically when the Parquet files change by comparing timestamps of data. + +To generate metadata, use the following command: + +## Example of Generating Parquet Metadata + + --> + +<h2 id="sample-parquet-files">Sample Parquet Files</h2> + +<p>The Drill installation includes a <code>sample-data</code> directory with Parquet files that you can query. Use SQL syntax to query the <code>region.parquet</code> and <code>nation.parquet</code> files in the <code>sample-data</code> directory.</p> <div class="admonition note"> <p class="first admonition-title">Note</p> - <p class="last">Your Drill installation location may differ from the examples used here. </p> + <p class="last">The Drill installation location may differ from the examples used here. </p> </div> <p>The examples assume that Drill was <a href="/docs/installing-drill-in-embedded-mode">installed in embedded mode</a>. If you installed Drill in distributed mode, or your <code>sample-data</code> directory differs from the location used in the examples. Change the <code>sample-data</code> directory to the correct location before you run the queries.</p> http://git-wip-us.apache.org/repos/asf/drill-site/blob/0ed9349f/docs/supported-data-types/index.html ---------------------------------------------------------------------- diff --git a/docs/supported-data-types/index.html b/docs/supported-data-types/index.html index 64935ea..af365f2 100644 --- a/docs/supported-data-types/index.html +++ b/docs/supported-data-types/index.html @@ -1192,7 +1192,7 @@ Implicitly casts all textual data to VARCHAR.</li> </tr> <tr> <td>2</td> -<td>INTERVLADAY</td> +<td>INTERVALDAY</td> <td>12</td> <td>UINT2</td> </tr> http://git-wip-us.apache.org/repos/asf/drill-site/blob/0ed9349f/feed.xml ---------------------------------------------------------------------- diff --git a/feed.xml b/feed.xml index 189e383..73d22bb 100644 --- a/feed.xml +++ b/feed.xml @@ -6,8 +6,8 @@ </description> <link>/</link> <atom:link href="/feed.xml" rel="self" type="application/rss+xml"/> - <pubDate>Tue, 04 Aug 2015 18:12:18 -0700</pubDate> - <lastBuildDate>Tue, 04 Aug 2015 18:12:18 -0700</lastBuildDate> + <pubDate>Fri, 07 Aug 2015 15:55:52 -0700</pubDate> + <lastBuildDate>Fri, 07 Aug 2015 15:55:52 -0700</lastBuildDate> <generator>Jekyll v2.5.2</generator> <item>
