CN105938487A - Application method and apparatus based on Hbase connection pool - Google Patents

Application method and apparatus based on Hbase connection pool Download PDF

Info

Publication number
CN105938487A
CN105938487A CN201610232340.6A CN201610232340A CN105938487A CN 105938487 A CN105938487 A CN 105938487A CN 201610232340 A CN201610232340 A CN 201610232340A CN 105938487 A CN105938487 A CN 105938487A
Authority
CN
China
Prior art keywords
connection pool
hbase
hbase connection
htableinterface
list
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
CN201610232340.6A
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 Ltd filed Critical Beijing Si Tech Information Technology Co Ltd
Priority to CN201610232340.6A priority Critical patent/CN105938487A/en
Publication of CN105938487A publication Critical patent/CN105938487A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/217Database tuning

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention relates to an application method and apparatus based on an Hbase connection pool. The application method comprises creating the Hbase connection pool through HConnectionManager and ExecutorService; obtaining HtableInterface through HConnection; and connecting the HtableInterface with the Hbase connection pool, and operating lists in the Hbase connection pool. Access speed and concurrency of the Hbase connection pool can be improved.

Description

A kind of using method based on Hbase connection pool and device
Technical field
The present invention relates to computer realm, particularly relate to a kind of using method based on Hbase connection pool And device.
Background technology
Under the background of big data age, the data of process all calculate with T level PB level, tradition Technology to process such order of magnitude data the most unable to do what one wishes, that arise at the historic moment is exactly Hadoop Cluster and this new-type linear database of Hbase.
Comparatively speaking, traditional relevant database has the disadvantages that (1) relational database is adopted Two-dimensional table data model can not effectively process multidimensional data, it is impossible to effectively process internet, applications In semi-structured and non-structured mass data, such as Web page, Email, audio frequency, video etc.. (2) performance of high concurrent reading and writing is low, when relational database reaches certain scale, is very easy to occur The concurrent problem such as deadlock, causes its readwrite performance to decline the most serious.Web2.0 site databases is concurrently born Carry the highest, often to reach up to ten thousand read-write requests per second.Relevant database can be dealt with reluctantly Ten thousand SQL queries, but hard disk I/O often cannot undertake the SQL write data requests of up to ten thousand times.(3) prop up Support finite capacity.(4) extensibility and the availability of data base are low, when the customer volume of an application system The when of growing with each passing day with visit capacity, traditional relevant database is but had no idea as Web Server Scalability and load capacity is come like that simply by the more hardware of interpolation and service node.For very For the system of offer persistent service is provided more, Database Systems is upgraded and extension generally requires Maintenance shut-downs and Data Migration.
Summary of the invention
The technical problem to be solved be to provide a kind of using method based on Hbase connection pool and Device.
The technical scheme is that a kind of based on Hbase connection pool make By method, including: create Hbase even by HConnectionManager and ExecutorService Connect pond;HtableInterface is obtained by HConnection;Described HtableInterface is with described Hbase connection pool is attached, and operates the list in described Hbase connection pool.
Another technical scheme that the present invention solves above-mentioned technical problem is as follows: a kind of based on Hbase connection pool Use device, it is characterised in that including:
Creating unit, for creating by HConnectionManager and ExecutorService Hbase connection pool;
Acquiring unit, for obtaining HtableInterface by HConnection;
Operating unit, is attached with described Hbase connection pool for described HtableInterface, And the list in described Hbase connection pool is operated.
The invention has the beneficial effects as follows: by HConnectionManager and ExecutorService Create Hbase connection pool, obtain HtableInterface by HConnection, HtableInterface is attached with described Hbase connection pool, and in described Hbase connection pool List operate, just Hbase connection pool has been created starting service when, thus has saved Time, and realize being unusual lightweight owing to building HTableInterface by HConnection , so and resource be controlled, so Hbase connection pool is conducted interviews every time operation when The resource consumed is all little, and speed is quickly.
Accompanying drawing explanation
A kind of based on Hbase connection pool the using method flow chart that Fig. 1 provides for the embodiment of the present invention;
A kind of based on Hbase connection pool the use device schematic diagram that Fig. 2 provides for the embodiment of the present invention.
In accompanying drawing, the list of parts representated by each label is as follows:
10, creating unit, 20, acquiring unit, 30, operating unit.
Detailed description of the invention
Being described principle and the feature of the present invention below in conjunction with accompanying drawing, example is served only for explaining this Invention, is not intended to limit the scope of the present invention.
A kind of based on Hbase connection pool the using method flow chart that Fig. 1 provides for the embodiment of the present invention.
With reference to Fig. 1, in step S101, by HConnectionManager and ExecutorService Create Hbase connection pool.
Specifically, HConnectionManager be one can not the class of instantiation, be specifically designed to establishment with Connection between Hbase connection pool.Due to the longest when that the establishment of Hbase connection pool connecting, but Be start service when Hbase connection pool has been created, so use Hbase connection pool time Time is omitted from this part-time,
In step S102, obtain HtableInterface by HConnection.
Specifically, realize being unusual light weight owing to building HTableInterface by HConnection Level, so resource is controlled, conduct interviews to Hbase connection pool operation when institute so every time The resource consumed is all little, and speed is quickly.Therefore, the access speed of Hbase connection pool is improved And concurrency.
In step S103, described HtableInterface is attached with described Hbase connection pool, and List in described Hbase connection pool is operated.
In the present embodiment, described ExecutorService includes java thread pond object, described logical Cross HConnectionManager and ExecutorService establishment Hbase connection pool to include:
By Hbase connection pool described in the configuration information of Hbase cluster and java thread pond Object Creation.
In the present embodiment, described by HConnection obtain HtableInterface include:
Described list is added from described HConnection;
Described HtableInterface is obtained according to described list.
In the present embodiment, described list includes multiple data message, described connects described Hbase List in pond carries out operation and includes:
The plurality of data message in described Hbase connection pool is deleted or changed.
A kind of based on Hbase connection pool the use device schematic diagram that Fig. 2 provides for the embodiment of the present invention.
Use device with reference to Fig. 2, Hbase connection pool includes creating unit 10, acquiring unit 20 and behaviour Make unit 30.
Creating unit 10, for creating by HConnectionManager and ExecutorService Hbase connection pool;
Acquiring unit 20, for obtaining HtableInterface by HConnection;
Operating unit 30, is attached with described Hbase connection pool for described HtableInterface, And the list in described Hbase connection pool is operated.
In the present embodiment, described ExecutorService includes java thread pond object, described establishment Unit 10 includes:
By Hbase connection pool described in the configuration information of Hbase cluster and java thread pond Object Creation.
In the present embodiment, described acquiring unit 20 includes:
Described list is added from described HConnection;
Described HtableInterface is obtained according to described list.
In the present embodiment, described list includes that multiple data message, described operating unit 30 include:
The plurality of data message in described Hbase connection pool is deleted or changed.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all in the present invention Spirit and principle within, any modification, equivalent substitution and improvement etc. made, should be included in this Within bright protection domain.

Claims (8)

1. a using method based on Hbase connection pool, it is characterised in that including:
Hbase connection pool is created by HConnectionManager and ExecutorService;
HtableInterface is obtained by HConnection;
Described HtableInterface is attached with described Hbase connection pool, and to described Hbase even The list connect in pond operates.
A kind of using method based on Hbase connection pool the most according to claim 1, its feature exists In, described ExecutorService includes java thread pond object, described in pass through HConnectionManager and ExecutorService creates Hbase connection pool and includes:
By Hbase connection pool described in the configuration information of Hbase cluster and java thread pond Object Creation.
A kind of using method based on Hbase connection pool the most according to claim 1, its feature exists In, described by HConnection obtain HtableInterface include:
Described list is added from described HConnection;
Described HtableInterface is obtained according to described list.
A kind of using method based on Hbase connection pool the most according to claim 1, its feature exists Include multiple data message in, described list, described list in described Hbase connection pool is carried out Operation includes:
The plurality of data message in described Hbase connection pool is deleted or changed.
5. a use device based on Hbase connection pool, it is characterised in that including:
Creating unit, for creating by HConnectionManager and ExecutorService Hbase connection pool;
Acquiring unit, for obtaining HtableInterface by HConnection;
Operating unit, is attached with described Hbase connection pool for described HtableInterface, And the list in described Hbase connection pool is operated.
A kind of use device based on Hbase connection pool the most according to claim 5, its feature exists In, described ExecutorService includes java thread pond object, and described creating unit includes:
By Hbase connection pool described in the configuration information of Hbase cluster and java thread pond Object Creation.
A kind of use device based on Hbase connection pool the most according to claim 5, its feature exists In, described acquiring unit includes:
Described list is added from described HConnection;
Described HtableInterface is obtained according to described list.
A kind of use device based on Hbase connection pool the most according to claim 5, its feature exists In, described list includes that multiple data message, described operating unit include:
The plurality of data message in described Hbase connection pool is deleted or changed.
CN201610232340.6A 2016-04-14 2016-04-14 Application method and apparatus based on Hbase connection pool Pending CN105938487A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610232340.6A CN105938487A (en) 2016-04-14 2016-04-14 Application method and apparatus based on Hbase connection pool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610232340.6A CN105938487A (en) 2016-04-14 2016-04-14 Application method and apparatus based on Hbase connection pool

Publications (1)

Publication Number Publication Date
CN105938487A true CN105938487A (en) 2016-09-14

Family

ID=57152022

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610232340.6A Pending CN105938487A (en) 2016-04-14 2016-04-14 Application method and apparatus based on Hbase connection pool

Country Status (1)

Country Link
CN (1) CN105938487A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106844535A (en) * 2016-12-30 2017-06-13 南京天谷电气科技有限公司 It is a kind of while accessing the database connection method of different cluster Hbase
CN111245887A (en) * 2019-12-17 2020-06-05 航天信息股份有限公司 Hbase connection dynamic holding method, Hbase connection dynamic holding equipment, Hbase connection dynamic storage medium and Hbase connection dynamic storage system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104376102A (en) * 2014-11-26 2015-02-25 浪潮电子信息产业股份有限公司 Connection method based on python and HBase jdbc
CN104915412A (en) * 2015-06-05 2015-09-16 北京京东尚科信息技术有限公司 Method and system for connecting dynamic management database
CN105930384A (en) * 2016-04-14 2016-09-07 南京理工大学 Sensing cloud data storage system based on Hadoop system and implementation method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104376102A (en) * 2014-11-26 2015-02-25 浪潮电子信息产业股份有限公司 Connection method based on python and HBase jdbc
CN104915412A (en) * 2015-06-05 2015-09-16 北京京东尚科信息技术有限公司 Method and system for connecting dynamic management database
CN105930384A (en) * 2016-04-14 2016-09-07 南京理工大学 Sensing cloud data storage system based on Hadoop system and implementation method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZHOULIYANG35: ""Hbase建立Htable方式分析"", 《道客巴巴:HTTP://WWW.DOC88.COM/P-5866236110483.HTML》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106844535A (en) * 2016-12-30 2017-06-13 南京天谷电气科技有限公司 It is a kind of while accessing the database connection method of different cluster Hbase
CN111245887A (en) * 2019-12-17 2020-06-05 航天信息股份有限公司 Hbase connection dynamic holding method, Hbase connection dynamic holding equipment, Hbase connection dynamic storage medium and Hbase connection dynamic storage system
CN111245887B (en) * 2019-12-17 2022-03-25 航天信息股份有限公司 Hbase connection dynamic holding method, Hbase connection dynamic holding equipment, Hbase connection dynamic storage medium and Hbase connection dynamic storage system

Similar Documents

Publication Publication Date Title
KR102440082B1 (en) Data Sharing and Materialized Views in Databases
US11675780B2 (en) Partition-based scanning of external tables for query processing
US11288267B2 (en) Pluggable storage system for distributed file systems
US11354316B2 (en) Systems and methods for selective scanning of external partitions
US11347728B2 (en) Notifying modifications to external tables in database systems
US20200379994A1 (en) Sharing Materialized Views In Multiple Tenant Database Systems
Li et al. QODM: A query-oriented data modeling approach for NoSQL databases
Zou et al. From a stream of relational queries to distributed stream processing
CN105938487A (en) Application method and apparatus based on Hbase connection pool
US10671636B2 (en) In-memory DB connection support type scheduling method and system for real-time big data analysis in distributed computing environment
Lu et al. Hybrid storage architecture and efficient MapReduce processing for unstructured data
JP2011113103A (en) Multi-tenant type computer system
US11314767B2 (en) Techniques and architectures for managing cascading mutations in an environment having a data lake
US10853419B2 (en) Database with time-dependent graph index
Chang et al. Simplifying Data Migration from Relational Database Management System to Google App Engine Datastore
Jiang et al. A distributed data mining system framework for mobile internet access log based on Hadoop
Xu et al. A New Schema Design Method for Multi-tenant Database

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination