Apache Drill介绍--101基本内容

浏览: 3188

最近看了一下Apache Drill方面的内容,近期会做一下这方面的介绍。

总体介绍:

Apache Drill我的理解就是一个data federation的工具,可以用于数据探索方面、快速开发方面的工作,优点是和大数据平台紧密集合,并且在odbc/jdbc上支持标准的SQL语句,这一点还是很有用的。


以下是官网(http://drill.apache.org/docs/drill-introduction/)的总体介绍:

Drill is an Apache open-source SQL query engine for Big Data exploration. Drill is designed from the ground up to support high-performance analysis on the semi-structured and rapidly evolving data coming from modern Big Data applications, while still providing the familiarity and ecosystem of ANSI SQL, the industry-standard query language. Drill provides plug-and-play integration with existing Apache Hive and Apache HBase deployments. 

Drill 1.8支持的数据源:

cp: JAR包中的文件,示例数据就是一个jar包中的json文件
dfs:直接访问文件,可以是本地也可以是分布式系统里
RDBMS:Postgres, MySQL, Oracle, MSSQL and Apache Derby
hbase、hive、mongo

可以在http://ip:8047/storage维护,维护界面如下:

接口的jar包:


embedded mode安装

今天介绍一下embedded mode下的应用,这种模式主要用于各类验证工作。

内容主要参照 Drill in 10 Minutes(http://drill.apache.org/docs/drill-in-10-minutes/

我使用的操作系统是Centos 6.5, 使用Apache Drill 1.8版本

1.准备工作

(1)java 1.7及以上
(2)下载并解压
官网下载  http://drill.apache.org,我用了是.8版本,解压
tar -xvf apache-drill-1.8.0.tar.gz


2.启动服务:

cd /pythontest/
cd apache-drill-1.8.0
export PATH=$PATH:/pythontest/jdk1.8.0_91/bin
bin/drill-embedded

3.简单查询:

系统自带了一个示例JSON文件:employee.json,存储在$installfiles/jars/3rdparty/foodmart-data-json.0.4.jar

SELECT employee_id ,full_name,salary FROM cp.`employee.json` LIMIT 3;

4.关闭服务:

!quit

完整过程示例:

推荐 0
本文由 seng 创作,采用 知识共享署名-相同方式共享 3.0 中国大陆许可协议 进行许可。
转载、引用前需联系作者,并署名作者且注明文章出处。
本站文章版权归原作者及原出处所有 。内容为作者个人观点, 并不代表本站赞同其观点和对其真实性负责。本站是一个个人学习交流的平台,并不用于任何商业目的,如果有任何问题,请及时联系我们,我们将根据著作权人的要求,立即更正或者删除有关内容。本站拥有对此声明的最终解释权。

0 个评论

要回复文章请先登录注册