Movatterモバイル変換


[0]ホーム

URL:


CN105069110A - Inquiry display method and system for Hbase and Hive - Google Patents

Inquiry display method and system for Hbase and Hive
Download PDF

Info

Publication number
CN105069110A
CN105069110ACN201510485928.8ACN201510485928ACN105069110ACN 105069110 ACN105069110 ACN 105069110ACN 201510485928 ACN201510485928 ACN 201510485928ACN 105069110 ACN105069110 ACN 105069110A
Authority
CN
China
Prior art keywords
hbase
hive
inquiry
query
query result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510485928.8A
Other languages
Chinese (zh)
Inventor
金晓飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Si Tech Information Technology Co Ltd
Original Assignee
Beijing Si Tech Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Si Tech Information Technology Co LtdfiledCriticalBeijing Si Tech Information Technology Co Ltd
Priority to CN201510485928.8ApriorityCriticalpatent/CN105069110A/en
Publication of CN105069110ApublicationCriticalpatent/CN105069110A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The present invention relates to an inquiry display method and system for Hbase and Hive. The method comprises the following steps of: acquiring an inquiry parameter input by a user; inquiring information in an Hbase database or a Hive tool according to the inquiry parameter to obtain an inquiry result; and displaying the inquiry result. The present invention provides a tool which can be used for conveniently inquiring certain data wanted by the user, so that the inconvenience for utilizing the Hive and the Hbase database is avoided.

Description

The inquiry methods of exhibiting of a kind of Hbase and Hive and system
Technical field
The present invention relates to Hbase database and Hive instrument, particularly the inquiry methods of exhibiting of a kind of Hbase and Hive and system.
Background technology
Under the background of large data age, the data of process all calculate with T level PB level, and the data of traditional technology to the such order of magnitude of process are gradually unable to do what one wishes, and what arise at the historic moment is exactly the new technology such as Hadoop cluster and Hbase, hive.But the operated client of Hbase and hive is friendly not, do not have certain large data platform to use the people on basis to use, and the displaying of data is also friendly not.So in the project that cloud is single in detail, be the instrument of User Exploitation one with inquiry Hbase and hive of friendly interface according to the demand of user, user needed the data of inquiring about to be saved in csv file and check for user.
Summary of the invention
Technical matters to be solved by this invention is to provide inquiry methods of exhibiting and the system of Hbase and the Hive of the data in a kind of fast and easy inquiry Hive and Hbase database.
The technical scheme that the present invention solves the problems of the technologies described above is as follows: the inquiry methods of exhibiting of a kind of Hbase and Hive, comprises the following steps:
Obtain the query argument of user's input;
According to query argument, the information in Hbase database or Hive instrument is inquired about, obtain Query Result;
Query Result is shown.
The invention has the beneficial effects as follows: along with the development of the similar large data items such as the detailed single stored items of cloud, after having widely used Hbase and hive technology, user cannot inquire about traditional oracle database as instrument such as use Plsql etc. and use.The invention provides such a instrument and user can inquire about some data oneself wanted easily, avoid the inconvenience using hive and Hbase database.
On the basis of technique scheme, the present invention can also do following improvement.
Described query argument is enquiry number or SQL statement.
Describedly according to query argument, the information in Hbase database to be inquired about, obtains Query Result and be specially:
When described query argument is enquiry number, by Hbase interface accessing Hbase database, the information in Hbase database is inquired about by rowkey according to enquiry number;
When described query argument is SQL statement, call hive instrument by the mode of JDBC, according to SQL statement, the information in hive instrument is inquired about.
Further, described Query Result is csv file and TXT text.
Further, also comprise in the inquiry methods of exhibiting of described Hbase and Hive: Query Result is generated a ZIP compressed package.
Further, the inquiry display systems of a kind of Hbase and Hive, comprises acquisition module, enquiry module and display module:
Described acquisition module, for obtaining the query argument of user's input;
Described enquiry module, for inquiring about the information in Hbase database according to query argument, obtains Query Result;
Described display module, for showing Query Result.
Further, the query argument in described acquisition module is enquiry number or SQL statement.
Further, described enquiry module specifically for: when described query argument is enquiry number, by Hbase interface accessing Hbase database, the information in Hbase database is inquired about by rowkey according to enquiry number;
When described query argument is SQL statement, call Hive instrument by the mode of JDBC, according to SQL statement, the information in Hive instrument is inquired about.
Further, described Query Result is csv file and TXT text.
Further, also comprise compression module, for Query Result being generated a ZIP compressed package.
Accompanying drawing explanation
Fig. 1 is the inventive method flow chart of steps;
Fig. 2 is present system structural drawing.
In accompanying drawing, the list of parts representated by each label is as follows:
1, acquisition module, 2, enquiry module, 3, display module, 4, compression module.
Embodiment
Be described principle of the present invention and feature below in conjunction with accompanying drawing, example, only for explaining the present invention, is not intended to limit scope of the present invention.
Embodiment 1
As shown in Figure 1, the inquiry methods of exhibiting of a kind of Hbase and Hive, comprises the following steps:
Obtain the query argument of user's input;
According to query argument, the information in Hbase database is inquired about, obtain Query Result;
Query Result is shown.
Described query argument is enquiry number or SQL statement.
Describedly according to query argument, the information in Hbase database to be inquired about, obtain Query Result to be specially: when described query argument is enquiry number, by Hbase interface accessing Hbase database, the information in Hbase database is inquired about by rowkey according to enquiry number;
When described query argument is SQL statement, access Hbase database by the mode of JDBC, by hive instrument, the information in Hbase database is inquired about according to SQL statement.
Described Query Result is csv file and TXT text.
Also comprise in the inquiry methods of exhibiting of described Hbase and Hive: Query Result is generated a ZIP compressed package.
As shown in Figure 2, the inquiry display systems of a kind of Hbase and Hive, comprises acquisition module 1, enquiry module 2 and display module 3:
Described acquisition module 1, for obtaining the query argument of user's input;
Described enquiry module 2, for inquiring about the information in Hbase database according to query argument, obtains Query Result;
Described display module 3, for showing Query Result.
Query argument in described acquisition module 1 is enquiry number or SQL statement.
Described enquiry module 2 specifically for: when described query argument is enquiry number, by Hbase interface accessing Hbase database, the information in Hbase database is inquired about by rowkey according to enquiry number;
When described query argument is SQL statement, call Hive instrument by the mode of JDBC, according to SQL statement, the information in Hive instrument is inquired about.
Described Query Result is csv file and TXT text.
Also comprise compression module 4, for Query Result being generated a ZIP compressed package.
Concrete in real time in, the present invention adopts jdbc and HbaseAPI to inquire about hive and Hbase, and foreground adopts J2EE framework, uses the friendly page to inquire about.
Step 1: in charge number or the SQL statement of front end input inquiry
Step 2: click inquire button, charge number or SQL statement are passed to backstage, accesses Hbase by HbaseAPI when importing charge number into, by rowkey, Hbase information is inquired about; Access hive client by the mode of JDBC when importing SQL into, by hive, analysis and consult is carried out to SQL statement.
Step 3: Query Result is generated csv file and the carefully and neatly done TXT text of a correspondence, then by csv file and TXT file generated ZIP compressed package.
Step 4: download and obtain Query Result.
Step 5: check Query Result, Query Result is the neat TXT text of csv file and form.
Undertaken arranging querying condition by a part of rowkey, Hbase database is inquired about.Such as: use charge number as querying condition, charge number is just first 20 in rowkey, so just can inquire corresponding result fast by rowkey.
By SQL input, hive is inquired about.
Under the present invention needs to be deployed in tomcat or WebLogic, this main frame needs install JDK and can access Hadoop cluster.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

CN201510485928.8A2015-08-102015-08-10Inquiry display method and system for Hbase and HivePendingCN105069110A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201510485928.8ACN105069110A (en)2015-08-102015-08-10Inquiry display method and system for Hbase and Hive

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201510485928.8ACN105069110A (en)2015-08-102015-08-10Inquiry display method and system for Hbase and Hive

Publications (1)

Publication NumberPublication Date
CN105069110Atrue CN105069110A (en)2015-11-18

Family

ID=54498480

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201510485928.8APendingCN105069110A (en)2015-08-102015-08-10Inquiry display method and system for Hbase and Hive

Country Status (1)

CountryLink
CN (1)CN105069110A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101271473A (en)*2008-04-292008-09-24华为技术有限公司 Data query method, device and system
CN103034658A (en)*2011-09-292013-04-10福建睿能电子有限公司Method and system for querying data and exporting report
CN104239368A (en)*2013-06-212014-12-24苏州精易会信息技术有限公司Form data inquiring method based on setting

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101271473A (en)*2008-04-292008-09-24华为技术有限公司 Data query method, device and system
CN103034658A (en)*2011-09-292013-04-10福建睿能电子有限公司Method and system for querying data and exporting report
CN104239368A (en)*2013-06-212014-12-24苏州精易会信息技术有限公司Form data inquiring method based on setting

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
杜晓东: "大数据环境下基于Hbase的分布式查询优化研究", 《计算机光盘软件与应用》*
赵晓峰主编: "《数据库原理与运用基础教程》", 30 September 2014, 对外经济贸易大学出*

Similar Documents

PublicationPublication DateTitle
US11354314B2 (en)Method for connecting a relational data store's meta data with hadoop
US11507583B2 (en)Tuple extraction using dynamically generated extractor classes
CN104123374B (en)The method and device of aggregate query in distributed data base
CN107273369B (en)Table data modification method and device
CN104516979B (en)A kind of data query method and system based on quadratic search
EP2686764A1 (en)Data source analytics
US9158786B1 (en)Database selection system and method to automatically adjust a database schema based on an input data
CN103729463A (en)Method for implementing full-text retrieval based on Lucene and Solr
EP2778968B1 (en)Mobile telecommunication device remote access to cloud-based or virtualized database systems
Fernández-García et al.A flexible data acquisition system for storing the interactions on mashup user interfaces
CN110895591B (en)Method and device for positioning self-lifting point
CN105760380A (en)Database query method, device and system
CN104820697A (en)Medical data mining method and system
US9159052B2 (en)Generalizing formats of business data queries and results
CN103955498A (en)Search engine creating method and device
Choi et al.Improving Database System Performance by Applying NoSQL.
CN104714983B (en)The generation method and device of distributed index
CN110704481B (en)Method and device for displaying data
US10372709B2 (en)Estimating string intersections for database systems
CN106294435A (en)A kind of cloud Content Management System based on PaaS cloud platform
CN104462588A (en)Intellectual property retrieval system based on cloud database
CN105069110A (en)Inquiry display method and system for Hbase and Hive
CN105205060A (en)Method and device for generating word document database dictionary
Haque et al.Distributed RDF triple store using hbase and hive
US9058344B2 (en)Supporting flexible types in a database

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20151118


[8]ページ先頭

©2009-2025 Movatter.jp