# US 2020/0394163 A1 · Method, device, and computer apparatus for merging regions of hbase table

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2020/0394163 A1
- Document ID: US20200394163A1
- Status: Published application
- Kind: A1
- Application number: 16/977,687
- Filed: 2019-03-19
- Published: 2020-12-17
- Earliest claimed: 2018-03-22
- Assignees: China Unionpay Co., Ltd.
- Applicants: China Unionpay Co., Ltd.
- Inventors: Yaxiong WANG; Jien ZHOU; Yingzhuo WANG
- Web page: https://patentgrep.com/patent/US20200394163A1

## CPC

- G06F 16/182: Distributed file systems
- G06F 16/1844: {Management specifically adapted to replicated file systems}
- G06F 16/134: {Distributed indices}
- G06F 16/215: Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F 16/24556: {Aggregation; Duplicate elimination}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method, a device, and a computer apparatus for merging regions of a HBase table are provided. The method includes acquiring attribute information of HDFS files corresponding to each region in a plurality of regions in the HBase table, where the attribute information of the HDFS files corresponding to one region includes storage space occupied by the files corresponding to the one region, and performing merging processing on every two adjacent regions in the plurality of regions at least according to the storage space occupied by the files corresponding to each region in the plurality of regions. Performing the merging based on the storage space occupied by the files corresponding to the regions in the embodiments of the present disclosure may be beneficial for improving the precision of merging two adjacent regions.

## Claims

### Claim 1

A method for merging regions of a Hadoop distributed file system database (HBase) table, comprising:
acquiring attribute information of Hadoop distributed file system (HDFS) files corresponding to each region in a plurality of regions in the HBase table, wherein the attribute information of the HDFS files corresponding to one region includes storage space occupied by the files corresponding to the one region; and
performing merging processing on every two adjacent regions in the plurality of regions at least according to the storage space occupied by the files corresponding to each region in the plurality of regions.

### Claim 2 (depends on 1)

The method according to claim 1, before performing the merging processing on every two adjacent regions in the plurality of regions at least according to the storage space occupied by the files corresponding to each region in the plurality of regions, further including:
eliminating duplicate regions.

### Claim 3 (depends on 1)

The method according to claim 1, wherein performing the merging processing on every two adjacent regions in the plurality of regions at least according to the storage space occupied by the files corresponding to each region in the plurality of regions includes:
for a first region and a second region, determining a sum of storage space occupied by files corresponding to the first region and the second region, wherein the first region and the second region are any two adjacent regions in the plurality of regions;
determining a first score corresponding to the first region and the second region according to the sum of the storage space occupied by the files and a storage space threshold;
determining a total score corresponding to the first region and the second region at least according to the first score; and
performing the merging processing on the first region and the second region if the total score satisfies a preset value.

### Claim 4 (depends on 3)

The method according to claim 3, wherein:
the attribute information of the HDFS files corresponding to the one region further includes a quantity of files corresponding to the one region;
a sum of quantities of the files corresponding to the first region and the second region is determined;
a second score corresponding to the first region and the second region is determined according to the sum of the file quantities and a file quantity threshold value; and
determining the total score corresponding to the first region and the second region at least according to the first score includes:
determining the total score corresponding to the first region and the second region at least according to the first score and the second score.

### Claim 5 (depends on 4)

The method according to claim 4, wherein:
the attribute information of the HDFS files corresponding to the one region further includes whether a .tmp directory is contained;
a third score corresponding to the first region and the second region is determined according to whether indication information of a .tmp format file is contained in the files corresponding to the first region and the second region; and
determining the total score corresponding to the first region and the second region at least according to the first score includes:
determining the total score corresponding to the first region and the second region at least according to the first score, the second score, and the third score.

### Claim 6

A device for merging regions of a Hadoop distributed file system database (HBase) table, comprising:
an acquiring unit, configured to acquire attribute information of Hadoop distributed file system (HDFS) files corresponding to each region in a plurality of regions in the HBase table, wherein the attribute information of the HDFS files corresponding to one region includes storage space occupied by the files corresponding to the one region; and
a processing unit, configured to perform merging processing on every two adjacent regions in the plurality of regions at least according to the storage space occupied by the files corresponding to each region in the plurality of regions.

### Claim 7 (depends on 6)

The device according to claim 6, wherein:
the processing unit is further configured to:
eliminate duplicate regions.

### Claim 8 (depends on 6)

The device according to claim 6, further including:
a determining unit, configured to:
for a first region and a second region, determine a sum of storage space occupied by files corresponding to the first region and the second region, wherein the first region and the second region are any two adjacent regions in the plurality of regions; and
determine a first score corresponding to the first region and the second region according to the sum of the storage space occupied by the files and a storage space threshold, wherein:
the processing unit is configured to:
determine a total score corresponding to the first region and the second region at least according to the first score and perform the merging processing on the first region and the second region if the total score satisfies a preset value.

### Claim 9 (depends on 8)

The device according to claim 8, wherein:
the attribute information of the HDFS files corresponding to the one region further includes a quantity of files corresponding to the one region;
the determining unit is configured to:
determine a sum of quantities of the files corresponding to the first region and the second region and determine a second score corresponding to the first region and the second region according to the sum of the file quantities and a file quantity threshold value; and
the processing unit is configured to:
determine the total score corresponding to the first region and the second region at least according to the first score and the second score.

### Claim 10 (depends on 9)

The device according to claim 9, wherein:
the attribute information of the HDFS files corresponding to the one region further includes whether a .tmp directory is contained;
the determining unit is configured to:
determine a third score corresponding to the first region and the second region according to whether indication information of a .tmp format file is contained in the files corresponding to the first region and the second region; and
the processing unit is configured to:
determine the total score corresponding to the first region and the second region at least according to the first score, the second score, and the third score.

### Claim 11

A computer equipment, comprising:
a processor and a memory, wherein:
the memory stores one or more executable programs, configured to configure the processor; and
the processor is configured with the one or more executable programs, wherein the one or more executable programs are configured to execute a following method:
acquiring attribute information of Hadoop distributed file system (HDFS) files corresponding to each region in a plurality of regions in the HBase table, wherein the attribute information of the HDFS files corresponding to one region includes storage space occupied by the files corresponding to the one region; and performing merging processing on every two adjacent regions in the plurality of regions at least according to the storage space occupied by the files corresponding to each region in the plurality of regions.

### Claim 12 (depends on 11)

The computer apparatus according to claim 11, wherein:
the processor is further configured to:
eliminate duplicate regions.

### Claim 13 (depends on 11)

The computer apparatus according to claim 11, wherein the processor is further configured to:
for a first region and a second region, determine a sum of storage space occupied by files corresponding to the first region and the second region, wherein the first region and the second region are any two adjacent regions in the plurality of regions; determine a first score corresponding to the first region and the second region according to the sum of the storage space occupied by the files and a storage space threshold; determine a total score corresponding to the first region and the second region at least according to the first score; and perform the merging processing on the first region and the second region if the total score satisfies a preset value.

### Claim 14 (depends on 13)

The computer apparatus according to claim 13, wherein:
the attribute information of the HDFS files corresponding to the one region further includes a quantity of files corresponding to the one region; and
the processor is configured to:
determine a sum of quantities of the files corresponding to the first region and the second region; determine a second score corresponding to the first region and the second region according to the sum of the file quantities and a file quantity threshold value; and determine the total score corresponding to the first region and the second region at least according to the first score and the second score.

### Claim 15 (depends on 14)

The computer apparatus according to claim 14, wherein:
the attribute information of the HDFS files corresponding to the one region further includes whether a .tmp directory is contained;
the processor is configured to:
determine a third score corresponding to the first region and the second region according to whether indication information of a .tmp format file is contained in the files corresponding to the first region and the second region; and determine the total score corresponding to the first region and the second region at least according to the first score, the second score, and the third score.

### Claim 16 (depends on 1)

A computer readable storage medium, wherein:
the computer readable storage medium stores computer executable instructions, and the computer executable instructions are configured to make a computer execute the method according to claim 1.
