HBASE real-time data barrier-free writing processing method based on reading and writing lock algorithm

A technology of real-time data and processing methods, applied in electrical digital data processing, special data processing applications, computing, etc., can solve the problems of big data accumulation, slow consumption of data queues, etc., and achieve the effect of solving data accumulation

Inactive Publication Date: 2017-12-19
SICHUAN CHANGHONG ELECTRIC CO LTD
View PDF6 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] The purpose of the present invention is to provide a solution to the problem that the real-time write data queue consumption of non-relational databases is too slow to generate a large amount of data accumulation under high concurrency, based on the JAVA language read-write lock algorithm to realize the HBASE barrier-free write processing method, through JAVA language generates a read-write lock algorithm, and writes data to HBASE without barriers in real time

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • HBASE real-time data barrier-free writing processing method based on reading and writing lock algorithm
  • HBASE real-time data barrier-free writing processing method based on reading and writing lock algorithm
  • HBASE real-time data barrier-free writing processing method based on reading and writing lock algorithm

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0036] Embodiment 1: A method for barrier-free writing processing of HBASE real-time data based on the read-write lock algorithm, such as image 3 As shown, the method specifically includes the following steps:

[0037] Using the JAVA programming language to use the read-write lock algorithm, the client defines the automatic refresh submission as false, the buffer list obtains the write lock to store data, enables the scheduled task to obtain the read lock and calls the HBase API to implement the data submission.

[0038] 1) Prohibit HBase merging and splitting through internal packages, configure the value of hbase.hregion.majorcompaction to 0, and do not perform merging (by default, merging is performed once a day); to prohibit splitting, configure the value of hbase.hregion.max.filesize to 500G, the meaning of the configuration item is that when the size of the region is greater than the set value, hbase will start to split, and a region will not exceed this size whe...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses an HBASE real-time data barrier-free writing processing method based on a reading and writing lock algorithm. The method comprises the following steps of 1, banning merging and splitting of HBase through an internal package; 2, defining a global variable; 3, using a constructor; 4, conducting writing processing, wherein a writing lock is added when data is written, the data is stored in a client buffering list, and releasing of the writing lock is completed; 5, conducting reading processing, wherein a reading lock is added when the data is read, the data is submitted to the HBASE server side, and releasing of the reading lock is completed; 6, starting a thread. Compared with the prior art, by the adoption of a JAVA programming language and by utilizing the reading and writing lock algorithm in the JAVA programming language, a client side defines that automatic refreshing of submitting is False, the buffering list obtains the writing lock to store the data, and a timed task is started to obtain the read lock to call an HBase API to achieve submitting of the data. The HBASE real-time data barrier-free writing processing method solves the problem that, since high-concurrency real-time writing data consumption is too slow, stacking of a large amount of data is generated in a queue.

Description

technical field [0001] The invention relates to the application field of computer software programming, in particular to a method for barrier-free writing processing of HBASE real-time data based on a read-write lock algorithm. Background technique [0002] In the process of using HBASE, it is found that when the amount of data written to HBASE is large, it often fails to write in, causing a large amount of data to accumulate in the production queue. However, our HBASE-based application has high requirements for real-time performance. Once HBASE cannot read and write, it will greatly affect the use of the system. The current HBASE multi-threaded writing methods are: [0003] 1) The client side uses setAutoFlush(false) and the size of the cache is XMB. When the table reaches XMB, it can automatically flushCommit; if it is submitted in batches, it can be set to submit every N items; [0004] 2) The client uses setAutoFlush(false) and asynchronous timing refresh submission; ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/44G06F9/52G06F17/30
CPCG06F8/24G06F9/524G06F16/24552G06F16/252
Inventor 熊坪
Owner SICHUAN CHANGHONG ELECTRIC CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products