1.2 update--parquet metadata uncomment update for review
remove comment for review minor edits wordsmithing add missing nested dir info and feature name Anoop's changes DRILL-3618 Bridget's edits impersonation, hiveSP Project: http://git-wip-us.apache.org/repos/asf/drill/repo Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/93ccbc84 Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/93ccbc84 Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/93ccbc84 Branch: refs/heads/gh-pages Commit: 93ccbc8403b3dfcb0c58ad5d134b47ec02dd390c Parents: a6acd38 Author: Kristine Hahn <[email protected]> Authored: Mon Aug 10 17:42:21 2015 -0700 Committer: Kristine Hahn <[email protected]> Committed: Tue Aug 11 13:48:47 2015 -0700 ---------------------------------------------------------------------- _docs/architecture/020-core-modules.md | 8 ++++---- .../070-configuring-user-impersonation.md | 4 ++-- .../070-hive-storage-plugin.md | 2 +- .../040-parquet-format.md | 15 +++++++++++++++ _docs/img/58.png | Bin 35404 -> 35310 bytes _docs/img/DrillbitModules.png | Bin 54907 -> 54615 bytes _docs/img/drill_imp_simple.PNG | Bin 0 -> 34686 bytes .../020-querying-parquet-files.md | 11 +++++++---- 8 files changed, 29 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/drill/blob/93ccbc84/_docs/architecture/020-core-modules.md ---------------------------------------------------------------------- diff --git a/_docs/architecture/020-core-modules.md b/_docs/architecture/020-core-modules.md index 9575400..4c5347f 100644 --- a/_docs/architecture/020-core-modules.md +++ b/_docs/architecture/020-core-modules.md @@ -10,18 +10,18 @@ The following list describes the key components of a Drillbit: * **RPC end point**: Drill exposes a low overhead protobuf-based RPC protocol to communicate with the clients. Additionally, a C++ and Java API layers are also available for the client applications to interact with Drill. Clients can communicate to a specific Drillbit directly or go through a ZooKeeper quorum to discover the available Drillbits before submitting queries. It is recommended that the clients always go through ZooKeeper to shield clients from the intricacies of cluster management, such as the addition or removal of nodes. - * **SQL parser**: Drill uses Optiq, the open source framework, to parse incoming queries. The output of the parser component is a language agnostic, computer-friendly logical plan that represents the query. + * **SQL parser**: Drill uses [Calcite](https://calcite.incubator.apache.org/), the open source framework, to parse incoming queries. The output of the parser component is a language agnostic, computer-friendly logical plan that represents the query. * **Storage plugin interfaces**: Drill serves as a query layer on top of several data sources. Storage plugins in Drill represent the abstractions that Drill uses to interact with the data sources. Storage plugins provide Drill with the following information: * Metadata available in the source * Interfaces for Drill to read from and write to data sources * Location of data and a set of optimization rules to help with efficient and faster execution of Drill queries on a specific data source In the context of Hadoop, Drill provides storage plugins for files and -HBase/M7. Drill also integrates with Hive as a storage plugin since Hive -provides a metadata abstraction layer on top of files, HBase/M7, and provides +HBase. Drill also integrates with Hive as a storage plugin since Hive +provides a metadata abstraction layer on top of files, HBase, and provides libraries to read data and operate on these sources (Serdes and UDFs). - When users query files and HBase/M7 with Drill, they can do it directly or go + When users query files and HBase with Drill, they can do it directly or go through Hive if they have metadata defined there. Drill integration with Hive is only for metadata. Drill does not invoke the Hive execution engine for any requests. http://git-wip-us.apache.org/repos/asf/drill/blob/93ccbc84/_docs/configure-drill/070-configuring-user-impersonation.md ---------------------------------------------------------------------- diff --git a/_docs/configure-drill/070-configuring-user-impersonation.md b/_docs/configure-drill/070-configuring-user-impersonation.md old mode 100755 new mode 100644 index 4c68daa..85c9209 --- a/_docs/configure-drill/070-configuring-user-impersonation.md +++ b/_docs/configure-drill/070-configuring-user-impersonation.md @@ -83,9 +83,9 @@ An administrator can set the maximum number of hops on views to limit the number The following example depicts a scenario where the maximum hop number is set to 3, and Drill must impersonate three users to access data when Chad queries a view that Jane created: - + -In the previous example, Joe created V3 from the views that user Frank created. In the following example, Joe created V3 by joining a view that Frank created with a view that Bob created. +In the previous example, Joe created V2 from the view that user Frank created. In the following example, Joe created V3 by joining a view that Frank created with a view that Bob created.  http://git-wip-us.apache.org/repos/asf/drill/blob/93ccbc84/_docs/connect-a-data-source/070-hive-storage-plugin.md ---------------------------------------------------------------------- diff --git a/_docs/connect-a-data-source/070-hive-storage-plugin.md b/_docs/connect-a-data-source/070-hive-storage-plugin.md index 0954862..ac50040 100644 --- a/_docs/connect-a-data-source/070-hive-storage-plugin.md +++ b/_docs/connect-a-data-source/070-hive-storage-plugin.md @@ -79,6 +79,6 @@ steps: "hive.metastore.sasl.enabled": "false" } } -5. Change the `"fs.default.name"` attribute to specify the default location of files. The value needs to be a URI that is available and capable of handling file system requests. For example, change the local file system URI `"file:///"` to the HDFS URI: `hdfs://`, or to the path on HDFS with a namenode: `hdfs://<authority>:<port>` +5. Change the `"fs.default.name"` attribute to specify the default location of files. The value needs to be a URI that is available and capable of handling file system requests. For example, change the local file system URI `"file:///"` to the HDFS URI: `hdfs://`, or to the path on HDFS with a namenode: `hdfs://<hostname>:<port>` 6. Click **Enable**. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/drill/blob/93ccbc84/_docs/data-sources-and-file-formats/040-parquet-format.md ---------------------------------------------------------------------- diff --git a/_docs/data-sources-and-file-formats/040-parquet-format.md b/_docs/data-sources-and-file-formats/040-parquet-format.md index c9070b7..ff700fb 100644 --- a/_docs/data-sources-and-file-formats/040-parquet-format.md +++ b/_docs/data-sources-and-file-formats/040-parquet-format.md @@ -20,6 +20,21 @@ Apache Drill includes the following support for Parquet: ## Reading Parquet Files When a read of Parquet data occurs, Drill loads only the necessary columns of data, which reduces I/O. Reading only a small piece of the Parquet data from a data file or table, Drill can examine and analyze all values for a column across multiple files. You can create a Drill table from one format and store the data in another format, including Parquet. +## Caching Metadata + +For performant querying of a large number of files, Drill can take advantage of metadata, such as the Hive metadata store, and includes the capability of generating a metadata cache for performant querying of thousands of Parquet files. The metadata cache is not a central caching system, but simply one or more files of metadata. Drill generates and saves a cache of metadata in each directory in nested directories. You trigger the generation of metadata caches by running the REFRESH TABLE METADATA command, as described in [Querying Parquet Files]({{site.baseurl}}/docs/querying-parquet-files/). + +After generating the metadata cache, Drill performs the following tasks during the planning phase for a query on a directory of Parquet files: + +* Finds files. +* Recurses directories. +* Reads the footers of files to get information, such as row counts and HDFS block locations for every file for Drill to assign work based on locality. + When Drill reads the file, it attempts to execute the query on the node where the data rests. +* Summarizes the information from the footers in a single metadata cache file. +* Stores the metadata cache file at each level that covers that particular level and all lower levels. + +At execution time, Drill reads the actual files. At planning time, Drill reads only the metadata file. + ## Writing Parquet Files CREATE TABLE AS (CTAS) can use any data source provided by the storage plugin. To write Parquet data using the CTAS command, set the session store.format option as shown in the next section. Alternatively, configure the storage plugin to point to the directory containing the Parquet files. http://git-wip-us.apache.org/repos/asf/drill/blob/93ccbc84/_docs/img/58.png ---------------------------------------------------------------------- diff --git a/_docs/img/58.png b/_docs/img/58.png index b957927..3975d86 100644 Binary files a/_docs/img/58.png and b/_docs/img/58.png differ http://git-wip-us.apache.org/repos/asf/drill/blob/93ccbc84/_docs/img/DrillbitModules.png ---------------------------------------------------------------------- diff --git a/_docs/img/DrillbitModules.png b/_docs/img/DrillbitModules.png index 2eb9904..4ebdee4 100644 Binary files a/_docs/img/DrillbitModules.png and b/_docs/img/DrillbitModules.png differ http://git-wip-us.apache.org/repos/asf/drill/blob/93ccbc84/_docs/img/drill_imp_simple.PNG ---------------------------------------------------------------------- diff --git a/_docs/img/drill_imp_simple.PNG b/_docs/img/drill_imp_simple.PNG new file mode 100644 index 0000000..664c65a Binary files /dev/null and b/_docs/img/drill_imp_simple.PNG differ http://git-wip-us.apache.org/repos/asf/drill/blob/93ccbc84/_docs/query-data/query-a-file-system/020-querying-parquet-files.md ---------------------------------------------------------------------- diff --git a/_docs/query-data/query-a-file-system/020-querying-parquet-files.md b/_docs/query-data/query-a-file-system/020-querying-parquet-files.md index da029af..30e55f7 100644 --- a/_docs/query-data/query-a-file-system/020-querying-parquet-files.md +++ b/_docs/query-data/query-a-file-system/020-querying-parquet-files.md @@ -3,15 +3,18 @@ title: "Querying Parquet Files" parent: "Querying a File System" --- -<!-- 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. +Drill extends SQL for performant querying of a large number, thousands or more, of Parquet files. By including the following command in a query, 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. + REFRESH TABLE METADATA <path to table> -To generate metadata, use the following command: +You need to include the command in only the first query of a file or directory. Subsequent queries return results quickly because Drill refers to the metadata saved in the cache, as described in [Reading Parquet Files]({{site.baseurl}}/docs/parquet-format/#reading-parquet-files). + +You can query nested directories from any level. For example, you can query a sub-sub-directory of Parquet files because Drill stores a metadata cache of information at each level that covers that particular level and all lower levels. ## Example of Generating Parquet Metadata - --> +TBD (fill in when the feature is ready) + ## Sample Parquet Files The Drill installation includes a `sample-data` directory with Parquet files that you can query. Use SQL syntax to query the `region.parquet` and
