计算机与现代化

• 软件工程 • 上一篇    下一篇

基于SQL的HBase查询的设计与实现

  

  1. (1.南开大学计算机与控制工程学院,天津300350;2.天士力集团,天津300402;
    3.天津港信息技术发展有限公司,天津300456)
  • 收稿日期:2016-09-21 出版日期:2017-07-20 发布日期:2017-07-20
  • 作者简介:袁兆争(1992-),男,辽宁辽中人,南开大学计算机与控制工程学院硕士研究生,研究方向:数据挖掘,软件工程; 邵秀丽(1963-),女,江苏南通人,教授,博士生导师,研究方向:人工智能,数据分析,软件工程。
  • 基金资助:
    天津市重大科技专项(14ZXDZGX00867, 15ZXDSGX00090); 天津市互联网先进制造专项(15ZXHLGX00360, 15ZXHLGX00380)

Design and Implementation of HBase Query Based on SQL

  1. (1. College of Computer and Control Engineering, Nankai University, Tianjin 300350, China; 2. Tasly Group, Tianjin 300402, China;
    3. Tianjin Port Information Technology Development Co. Ltd., Tianjin 300456, China)
  • Received:2016-09-21 Online:2017-07-20 Published:2017-07-20

摘要: 在互联网和大数据时代下,SQL关系型数据库已不能适应与日俱增的数据量,HBase等NoSQL数据库变得极为重要。但HBase数据库操作较为复杂,本文设计并实现基于SQL的HBase查询,可以使HBase的使用者通过熟悉的SQL查询语句操作HBase数据库。首先构建SQL语言的编译器,将SQL语句转化成语法树,再将语法树转化为HBase的相关操作。使用协处理器处理SQL查询语句中的聚合函数和复杂表达式,并可以使用连接查询。

关键词: 查询, SQL, HBase

Abstract: In the age of the Internet and big data, SQL relational database can not adapt to the growing amount of data, NoSQL database such as HBase becomes very important. But HBase database operation is more complex, this paper designs and implements a query method of HBase based on SQL, which can enable HBase users to operate the HBase database through the familiar SQL query statement. This paper first builds the compiler of SQL language, translates the SQL statement into the syntax tree, and then translates the syntax tree into the operation of HBase. The coprocessor is used to deal with the aggregate functions and complex expressions in the SQL query statement.

Key words: query, SQL, HBase

中图分类号: