CN107943412A - A kind of subregion division, the method, apparatus and system for deleting data file in subregion - Google Patents

A kind of subregion division, the method, apparatus and system for deleting data file in subregion Download PDF

Info

Publication number
CN107943412A
CN107943412A CN201610891411.3A CN201610891411A CN107943412A CN 107943412 A CN107943412 A CN 107943412A CN 201610891411 A CN201610891411 A CN 201610891411A CN 107943412 A CN107943412 A CN 107943412A
Authority
CN
China
Prior art keywords
subregion
data file
file
mapping link
new partition
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.)
Granted
Application number
CN201610891411.3A
Other languages
Chinese (zh)
Other versions
CN107943412B (en
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201610891411.3A priority Critical patent/CN107943412B/en
Publication of CN107943412A publication Critical patent/CN107943412A/en
Application granted granted Critical
Publication of CN107943412B publication Critical patent/CN107943412B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Abstract

The method, apparatus of data file and a kind of partition management system in method, apparatus, a kind of deletion subregion this application discloses a kind of division of subregion.Wherein, the method for the subregion division, including:Obtain the data file of the first subregion;Obtain the data file of new partition;The data file of the new partition and the data file of first subregion are linked, to create the linking relationship of the new partition and first subregion.The technical solution instead of existing reference document by creating linking relationship, solve since subregion splitting time is related with number of files, and fission process is comparatively laborious, and subregion division efficiency it is low the problem of;Particularly if when user's request is uprushed, linking relationship is created by new partition and first by stages so that new partition can carry out continuous several times division.

Description

A kind of subregion division, the method, apparatus and system for deleting data file in subregion
Technical field
This application involves communication information technical field, and in particular in a kind of method of subregion division, a kind of deletion subregion The method of data file and a kind of partition management system;The application is related to a kind of device of subregion division at the same time and one kind is deleted Except the device of data file in subregion.
Background technology
As the development of the communication technology makes data magnanimity increase severely, big data already becomes current focus.In big data In required technology, distributed file system, distributed data base etc. are all the technologies being applicable under big data background.
Under big data quantity in distributed file system, distributed NOSQL databases have very high readwrite performance, This has benefited from its irrelevant property, and the structure of database is simple.In distributed NOSQL databases, a subregion only can be by one Platform machine loads work.But with the increase that user asks, a subregion can not meet demand for services, need to divide at this time Differentiation is cleaved into 2 or multiple to meet demand for services, but can not provide service, user during subregion divides Access request can all fail.Subregion division be by the way that a subregion is split into multiple subregions after, offline original subregion, makes Divide the service that the new subregion is reached the standard grade so that the write-in pressure of raw partition is shared on different subregions, breaks through single partition The limit of disposal ability.At present, the automatic division scheme of NOSQL databases is:Each data file is created when subregion divides Reference document, and split point is write hereof, after the reference document of all data files creates, the division of subregion is complete Into.When loading new subregion, reference document can be converted into real data file one by one.It is replaced by very in all reference documents Before positive data file, new subregion cannot be divided again.
It can be seen from the above that under the subregion division scheme of existing NOSQL databases, there are problems with:Subregion splitting time It is related with number of files, a reference document will be created for each data file, each data file creates reference document all There is IO, fission process is comparatively laborious, and in loading reference document can be converted into real data file one by one, also needs to carry out Multiple IO, the efficiency of subregion division are low.Particularly if user request uprush, subregion may need repeatedly to be divided, when point When reference document is also included in area, which can not be split off.
The content of the invention
The application provides the method for data file and a kind of subregion in a kind of method of subregion division, a kind of deletion subregion Management system, to solve the above problem of the prior art.The application is related to a kind of device and one kind of subregion division at the same time Delete the device of data file in subregion.
This application provides a kind of method of subregion division, the method for the subregion division, including:
Obtain the data file of the first subregion;
Obtain the data file of new partition;
The data file of the new partition and the data file of first subregion are linked, it is described newly-built to create The linking relationship of subregion and first subregion.
Optionally, the data file, including:Physical file and mapping link file.
Optionally, the data file by the new partition and the data file of first subregion are linked, bag Include:
Mapping link file in the new partition is directed toward the data file in first subregion.
Optionally, the data file of the data file by new partition and first subregion is linked the step of Before, including:
Judge whether the data file in first subregion is mapping link file;
If so, the data file being then directed toward the mapping link file in the new partition in first subregion is directed toward Upper level data file, to create the linking relationship of the new partition and the upper level subregion;
If it is not, the step that the data file for then performing the data file by new partition and first subregion is linked Suddenly.
Optionally, the linking relationship for creating the new partition and first subregion, including:
Mapping link set is created in the new partition;The mapping link set includes:In the new partition In mapping link file;
Created for the new partition and be directed toward the data file institute that mapping link file is directed toward in the mapping link set The first subregion mapping link.
Optionally, after described the step of mapping link set is created in the new partition, including:
Persistence operation is performed to the mapping link set.
Optionally, it is directed toward mapping link file direction in the mapping link set in described created for the new partition Data file where the first subregion mapping link the step of after, including:
The feedback information of the first subregion completion division is sent to main service processes;
Receive the subregion dispatch request that the main service processes are sent;
The access request to the subregion divided is prevented, and new partition connection is entered into Database Systems.
Optionally, before the step of data file of the first subregion of the acquisition, including:
For at least two new partition of the first partition creating.
Optionally, described is at least two new partition of the first partition creating, including:
Travel through the load pressure of each storage server connected in Database Systems;
The storage server that load pressure is less than default threshold value is obtained, is described first point in the storage server Area creates two new partitions.
Optionally, it is linked in the data file by the new partition and the data file of first subregion, After the step of to create the linking relationship of the new partition and first subregion, including:
Create data file in the new partition;The data file includes physical file.
Correspondingly, present invention also provides the device that a kind of device of subregion division, the subregion divide, including:
First data file obtaining unit, for obtaining the data file of the first subregion;
Newdata file obtaining unit, for obtaining the data file of new partition;
Linking relationship creating unit, for by the data file of the data file of the new partition and first subregion It is linked, to create the linking relationship of the new partition and first subregion.
Optionally, the data file obtaining unit, physical file and mapping chain specifically for obtaining the first subregion Connect file.
Optionally, the linking relationship creating unit, specifically for the mapping link file in the new partition is referred to The data file into first subregion.
Optionally, the device of subregion division, further includes:
Mapping link file judgment sub-unit, in the data file by new partition and first subregion Before data file is linked, judge whether the data file in first subregion is mapping link file;
Mapping link is directed toward subelement, for receiving the judging result of the mapping link file judgment sub-unit, if so, The upper level data that the data file then the mapping link file in the new partition being directed toward in first subregion is directed toward File, to create the linking relationship of the new partition and the upper level subregion;
Mapping link relation creates triggering subelement, for receiving the judgement knot of the mapping link file judgment sub-unit Fruit, if it is not, then triggering the linking relationship creating unit.
Optionally, the linking relationship creating unit, further includes:
Set creates subelement, for creating mapping link set in the new partition;The mapping link set Including:Mapping link file in the new partition;
Subregion mapping creates subelement, maps chain for creating to be directed toward in the mapping link set for the new partition Connect file direction data file where the first subregion mapping link.
Optionally, the linking relationship creating unit, further includes:
Persistence subelement, after creating mapping link set in the new partition, to the mapping link Set performs persistence operation.
Optionally, the device of subregion division, further includes:
Feedback information transmitting element, mapping link in the mapping link set is directed toward for being created for the new partition After the mapping link of the first subregion where the data file that file is directed toward, send the first subregion to main service processes and complete to divide The feedback information split;
Dispatch request receiving unit, the subregion dispatch request sent for receiving the main service processes;
Offline unit on subregion, for preventing the access request to the subregion divided, and new partition is connected and is entered Database Systems.
Optionally, the device of subregion division, further includes:
Subregion creates unit, for being first partition creating before the data file of the first subregion of the acquisition At least two new partitions.
Optionally, the subregion creates unit, including:
Load pressure travels through subelement, for traveling through the load pressure of each storage server connected in Database Systems Power;
Partition creating subelement, the storage server of default threshold value is less than for obtaining load pressure, in the storage It is described first partition creating, two new partitions in server.
Optionally, the device of subregion division, further includes:
Physical file creating unit, for by the data file of the data file of the new partition and first subregion It is linked, to create the new partition with after the linking relationship of first subregion, number is created in the new partition According to file;The data file includes physical file.
In addition, present invention also provides a kind of method for deleting data file in subregion, it is described to delete data text in subregion The method of part, including:
Receive the instruction for deleting data file;
Judge the type of the data file;
If the type of the data file is physical file, the number is deleted in the subregion for storing the data file According to file;
If the type of the data file is mapping link file, in the mapping chain for the subregion for storing the data file Connect in set and delete the data file.
Optionally, described the data file is deleted in the mapping link set of subregion of the data file is stored The step of after, including:
Judge whether there is the upper level being directed toward pointed by the deleted data file in the mapping link set The mapping link file of other data files in subregion where data file;
If it is not, then delete deleted the data file subregion be directed toward it is upper pointed by the deleted data file The mapping link of subregion where level one data file.
Optionally, it is directed toward the deleted data file meaning in the subregion for having deleted the data file To upper level data file where subregion mapping link the step of after, including:
Judge in main service processes with the presence or absence of the upper level data being directed toward pointed by the deleted data file The mapping link of subregion where file;
If it is not, then delete the data file stored in the subregion.
Correspondingly, present invention also provides a kind of device for deleting data file in subregion, it is described to delete data in subregion The device of file, including:
Instruction reception unit is deleted, the instruction of data file is deleted for receiving;
Type judging unit, for judging the type of the data file;
Physical file deletes unit, for receiving the judging result of the type judging unit, if the data file Type is physical file, then deletes the data file in the subregion for storing the data file;
Mapping link file deletes unit, for receiving the judging result of the type judging unit, if the data are literary The type of part is mapping link file, then deletes the data in the mapping link set of subregion of the data file is stored File.
Optionally, the device for deleting data file in subregion, further includes:
Subregion judging unit, for deleting institute in the mapping link set of subregion of the data file is stored described After stating data file, judge whether to have in the mapping link set and be directed toward pointed by the deleted data file The mapping link file of other data files in subregion where upper level data file;
Unit is deleted in subregion link, for receiving the judging result of the subregion judging unit, has been deleted if it is not, then deleting The subregion of the data file is directed toward the subregion where the upper level data file pointed by the deleted data file Mapping link.
Optionally, the device for deleting data file in subregion, further includes:
Mapping link judging unit, for being directed toward deleted institute in the subregion for having deleted the data file After the mapping link for stating the subregion where the upper level data file pointed by data file, judge be in main service processes The mapping link of subregion where the no upper level data file existed pointed by the deleted data file of direction;
Data file deletes unit, for receiving the judging result of the mapping link judging unit, if it is not, then deleting institute State the data file stored in subregion.
In addition, present invention also provides a kind of partition management system, the partition management system, including:
The device of subregion division according to any of the above-described;And
The device for deleting data file in subregion according to any of the above-described.
Compared with prior art, the application has the following advantages:
Method, apparatus, a kind of method, apparatus for deleting data file in subregion for a kind of subregion division that the application provides And a kind of partition management system, by the data file for obtaining the first subregion;Obtain the data file of new partition;By described in The data file of new partition and the data file of first subregion are linked, to create the new partition and described first The linking relationship of subregion.The technical solution instead of existing reference document by creating linking relationship, solve due to dividing Area's splitting time is related with number of files, and fission process is comparatively laborious, and subregion division efficiency it is low the problem of;Particularly if with When family request is uprushed, linking relationship is created by new partition and first by stages so that new partition can be connected Continuous repeatedly division.
Brief description of the drawings
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, below will be to embodiment or existing There is attached drawing needed in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments described in application, for those of ordinary skill in the art, can also obtain other according to these attached drawings Attached drawing.
Fig. 1 shows the flow chart of the method for the subregion division provided according to an embodiment of the present application;
Fig. 2 shows that what is provided according to an embodiment of the present application creates the direction data file in the new partition Mapping link file flow chart;
Fig. 3 shows that what is provided according to an embodiment of the present application makes what mapping link file was directed toward in the new partition The schematic diagram of upper level data file;
Fig. 4 shows that what is provided according to an embodiment of the present application makes the new partition associated with the data file The flow chart of partition creating linking relationship;
Fig. 5 show provide according to an embodiment of the present application at least two new partition of the first partition creating Flow chart;
Fig. 6 shows the stream being scheduled to the subregion after division and new subregion provided according to an embodiment of the present application Cheng Tu;
Fig. 7 shows the schematic diagram of the device of the subregion division provided according to an embodiment of the present application;
Fig. 8 shows that what is provided according to an embodiment of the present application deletes the flow chart of the method for data file in subregion;
Fig. 9 shows the flow chart of the mapping link of the deletion subregion provided according to an embodiment of the present application;
Figure 10 shows the flow chart of the data file stored in the deletion subregion provided according to an embodiment of the present application;
Figure 11 shows that what is provided according to an embodiment of the present application deletes the schematic diagram of the device of data file in subregion;
Figure 12 shows the schematic diagram of the partition management system provided according to an embodiment of the present application.
Embodiment
It is below in conjunction with the accompanying drawings and specific real in order to be more clearly understood that the above-mentioned purpose of the application, feature and advantage Mode is applied the application is further described in detail.It should be noted that in the case where there is no conflict, the implementation of the application Feature in example and embodiment can be mutually combined.
Many details are elaborated in the following description in order to fully understand the application.But the application can Much to implement different from other manner described here, those skilled in the art can be in the feelings without prejudice to the application intension Similar popularization is done under condition, therefore, the application from following public specific implementation limitation.
Embodiments herein provide a kind of method of subregion division, a kind of method for deleting data file in subregion with A kind of and partition management system;The application is related to a kind of device of subregion division at the same time and one kind deletes data file in subregion Device.It is described in detail one by one in the following embodiments.
At present, the automatic division scheme of NOSQL databases is:Citation is created to each data file when subregion divides Part, and split point is write hereof, after the reference document of all data files creates, the division of subregion is completed.Add When carrying new subregion, reference document can be converted into real data file one by one.It is replaced by really in all reference documents Before data file, new subregion cannot be divided again.It can be seen from the above that the subregion in existing NOSQL databases divides scheme Under, there are problems with:Subregion splitting time is related with number of files, and a citation will be created for each data file Part, each data file, which creates reference document, IO, and fission process is comparatively laborious, and can be by reference document one by one in loading Real data file is converted into, also needs to carry out multiple IO, the efficiency of subregion division is low.Particularly if user's request is uprushed, Subregion may need repeatedly to be divided, and when also including reference document in subregion, which can not be split off.Asked for this Topic, the technical solution of the application make whole process by the method for new partition and first by stages establishment linking relationship In need not copy data file, greatly shorten not serviceable time, and existing reference is instead of by creating linking relationship File so that new partition can continue to repeatedly divide, it is achieved thereby that the subregion energy that subregion can quickly divide, divide The function of enough continuous several times divisions.
Before the specific steps of the present embodiment are described in detail, the understanding to the technical program for convenience, first to NOSQL Database is briefly described.
NOSQL (Not Only SQL) database refers to the database of non-relational, is a kind of typical distributed data Storehouse.The generation of non-relational database is exactly in order to solve the challenge that large-scale data set multiple data species is brought, especially It is big data application problem.Distributed data base system can individually be put usually using less computer system, every computer May all there are a complete copy copy of DBMS, or copied part copy in a place, in every computer, and have Oneself local database, many computers positioned at different location are interconnected by network, collectively constitute one it is complete, The global large database concentrated, be physically distributed in logic.NOSQL databases have four following macrotaxonomies:Key assignments (Key-Value) store database, this kind of database can be mainly used to a Hash table, have in this table one it is specific Key and a pointer are directed toward specific data.Advantage of the Key/value models for IT system is simple, easy deployment; Column storage database, is typically used for tackling the mass data of distributed storage.Key still has, but they the characteristics of refer to To multiple row.These row are arranged by arranging family;Document image analysis, it stores similar with the first key assignments.Should The data model of type is the document of versioned, and semi-structured document is stored with specific form, such as JSON;Figure (Graph) database, the database of graphic structure is different with the SQL database of other ranks and rigid structure, it is to use Flexible graphical model, and can expand on multiple servers.NOSQL databases do not have the query language (SQL) of standard, Therefore carrying out data base querying needs to formulate data model.Many NOSQL databases have the data-interface of REST formulas or look into Ask API.
Embodiments herein provides a kind of method of subregion division, and the purpose is to solve the big subregion division of multifile The problem of serviceable time is not long under scene and needs repeatedly division, this method are by creating link relational implementation subregion point Split, when dividing subregion using this method, subregion can be enable quickly to divide, moreover it is possible to enable the subregion that has divided continuously more Secondary division.The embodiment of the method for the subregion division is as follows:
Please refer to Fig.1, it illustrates the flow chart of the method for the subregion division provided according to an embodiment of the present application.
The method of the subregion division includes:
Step S101, obtains the data file of the first subregion.
In the present embodiment, the data file for obtaining the first subregion, can realize in the following way:Described in acquisition The lists of documents of first subregion, obtain the whole numbers recorded in first subregion from the lists of documents of first subregion According to file.
Such as:After the lists of documents for obtaining the first subregion B, institute is obtained from the lists of documents of the first subregion B State in the first subregion B and store data file B1, B2, B3, B4.
It should be noted that deposit in same node relative to by data, NOSQL databases need by data file into Row partitioned storage, data file is dispersed in above multiple nodes.And usually while subregion will also to data file into Row replicates.Parallel performance is so not only improved, but also can guarantee that do not have the problem of single point failure.In the present embodiment, described first Subregion is the big subregion that multifile is stored in NOSQL databases.Wherein, subregion division is a kind of important in distributed system Technology, usually considers with together with Autonomic Migration Framework and load balancing.Division makes a subregion become multiple child partitions, in its former subregion Data file owned by each child partition.The access that automatic division can solve a subregion exceedes single machine (storage clothes Be engaged in device) disposal ability the problem of.
In the present embodiment, the data file includes at least two kinds of files:Physical file and mapping link file.Its In, the physical file is the data file of actual storage in subregion in NOSQL databases, such as:In key assignments (Key- Value) store in database, the data file being made of key (Key) and value (Value), wherein, Key and Value are in logic Man-to-man relation, for Key equivalent to the index of data file, Value is the content of the data file representated by Key;It is described to reflect Penetrate the mapping link that threaded file (linkfile) is the data file in the former subregion before the direction division in current bay File, the mapping link file are not a real physical file, simply be there is logically.
It should be understood that the physical file is the authentic document of physical presence, it is that subregion writes and stores after creation Data file in subregion;The mapping link file is directed to the mapped file of physical file, and the first subregion is being split into During two new subregions, the entire data files being stored in first subregion can be all assigned in two new subregions, due to It is not copying to data file in new subregion, but created in new subregion when data file is assigned in new subregion The mapping link file for the data file being directed toward in first subregion, the data file in the subregion being split off is accessed When, the actual storage of the mapping link file access for being directed toward the data file in new subregion to the data file can be passed through Address.
It should be noted that due to each subregion have access profile mark, so when creating new subregion, it is necessary to For the mark of new partition creating access profile.Such as:Data file B1, B2, B3, B4, access profile are stored in first subregion B Be [begin, end), for the first subregion B create two new subregion C, D after, will be stored in the first subregion B data file B1, B2, B3, B4 link to subregion C, D respectively, and the split point of the access profile of the first subregion B is mid, then the access of new partition C Scope be [begin, mid), the access profile of new partition D be [mid, end), then data file B1 is accessed extremely by subregion C During B4, only access profile [begin, mid) in data file can be read, equally, pass through subregion D access B1 to B4 When, only access profile [mid, end) in data can be read.
Step S103, obtains the data file of new partition.
In the present embodiment, the new partition refers to:First subregion is provided in division for first subregion At least two new subregions.The new partition is when creating, the quantity wound of data file that can be in first subregion The data file of quantity such as build, the data file of establishment is mapping link file.
Specifically, the data file of the quantity such as establishment, can realize in the following way:Obtain the text of first subregion Part inventory, according to the mapping chain of the quantity such as the number establishment of data file in first subregion recorded in the lists of documents Connect file.
Such as:Data file B1, B2 in the first subregion B recorded in the lists of documents of the first subregion B, B3, The number of B4 be 4, then in the new partition C and new partition D that is divided, be respectively created 4 mapping link file C1, C2, C3, C4 and D1, D2, D3, D4.
Step S105, the data file of the new partition and the data file of first subregion are linked, with wound Build the linking relationship of the new partition and first subregion.
In the present embodiment, the data file by the new partition and the data file phase chain of first subregion Connect, can realize in the following way:It is clear from the file of first subregion in step S101 in the new partition The entire data files recorded in first subregion obtained in list and the data file of the new partition are created and linked Relation.
In the specific implementation, the data file by the new partition and the data file phase chain of first subregion Connect, be in the new partition, whole mapping link files in the new partition are respectively directed in step S101 The entire data files recorded in first subregion obtained from the lists of documents of first subregion.
It should be noted that in the present embodiment, subregion into during line splitting, be for first subregion provide two it is newly-built Subregion, so being by step S101 when creating the linking relationship of the new partition and first subregion in this step In the entire data files recorded in first subregion that are obtained from the lists of documents of first subregion, be all assigned to There is provided for first subregion in two new partitions, be the whole being assigned in the new partition in each new partition Data file creates the mapping link for being directed toward corresponding data file, and is the mark of each new partition creating access profile.
Illustrate the method for the subregion division below by a specific example, such as:There is the first subregion B, obtain institute After the lists of documents for stating the first subregion B, obtain from the lists of documents of the first subregion B and stored in the first subregion B Data file B1, B2, B3, B4, and the access profile of the first subregion B is [1,100], B1, B2, B3, B4 contain 1- 100 data, in the first subregion B into new partition C and D is created during line splitting in the database, in this step, by data text Part B1, B2, B3, B4 are assigned in new partition C, and data file B1, B2, B3, B4 are assigned in new partition D, due to inciting somebody to action The first subregion B is split into two subregions so the split point of the access profile of the first subregion B is 50, and is divided newly-built In area C create access profile for [1,50) mark, in new partition D create access profile be [50,100] mark.
It should be noted that if when to store data file B1, B2, B3, B4 and scope in the first subregion B be [1,100], Since the first subregion B is split into two subregions so the split point of the access profile of the first subregion B is 50, create The access profile of subregion C be [1,50), the access profile of new partition D is [50,100], then access 20 this row data when, just B1-B4 can be read by subregion C.
It should be understood that after the data file of first subregion is all assigned to two new partitions, due to be each New partition creates the mark of access profile, although each new partition creates the data text being directed toward in first subregion The mapping link of part, but new partition is accessed according to access identities, due to the access profile phase of two new partitions Mutually independent, access profile is not overlapping, it is possible to reduces load pressure when subregion is accessed.In the present embodiment, in subregion Two new partitions are provided for the first subregion into during line splitting, but are also not excluded for make the load that subregion is born lower in subregion There is provided three even more new partitions into during line splitting for the first subregion, for the first subregion provide three it is even more During new partition, also need to meet that by stages is separate, access profile is not overlapping.
Two kinds of physical file and mapping link file are included due to the data file that is stored in the first subregion, so When the data file of the data file of the new partition and first subregion is linked by execution step S105, i.e.,:Holding When being about to the step for the data file that mapping link file in the new partition is directed toward in first subregion, it is necessary to First the type of every specific data file is judged, then in step S105 by the data file of new partition and described the Before the step of data file of one subregion is linked, specifically include step S104-1 to S104-3, below in conjunction with the accompanying drawings 2 make into One step explanation.
Please refer to Fig.2, it illustrates provide to create in the new partition according to an embodiment of the present application to be directed toward institute State the flow chart of the mapping link file of data file.
It is described that the mapping link file for being directed toward the data file is created in the new partition, include the following steps:
Step S104-1, judges whether the data file in first subregion is mapping link file.
In the present embodiment, whether the data file judged in first subregion is mapping link file, It can realize in the following way:The mapping link set of first subregion is obtained, is to be assigned in the new partition , will be literary per data when every data document creation in the new partition is directed toward the mapping link of corresponding every data file The mapping articulation set of first subregion of the part with obtaining is compared, and it is described to judge whether the data file is recorded in In the mapping link set of first subregion.
It should be noted that the mapping link set of first subregion is:Link map files.Link map file quilts Persistence is in manifest files, specifically, link map are used to store the mapping link file in first subregion.
If it should be understood that first subregion is raw partition, i.e.,:First subregion is divided by other subregions Go out;If alternatively, when the subregion pointed by first subregion is deleted, there is no mapping link then in first subregion Mapping link collection in set or first subregion is combined into sky, then illustrates that the data file in first subregion is at this time Physical file.
Continue to use above-mentioned specific example:The type of data file B1, B2, B3, B4 are judged, since B1 and B2 is subregion B's In mapping link set, then it is mapping link file to illustrate data file B1, B2, and B3, B4 be not in the mapping link set of subregion B In, then B3, B4 are physical file.
Step S104-2, if so, then the mapping link file in the new partition is directed toward in first subregion The upper level data file that data file is directed toward, to create the linking relationship of the new partition and the upper level subregion.
In the present embodiment, the judging result in this step receiving step S104-1, if the data file is recorded in In the mapping link set of first subregion, then into this step S104-2 and perform the mapping chain in the new partition The upper level data file that the data file that file is directed toward in first subregion is directed toward is connect, to create the new partition and institute State the linking relationship of upper level subregion.
What the data file that the mapping link file by the new partition is directed toward in first subregion was directed toward Upper level data file, can be in the following way to create the linking relationship of the new partition and the upper level subregion Realize:The upper level data file pointed by the data file is obtained from the mapping link set of first subregion, is made The mapping link file in current new partition obtained, it is pointed to obtain from the mapping link set of first subregion Upper level data file pointed by the data file.
Continue to use above-mentioned specific example and with reference to figure 3, it illustrates provide according to an embodiment of the present application at newly-built point Make the schematic diagram of the upper level data file of mapping link file direction in area:From the mapping link set of the first subregion B The mapping link (B1 → A1, B2 → A2) of middle data file B1, B2 for obtaining subregion B, then make described newly-built in new partition C Mapping link file C1 in subregion C is directed toward the data file pointed by the mapping link file B1 being assigned in new partition C The mapping link file C1 (C1 → A1) of A1, is directed toward the mapping link file C2 in the new partition C and is assigned to newly-built point The mapping link file C2 (C2 → A2) of the data file A2 pointed by mapping link file B2 in area C;In new partition D The mapping link file D1 in the new partition D is set to be directed toward pointed by the mapping link file B1 being assigned in new partition D Data file A1 mapping link file D1 (D1 → A1), mapping link file D2 in the new partition D is directed toward point The mapping link file D2 (D2 → A2) for the data file D2 being fitted on pointed by the mapping link file B2 in new partition D.
It should be understood that since mapping link file is not the physical file of physical presence, the thing of physical presence is directed to The mapping of file is managed, so when the data file in the first subregion is mapping link file, what is created in new partition reflects Penetrating threaded file needs upper level data file pointed by the mapping link file that is directed toward in first subregion, until making The mapping link file created in new partition is directed to physical file.
Step S104-3, if it is not, then performing the data file by new partition and the data text of first subregion The step of part is linked.
In the present embodiment, the judging result in this step receiving step S104-1, if the data file is not remembered Record then into this step S104-3 and performs the data by new partition in the mapping link set of first subregion The step of data file of file and first subregion is linked.
It is described that the mapping link file for being directed toward the data file is created in the new partition, such as lower section can be used Formula is realized:In current new partition, the mapping link file in the new partition is directed toward and is assigned to the new partition In the data file.
Continue to use above-mentioned specific example:The mapping link file C3 in the new partition C is set to be directed toward physical file B3's The mapping link file C3 (C3 → B3) of storage address;The mapping link file C4 in the new partition C is set to be directed toward physics text The mapping link file C4 (C4 → B4) of the storage address of part B4;It is directed toward the mapping link file D3 in the new partition D The mapping link file D3 (D3 → B3) of the storage address of physical file B3;Make the mapping link file in the new partition C D4 is directed toward the mapping link file D4 (D4 → B4) of the storage address of physical file D4;
After the data file and new partition are linked, the new partition also needs to create with first by stages Linking relationship is built, the partition creating linking relationship for making the new partition associated with the data file, specifically includes Following steps:Step S103-4 to S103-5,4 it is described further below in conjunction with the accompanying drawings.
Please refer to Fig.4, it illustrates what is provided according to an embodiment of the present application to make the new partition and data text The flow chart for the partition creating linking relationship that part is associated.
The partition creating linking relationship for making the new partition associated with the data file, including following step Suddenly:
Step S103-4, creates mapping link set in the new partition;The mapping link set includes:At this Mapping link file in new partition.
In the present embodiment, it is described that mapping link set is created in the new partition, can be real in the following way It is existing:Mapping link set is created in the new partition, travels through and obtain the direction data created in the new partition All mapping link files got are written to the mapping link set by all mapping link files of file In.It should be noted that the mapping link set of first subregion is:Link map files.
It should be understood that the described the step of mapping link file for being directed toward data file is created in new partition is to create Mapping relations between each specific data file, every mapping link file is all mutually only with other mapping link files It is vertical, and mapping link number of files it is numerous, it is scattered should not safeguard, so in this step by reflecting between each specific data file Relation storage is penetrated into a link map file, i.e.,:Using link map files as mapping link text in current new partition The catalogue file of part, have recorded the data area of current new partition, and file linking relationship is completed in the new partition Establish.
It should be understood that since the mapping relations between each specific data file are stored to one in the new partition In a link map files, so can be completed when carrying out persistence to link map files in an IO, reduction can not take The duration of business.
Continue to use above-mentioned specific example:Mapping link set link map, the link map are created in new partition C { C1 → A1, C2 → A2, C3 → B3, C4 → B4 } is have recorded, mapping link set link map, institute are created in new partition D Link map are stated to have recorded { D1 → A1, D2 → A2, D3 → B3, D4 → B4 }.
Step S103-5, creates for the new partition and is directed toward what mapping link file in the mapping link set was directed toward The mapping link of the first subregion where data file.
In the present embodiment, after the mapping link relation between having established data file level, also need to establish between subregion Linking relationship, described created for the new partition be directed toward the data that mapping link file is directed toward in the mapping link set The mapping link of the first subregion where file, can realize in the following way:Created in main service processes current newly-built The mapping chain of subregion where subregion is directed toward the data file that mapping link file is directed toward in the mapping link set of the new partition Connect.Such as:First subregion is B, and current new partition is C, then in this step, C- is created in main service processes> { B }, the first subregion B are relied in the subregion mapping link of the new partition C;If the first subregion B is also relied on Subregion A, then create C- in main service processes>{ A, B }, the first subregion B and subregion A are relied in the new partition The subregion mapping link of C.
Due in the mapping link set that current new partition is created in main service processes and is directed toward the new partition It is directly to be created that mapping link determines to rely on where the data file that middle mapping link file is directed toward during the mapping link of subregion Relation, so this step can also be completed in an IO.
It should be noted that the main service processes are a kind of common roles in NOSQL databases, the master server Process is referred to as master in NOSQL databases, and master is mainly responsible for subregion scheduling;It is corresponding with master, NOSQL Worker role is further included in database, worker is mainly responsible for subregion read-write operation.
Such as:Created in master role in NOSQL databases the subregion mapping link C of new partition C and D → { A, B } (subregion C is directed toward subregion A, B, subregion A, B and is partitioned C dependences), (subregion D is directed toward subregion A, B, subregion A, B to D → { A, B } It is partitioned D dependences).
As a preferred embodiment, in the method for subregion provided by the embodiments of the present application division, due to subregion be by Load in storage server (machine), when the access that a subregion receives exceedes separate unit storage server process ability, be Reduce the load pressure for the storage server for loading the subregion, can be in NOSQL databases the partition creating at least Two new partitions, are in the state of the subregion and treat splitting status, and trigger the data that step S101 obtains the first subregion File, makes the subregion into line splitting.
Described is at least two new partition of the first partition creating, specifically includes step S100-1 to S100-2, ties below Attached drawing 5 is closed to be described further.
Fig. 5 is refer to, it illustrates provide according to an embodiment of the present application as first partition creating at least two The flow chart of new partition.
Described is at least two new partition of the first partition creating, is included the following steps:
Step S100-1, travels through the load pressure of each storage server connected in Database Systems.
In the present embodiment, the load pressure for traveling through each storage server connected in Database Systems, can To realize in the following way:Determine each storage server currently connected in NOSQL Database Systems, obtain current When inscribe the load pressure of each storage server connected in NOSQL Database Systems.
Such as:The number of the storage server connected in NOSQL Database Systems is 5, wherein there is a storage clothes The state of the subregion loaded in business device, which is in, treats splitting status, then obtains and connected under current time in NOSQL Database Systems The load pressure of other 4 storage servers connect.
Step S100-2, obtains the storage server that load pressure is less than default threshold value, in the storage server For described first partition creating, two new partitions.
In the present embodiment, the storage server for obtaining load pressure and being less than default threshold value, can use as follows Mode is realized:The each storage connected under the current time that will have been obtained in step S100-1 in NOSQL Database Systems The load pressure of server, is compared with default threshold value, obtains the storage server that load pressure is less than default threshold value.
Such as:After being compared according to load pressure with default threshold value, 1 is got in NOSQL Database Systems The storage server connected, then be described first partition creating, two new partitions in the storage server got;If 2 other storage servers connected are got in NOSQL Database Systems, then in 2 storage servers got In be respectively described first partition creating, two new partitions.
It should be noted that the storage server obtained in this step is calculated according to load balancing, according to The loading condition of the storage server connected in NOSQL Database Systems, one load pressure of acquisition is likely to be when obtaining Power is less than the storage server of default threshold value, it is also possible to obtains two storage services that load pressure is less than default threshold value Device.
In the present embodiment, establishment new partition can also be obtained by contrasting the load pressure of each storage server Storage server, such as:If there is the negative of storage server in the storage server connected in NOSQL Database Systems Pressure is carried significantly less than other storage servers, then it is first partition creating to obtain the storage server in this step Two new partitions;If the load pressure of the storage server connected in NOSQL Database Systems is all close, in order to newly-built The load of storage server is exceeded storage server process ability after subregion, then it is minimum to obtain load pressure in this step Two storage servers, a new partition is respectively created in two storage servers.
In the method for subregion division provided by the embodiments of the present application, due to creating mapping link collection in the new partition Conjunction is carried out in the memory in NOSQL Database Systems, so the mapping link collection is combined into transient data and has the time limit, In order to enable the mapping link set of establishment to preserve for a long time, the technical solution of the present embodiment provides one kind preferably Embodiment, under preferred embodiment, perform described in step S103 created in the new partition mapping link set it Afterwards, persistence operation is performed to the mapping link set, i.e., is persisted link map files in manifest files. The manifest files are the files in NOSQL Database Systems are stored, and each subregion has the manifest texts of oneself Part, the manifest files between each subregion do not overlap.
It should be noted that persistence operation is the mechanism for changing routine data between permanent state and instantaneous state. Specifically, be exactly transient data (such as data in memory, be to be unable to persistence) be persisted as persistant data (such as Persistence can preserve for a long time into database).
Continue to use above-mentioned specific example:Mapping link set link map, the link map are created in new partition C { C1 → A1, C2 → A2, C3 → B3, C4 → B4 } is have recorded, mapping link set link map, institute are created in new partition D State link map and have recorded { D1 → A1, D2 → A2, D3 → B3, D4 → B4 }, by the link map file persistences of new partition C Into the manifest files of C, the link map files of new partition D are persisted in the manifest files of D.
As a preferred embodiment, in the method for subregion division provided by the embodiments of the present application, by described first point When access original is stored in the data file of first subregion, corresponded to by reading after area is split into two new partitions What the mapping link file in two new partitions of first subregion accessed, rather than directly access and be split off Subregion, i.e., will not be with the subregion direct interaction, so being directed toward first subregion in described created for the new partition , it is necessary to be scheduled to the subregion after division and new partition after the step of mapping link, specifically comprise the following steps:Step Rapid S106-1 to S106-3,6 is described further below in conjunction with the accompanying drawings.
Refer to Fig. 6, it illustrates provide according to an embodiment of the present application to the subregion after division and new subregion into The flow chart of row scheduling.
Subregion and new partition after described pair of division are scheduled, including:
Step S106-1, the feedback information of the first subregion completion division is sent to main service processes.
In the present embodiment, the feedback information that the completion division of the first subregion is sent to main service processes, can use Following manner is realized:By communication protocol of the main service processes (master) between role and worker role in NOSQL databases, Feedback information of the content for the completion division of the first subregion is sent to the main service processes.
It should be noted that the core concept of master-worker design patterns is by original serial logic parallelization, And logic is split into many standalone modules and is performed parallel, wherein mainly including two dominant role master roles and worker Role, master are mainly responsible for scheduling while safeguard worker queues, task scheduling to worker is performed parallel;Worker angles Color is substantially carried out actual logic calculating, and returns result to master.In the present embodiment, due to NOSQL database applications In distributed system, since each storage server is distributed on different positions in distributed system, master role Also it is distributed in different storage servers with worker role, so being communicated between master role and worker role When need to establish the link of data transfer, communication protocols of the data transmission link between master role and worker role View.
It should be understood that it is to create mapping link set for new partition and create to be directed toward described first in this step The worker role of the mapping link of subregion is communicated with main service processes (master).
Step S106-2, receives the subregion dispatch request that the main service processes are sent.
In the present embodiment, the subregion dispatch request, including:Subregion is reached the standard grade request and the offline request of subregion.Can be with Understand, according to the difference of the role of subregion, subregion receives the respective partition dispatch request that the main service processes are sent.It is described The subregion dispatch request that the main service processes are sent is received, can be realized in the following way:The subregion being split off connects Receive the offline request of subregion that the main service processes are sent;New partition is received on the subregion that the main service processes are sent Line is asked.
Step S106-3, prevents the access request of the subregion to having divided, and new partition connection is entered data base set System.
In the present embodiment, access request of the prevention to the subregion divided, can realize in the following way:Institute The offline request of subregion that the subregion divided is sent according to the main service processes received is stated, performs and removes the subregion divided Related work (such as running environment, test environment and development environment etc.);It is described and by new partition connection enter database System, can realize in the following way:The new partition is reached the standard grade according to the subregion that the main service processes received are sent please Ask, perform the preparation (such as running environment, test environment and development environment etc.) for disposing the new partition.
It should be noted that the access request of the subregion to having divided is prevented to refer to:User is prevented directly to divide described The access request that the subregion split is initiated.It should be understood that after the subregion divided is prevented from access, not in the subregion Data file does any processing operation.To the subregion divided described in access, then it can pass through the corresponding subregion that this has divided New partition in mapping link file access described in data file in the subregion that has divided.The new partition connect into After entering Database Systems, it is possible to perform the read-write operation of data file, and receive the access request that user sends it.
As a preferred embodiment, in the method for subregion division provided by the embodiments of the present application, step is being performed The data file of the new partition and the data file of first subregion are linked by S105, to create the new partition After the step of linking relationship of first subregion, since user can access new partition, it is possible to this New partition performs the operation read or write data, is described new when performing write operation to the new partition Build in subregion and create data file;The data file includes physical file.
Describe the fission process of the method for the subregion division in detail below by specific example.
Since the data file includes physical file and mapping link file, so according to the data stored in subregion The species of file, can also include following two situations:Only have in subregion in physical file and subregion and there was only mapping link text Part.
If there was only physical file in subregion A, illustrate that the subregion A is not divided by other subregions;It is alternatively, described The mapping link file in subregion, the subregion A pointed by subregion A has been deleted.The subregion A into during line splitting in number According to establishment new partition B and C in storehouse;The lists of documents of the data file of the subregion A are obtained, it is clear from the file of the subregion A Physical file A1, A2, A3, the A4 recorded in the subregion A is obtained in list, and the access profile of the subregion A is [1,50]; Physical file A1, A2, A3, A4 are assigned in new partition B, physical file A1, A2, A3, A4 are assigned to new partition C In, since the subregion A is split into two subregions so the split point of the access profile of subregion A is 25, and in new partition B It is middle create access profile for [1,25) mark, in new partition C create access profile be [25,50] mark;Judge number According to the type of file A1, A2, A3, A4, since A1, A2, A3, A4 are physical file, then make new partition in new partition B Mapping link file B1, B2, B3, B4 in B are respectively directed to physical file A1, A2, A3, the A4's being assigned in new partition B Storage address (B1 → A1, B2 → A2, B3 → A3, B4 → A4), makes the mapping link text in new partition C in new partition C Part C1, C2, B3, C4 be respectively directed to physical file A1, A2, A3, the A4 being assigned in new partition C storage address (C1 → A1, C2 → A2, C3 → A3, C4 → A4);Mapping link set link map, the link map records are created in new partition B { B1 → A1, B2 → A2, B3 → A3, B4 → A4 }, creates mapping link set link map in new partition C, described Link map have recorded { C1 → A1, C2 → A2, C3 → A3, C4 → A4 }, and the link map files of new partition B are persisted to In the manifest files of B, the link map files of new partition C are persisted in the manifest files of C;In NOSQL (subregion B is directed toward subregion A to subregion mapping link B → { A } of establishment new partition B and C, divides in master role in database Area A is partitioned B dependences), C → { A } (subregion C is directed toward subregion A, and subregion A is partitioned C dependences);It is offline to dispatch subregion A, will be newly-built Subregion B, C scheduling are reached the standard grade, due to new partition B being identified as of access profile [1,25), so between needing to access 1-24 Data when, A1-A4, same reason, since the access profile of new partition C is identified as can be only read by subregion B [25,50], so when needing to access the data between 25-50, only can read A1-A4 by subregion C.
It should be understood that in subregion into after line splitting, when data file is linked to new partition, in the new partition Only mapping link file, after the new partition reaches the standard grade progress data writing operation, can just store thing in the new partition Manage file.
If there was only mapping link file in subregion B, illustrate that subregion B is divided by other subregions, carried out in subregion B New partition C and D are created during division in the database, the lists of documents of the data file of subregion B are obtained, from the file of subregion B Data file B1, B2, B3, the B4 recorded in subregion B is obtained in inventory, and the access profile of the subregion B is [1,50];Will Data file B1, B2, B3, B4 are assigned in new partition C, and data file B1, B2, B3, B4 are assigned in new partition D, Since the subregion B is split into two subregions so the split point of the access profile of subregion B is 25, and in new partition C Create access profile for [1,25) mark, in new partition D create access profile be [25,50] mark;Judge data The type of file B1, B2, B3, B4, since B1, B2, B3, B4 are mapping link file, then from the mapping link set of subregion B The mapping link (B1 → A1, B2 → A2, B3 → A3, B4 → A4) of middle data file B1, B2, B3, B4 for obtaining subregion B, then exist Mapping link file C1, C2, C3, C4 in new partition C is set to be respectively directed to be assigned in new partition C in new partition C Pointed by mapping link file B1, B2, B3, B4 data file A1, A2, A3, A4 (C1 → A1, C2 → A2, C3 → A3, C4 → A4), mapping link file D1, D2, D3, D4 in new partition D is made to be respectively directed to be assigned to new partition in new partition D Pointed by mapping link file B1, B2, B3, B4 in D data file A1, A2, A3, A4 (D1 → A1, D2 → A2, D3 → A3, D4→A4);Create mapping link set link map in new partition C, the link map have recorded C1 → A1, C2 → A2, C3 → A3, C4 → A4 }, establishment mapping link set link map, the link map have recorded { D1 in new partition D → A1, D2 → A2, D3 → A3, D4 → A4 }, the link map files of new partition C are persisted to the manifest files of C In, the link map files of new partition D are persisted in the manifest files of D;Master in NOSQL databases (subregion C is directed toward subregion A, B, subregion A, B and is partitioned C subregion mapping link C → { A, the B } of establishment new partition C and D in role Rely on), D → { A, B } (subregion D is directed toward subregion A, B, subregion A, B and is partitioned D dependences);It is offline to dispatch subregion B, by new partition C, D scheduling is reached the standard grade, due to new partition C being identified as of access profile [1,25), so needing to access the number between 1-24 According to when, can only read B1-B4 by subregion C, same reason, due to new partition D being identified as of access profile [25, 50], so when needing to access the data between 25-50, only B1-B4 can be read by subregion D.
It should be noted that only have mapping link file then to illustrate that the subregion after reaching the standard grade, has not been written in the first subregion Crossing data file and either being uprushed due to request needs continuously to divide subregion.
The method divided by a kind of subregion provided by the embodiments of the present application, it is newly-built by the way that the data file is linked to In subregion, make the partition creating linking relationship that the new partition is associated with the data file;Make to be not required in whole process Data file is copied, greatly shortens not serviceable time, and existing reference document is instead of by creating linking relationship, is made New partition can continue to repeatedly divide, it is achieved thereby that subregion can quickly divide, the subregion that has divided can be continuous The function of repeatedly dividing.
In the above-described embodiment, there is provided a kind of method of subregion division, it is corresponding with the method for above-mentioned subregion division , present invention also provides a kind of device of subregion division.Since the embodiment of device is substantially similar to the embodiment of method, institute To describe fairly simple, the relevent part can refer to the partial explaination of embodiments of method.Device embodiment described below is only It is only illustrative.The device embodiment of the subregion division is as follows:
Fig. 7 is refer to, it illustrates the schematic diagram of the device of the subregion division provided according to an embodiment of the present application.
The device of the subregion division, including:Data file obtaining unit 701, newdata file obtaining unit 703 with And linking relationship creating unit 705;
The data file obtaining unit 701, for obtaining the data file of the first subregion;
The newdata file obtaining unit 703, for obtaining the data file of new partition;
The linking relationship creating unit 705, for by the data file of the new partition and first subregion Data file is linked, to create the linking relationship of the new partition and first subregion.
Optionally, the data file obtaining unit 701, physical file and mapping specifically for obtaining the first subregion Threaded file.
Optionally, the linking relationship creating unit 705, specifically for by the mapping link file in the new partition The data file being directed toward in first subregion.
Optionally, the device of subregion division, further includes:Mapping link file judgment sub-unit, mapping chain Connect and be directed toward subelement and mapping link relation establishment triggering subelement;
The mapping link file judgment sub-unit, in the data file by new partition and described first point Before the data file in area is linked, judge whether the data file in first subregion is mapping link file;
The mapping link is directed toward subelement, for receiving the judging result of the mapping link file judgment sub-unit, If so, the upper level that the data file being then directed toward the mapping link file in the new partition in first subregion is directed toward Data file, to create the linking relationship of the new partition and the upper level subregion;
The mapping link relation creates triggering subelement, for receiving sentencing for the mapping link file judgment sub-unit Break as a result, if it is not, then triggering the linking relationship creating unit.
Optionally, the linking relationship creating unit 703, further includes:Set creates subelement and subregion mapping creates Subelement;
The set creates subelement, for creating mapping link set in the new partition;The mapping link Set includes:The mapping link file in the new partition;
The subregion mapping creates subelement, is reflected for creating to be directed toward in the mapping link set for the new partition Penetrate threaded file direction data file where the first subregion mapping link.
Optionally, the linking relationship creating unit 705, further includes:Persistence subelement;
The persistence subelement, after creating mapping link set in the new partition, to the mapping Link set performs persistence operation.
Optionally, the device of the subregion division, further includes:Feedback information transmitting element, dispatch request receiving unit with And offline unit on subregion;
The feedback information transmitting element, maps for creating to be directed toward in the mapping link set for the new partition After the mapping link of the first subregion where the data file that threaded file is directed toward, it is complete to send the first subregion to main service processes Into the feedback information of division;
The dispatch request receiving unit, the subregion dispatch request sent for receiving the main service processes;
Offline unit on the subregion, for preventing the access request to the subregion divided, and new partition is connected Into Database Systems.
Optionally, the device of the subregion division, further includes:Subregion creates unit;
The subregion creates unit, for being first subregion before the data file of the first subregion of the acquisition Create at least two new partitions.
Optionally, the subregion creates unit, including:Load pressure travels through subelement and partition creating subelement;
The load pressure travels through subelement, for traveling through the negative of each storage server connected in Database Systems Carry pressure;
The partition creating subelement, the storage server of default threshold value is less than for obtaining load pressure, described It is described first partition creating, two new partitions in storage server.
Optionally, the device of subregion division, further includes:Physical file creating unit;
The physical file creating unit, for by the data of the data file of the new partition and first subregion File is linked, to create the new partition with after the linking relationship of first subregion, being created in the new partition Build data file;The data file includes physical file.
In the above-described embodiment, there is provided a kind of method of subregion division and a kind of device of subregion division, in addition, Present invention also provides a kind of method for deleting data file in subregion;The embodiment of the method for data file in the deletion subregion It is as follows:
Fig. 8 is refer to, it illustrates what is provided according to an embodiment of the present application to delete the method for data file in subregion Flow chart.
The method of data file in the deletion subregion, including:
Step S801, receives the instruction for deleting data file.
In the present embodiment, it is described to receive the instruction for deleting data file, it can realize in the following way:Receive user Deletion instruction to the specific data file in NOSQL databases, carries user in the deletion instruction and is inquired by key assignments NOSQL databases in store corresponding keys specific data file subregion.
It should be noted that in NOSQL databases, the data file that is made of key (Key) and value (Value), wherein, Key and Value is man-to-man relation in logic, and for Key equivalent to the index of data file, Value is the data representated by Key The content of file.
Such as:The instruction for deleting data file C1 is received in this step, and the data file C1 is stored in subregion C In.
Step S803, judges the type of the data file.
In the present embodiment, the type of the data file includes:Physical file and mapping link file.The judgement The type of the data file, can realize in the following way:Obtain the mapping chain in the subregion for storing the data file Set is connect, the data file is compared with the mapping link set obtained, judges whether the data file is recorded In the mapping link set of the subregion.
Need what is illustrated, the mapping link set of the subregion is:Link map files.Link map files persist In manifest files, specifically, link map are used to store the mapping link file in the subregion.
If it should be understood that the mapping link collection of the subregion is combined into sky, illustrate the subregion for raw partition or institute The subregion of direction has been deleted, then the type of the data file stored in the subregion is physical file, if the subregion Mapping link set is not sky, and the data file is recorded in the mapping link set of the subregion, then described in explanation Data file is mapping link file;If the data file is not recorded in the mapping link set of the subregion, say The bright data file is physical file.
Step S805, if the type of the data file is physical file, in the subregion for storing the data file Delete the data file.
In the present embodiment, the physical file being stored in due to the data file in subregion, then can pass through DeleteDirectory () method deletes the data file in the subregion for storing the data file.
Step S807, if the type of the data file is mapping link file, is storing point of the data file The data file is deleted in the mapping link set in area.
In the present embodiment, it is described to delete the mapping in the mapping link set of subregion of the data file is stored Threaded file, can realize in the following way:Institute is deleted from link map file of the persistence in manifest files State mapping link file.
Lower one specific example of mask illustrates the process flow of the present embodiment.
The data file C1 is stored in subregion C, and data file C2, C3, C4, C5 are also stored in subregion C, wherein counting Being stored in mapping link set link map according to file C1, C2, C3 for mapping link file has:(C1→A1)、(C2→A2)、 (C3 → B1), data file C4, C5 are physical file, and the mapping link for reading the subregion stored in main service processes has:{C→ A }, { C → B }, { D → B }, i.e.,:Subregion C, D are the direction subregion B for being divided by subregion B, and subregion B is divided by subregion A Subregion A is directed toward, in this step, since data file C1 is mapping link file, then from persistence in manifest files Link map files in delete mapping link file (C1 → A1), make mapping link set link map be revised as (C2 → A2)、(C3→B1)。
In deletion subregion provided by the embodiments of the present application in the method for data file, due in mapping link set link After deleting mapping link file in map, the mapping link of by stages may be made to change, cause the dependence of by stages to close System changes, so the technical solution of the present embodiment provides a kind of preferred embodiment, under preferred embodiment, in step S807 is after the mapping link file is deleted, it is necessary to delete in storing the mapping link set of subregion of the data file The mapping link of subregion, specifically comprises the following steps:Step S808-1 to S808-2,9 is described further below in conjunction with the accompanying drawings.
It refer to flow charts of the Fig. 9 it illustrates the mapping link of the deletion subregion provided according to an embodiment of the present application.
The mapping link for deleting subregion, including:
Whether step S808-1, judge to have in the mapping link set and be directed toward the deleted data file meaning To upper level data file where subregion in other data files mapping link file.
In the present embodiment, it is described to judge whether there is the deleted data text of direction in the mapping link set The mapping link file of other data files in the subregion where upper level data file pointed by part, can use such as lower section Formula is realized:The mapping link file deleted in step S807 is obtained, obtains what is be directed toward from the mapping link file Subregion where upper level data file, the subregion is compared with the mapping link set, is judged in the mapping Whether link set also has the mapping link file for being directed toward the subregion.
It should be noted that the subregion that direction is obtained from the mapping link file is actually to obtain to be directed toward this point The data file in area, but the data file is only stored in corresponding subregion, it is possible to get and deposit from data file The subregion for the data file being directed toward is stored up.Such as:The mapping link file is that B1 is directed toward A1, and A1 is only stored in subregion A.
Above example is continued to use to illustrate:Delete and reflect from link map files of the persistence in manifest files After penetrating threaded file C1 (C1 → A1), since mapping link file C1 is directed to data file A1, then reflecting from current bay Penetrate in link set and judge whether that also there is the mapping link file for being directed toward subregion A (such as being directed toward A2, A3, A4 etc.), due to working as Also there is mapping link file C2 (C2 → A2) in the mapping link set of preceding subregion, illustrate that subregion C is also directed to subregion A, so The mapping link of by stages does not change, and the dependence of by stages does not also change.
Step S808-2, if it is not, then deleting the deleted data text of subregion direction for having deleted the data file The mapping link of the subregion where upper level data file pointed by part.
In the present embodiment, the judging result in receiving step S808-1, if in the mapping link set without finger The mapping chain of other data files into the subregion where the upper level data file pointed by the deleted data file When connecing file, the subregion that the data file has been deleted into this step and triggering is directed toward the deleted data file The mapping link of subregion where pointed upper level data file.The subregion for having deleted the data file refers to To the mapping link of the subregion where the upper level data file pointed by the deleted data file, can use as follows Mode is realized:Deleted from main service processes and deleted the deleted data file that the subregion of the data file is directed toward The mapping link of subregion where pointed upper level data file.
Above example is continued to use to illustrate:After data file C1 is deleted, then C3 is deleted from subregion C, then held again The method for deleting data file in subregion of row the present embodiment, since data file C3 is mapping link file, then from persistence Mapping link file (C3 → B1) is deleted in link map files in manifest files, makes mapping link set link Map is revised as (C2 → A2), since mapping link file C3 is directed to data file B1, then from having deleted the mapping link Judge whether also to have in the mapping link set of the subregion of file C3 the mapping link file for being directed toward subregion B (such as be directed toward B2, B3, B4 etc.), due to not having the mapping link file for referring again to subregion B in the mapping link set of current bay C, then illustrate Subregion B no longer this subregion C are relied on, so the mapping link of by stages is changed, are then deleted from main service processes current Subregion C be directed toward the data file C3 pointed by data file B1 subregion B mapping link { C → B }, make it is main service into The mapping link of the subregion stored in journey is revised as { C → A }, { D → B }.
, may after deleting mapping link { C → B } in the mapping link of the subregion stored in main service processes The dependence of by stages is caused to change, the subregion for making to have divided no longer is relied on by any subregion, to reduce redundant digit The memory space taken according to file, so the technical solution of the present embodiment provides a kind of preferred embodiment, in preferred embodiment Under, deleted in step S808-2 upper pointed by the deleted data file of subregion direction of the data file , it is necessary to delete the data file stored in subregion after the mapping link of subregion where level one data file, specifically include as Lower step:Step S809-1 to S809-2,10 is described further below in conjunction with the accompanying drawings.
0 is please referred to Fig.1, it illustrates the data file stored in the deletion subregion provided according to an embodiment of the present application Flow chart.
The data file stored in the deletion subregion, including:
Step S809-1, judges in main service processes with the presence or absence of pointed by the deleted data file of direction The mapping link of subregion where upper level data file.
In the present embodiment, the judgement whether there is in main service processes is directed toward the deleted data file institute The mapping link of subregion where the upper level data file of direction, can realize in the following way:Obtain in step S808- The mapping link for the subregion deleted in 2, obtains the subregion of direction from the mapping link of the subregion, by the subregion with it is described The mapping link of the subregion stored in main service processes is compared, and judges to have deleted with the presence or absence of direction in main service processes The mapping link of the subregion of mapping link.
Above example is continued to use to illustrate:The data file that current bay C is directed toward is deleted from main service processes After the mapping link { C → B } of the subregion B of data file B1 pointed by C3, since the mapping link subregion C of subregion is directed to point Area B's, then the mapping link of subregions of the subregion B with being stored in main service processes is compared, judged in main service processes Whether also there is the mapping link for being directed toward subregion B, reflected due to also having in the mapping link of the subregion stored in main service processes Link { D → B } is penetrated, illustrates that subregion D is also directed to subregion B, is relied on so the subregion B divided is also partitioned D, main service processes The mapping link of the middle subregion that mapping link has been deleted in the presence of direction, then do not trigger and perform step S809-2.
Step S809-2, if it is not, then deleting the data file stored in the subregion.
In the present embodiment, the judging result in receiving step S809-1, if there is no be directed toward in main service processes When deleting the mapping link of the subregion of mapping link, into this step and the data text deleted and stored in the subregion is triggered Part.It is described to delete the data file stored in the subregion, it can realize in the following way:Pass through DeleteDirectory () method deletes the data file stored in the subregion.
Above example is continued to use to illustrate:After data file C3 is deleted, then C2 is deleted from subregion C, then held again The method for deleting data file in subregion of row the present embodiment, since data file C2 is mapping link file, then from persistence Mapping link file C2 (C2 → A2) is deleted in link map files in manifest files, makes mapping link set link Map is revised as sky, since mapping link file C2 is directed to data file A2, then from the mapping link set of current bay Judge whether that also there is the mapping link file for being directed toward subregion A (such as being directed toward A3, A4 etc.), due to the mapping chain of current bay C Connect in set without the mapping link file for referring again to subregion A, then illustrate that subregion A no longer this subregion C are relied on, so by stages Mapping link changed, then from main service processes delete current bay C be directed toward the data file C2 pointed by Data file A2 subregion A mapping link { C → A }, the mapping link for the subregion for making to store in main service processes is revised as { D → B }, since the mapping link subregion C of subregion is directed to subregion A, then the subregion that will store in subregion A and main service processes Mapping link be compared, judge in main service processes whether also there is the mapping link for being directed toward subregion A, due to main service There is no the mapping link for being directed toward subregion A in the mapping link of the subregion stored in process, then pass through DeleteDirectory () method deletes the data file stored in subregion A.
In the above-described embodiment, there is provided a kind of method for deleting data file in subregion, and in above-mentioned deletion subregion The method of data file is corresponding, and present invention also provides a kind of device for deleting data file in subregion.Due to device Embodiment is substantially similar to the embodiment of method, so describing fairly simple, referring to the part of embodiment of the method in place of correlation Explanation.Device embodiment described below is only schematical.The device of data file is implemented in the deletion subregion Under such as:
1 is please referred to Fig.1, it illustrates what is provided according to an embodiment of the present application to delete the device of data file in subregion Schematic diagram.
The device of data file in the deletion subregion, including:Delete instruction reception unit 1101, type judging unit 1103rd, physical file deletes unit 1105 and mapping link file deletes unit 1107;
The deletion instruction reception unit 1101, the instruction of data file is deleted for receiving;
The type judging unit 1103, for judging the type of the data file;
The physical file deletes unit 1105, for receiving the judging result of the type judging unit 1103, if institute The type for stating data file is physical file, then deletes the data file in the subregion for storing the data file;
The mapping link file deletes unit 1107, for receiving the judging result of the type judging unit 1103, If the type of the data file is mapping link file, in the mapping link set of subregion of the data file is stored Delete the data file.
Optionally, the device for deleting data file in subregion, further includes:Subregion judging unit and subregion link are deleted Except unit;
The subregion judging unit, for being deleted described in the mapping link set of subregion of the data file is stored After the data file, judge whether to have in the mapping link set and be directed toward the deleted data file meaning To upper level data file where subregion in other data files mapping link file;
Unit is deleted in the subregion link, for receiving the judging result of the subregion judging unit, if it is not, then deleting Delete point where the upper level data file pointed by the deleted data file of subregion direction of the data file The mapping link in area.
Optionally, the device for deleting data file in subregion, further includes:Mapping link judging unit and data text Part deletes unit;
The mapping link judging unit, has been deleted for being directed toward in the subregion for having deleted the data file The data file pointed by upper level data file where subregion mapping link after, judge in main service processes In with the presence or absence of the subregion where the upper level data file being directed toward pointed by the deleted data file mapping link;
The data file deletes unit, for receiving the judging result of the mapping link judging unit, if it is not, then deleting Except the data file stored in the subregion.
In the above-described embodiment, there is provided a kind of method of subregion division, a kind of device of subregion division, a kind of deletion The method of data file and a kind of device for deleting data file in subregion in subregion, in addition, present invention also provides one kind Partition management system;The embodiment of the method for the partition management system is as follows:
2 are please referred to Fig.1, it illustrates the schematic diagram of the partition management system provided according to an embodiment of the present application.
The partition management system, including:The device 1201 of subregion division and the device for deleting data file in subregion 1203;
Wherein, the device 1201 of the subregion division, including:Obtain the data file of the first subregion;And by the data File is linked in new partition, makes the partition creating linking relationship that the new partition is associated with the data file;
The device 1203 of data file in the deletion subregion, including:Receive the instruction for deleting data file;And judge institute State the type of data file;If the type of the data file is physical file, in the subregion for storing the data file Delete the data file;If the type of the data file is mapping link file, point of the data file is being stored The data file is deleted in the mapping link set in area.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
1st, computer-readable medium can be by any side including permanent and non-permanent, removable and non-removable media Method or technology realize that information stores.Information can be computer-readable instruction, data structure, the module of program or other numbers According to.The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electrically erasable programmable read-only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc are read-only Memory (CD-ROM), digital versatile disc (DVD) or other optical storages, magnetic cassette tape, tape magnetic rigid disk storage or Other magnetic storage apparatus or any other non-transmission medium, the information that can be accessed by a computing device available for storage.According to Herein defines, and computer-readable medium does not include non-temporary computer readable media (transitory media), such as modulates Data-signal and carrier wave.
2nd, it will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program production Product.Therefore, the application can use the embodiment in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Form.Moreover, the application can use the computer for wherein including computer usable program code in one or more can use The computer program product that storage medium is implemented on (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Form.
Although the application is disclosed as above with preferred embodiment, it is not for limiting the application, any this area skill Art personnel are not being departed from spirit and scope, can make possible variation and modification, therefore the guarantor of the application Shield scope should be subject to the scope that the application claim is defined.

Claims (27)

  1. A kind of 1. method of subregion division, it is characterised in that including:
    Obtain the data file of the first subregion;
    Obtain the data file of new partition;
    The data file of the new partition and the data file of first subregion are linked, to create the new partition With the linking relationship of first subregion.
  2. 2. the method for subregion division according to claim 1, it is characterised in that the data file, including:Physical file And mapping link file.
  3. 3. the method for subregion division according to claim 2, it is characterised in that the data text by the new partition The data file of part and first subregion is linked, including:
    Mapping link file in the new partition is directed toward the data file in first subregion.
  4. 4. the method for subregion division according to claim 3, it is characterised in that in the data file by new partition Before the step of being linked with the data file of first subregion, including:
    Judge whether the data file in first subregion is mapping link file;
    If so, the data file direction being then directed toward the mapping link file in the new partition in first subregion is upper Level one data file, to create the linking relationship of the new partition and the upper level subregion;
    If it is not, the step of data file for then performing the data file by new partition and first subregion is linked.
  5. 5. the method for subregion according to claim 3 division, it is characterised in that it is described create the new partition with it is described The linking relationship of first subregion, including:
    Mapping link set is created in the new partition;The mapping link set includes:In the new partition Mapping link file;
    Create and be directed toward where the data file that mapping link file is directed toward in the mapping link set for the new partition The mapping link of first subregion.
  6. 6. the method for subregion division according to claim 5, it is characterised in that described created in the new partition is reflected After the step of penetrating link set, including:
    Persistence operation is performed to the mapping link set.
  7. 7. the method for subregion division according to claim 5, it is characterised in that refer in described created for the new partition The step of mapping link of the first subregion where the data file that mapping link file is directed toward into the mapping link set Afterwards, including:
    The feedback information of the first subregion completion division is sent to main service processes;
    Receive the subregion dispatch request that the main service processes are sent;
    The access request to the subregion divided is prevented, and new partition connection is entered into Database Systems.
  8. 8. the method for the subregion division according to claim 1-7 any one, it is characterised in that obtain first point described Before the step of data file in area, including:
    For at least two new partition of the first partition creating.
  9. 9. the method for subregion according to claim 8 division, it is characterised in that it is described for first partition creating at least Two new partitions, including:
    Travel through the load pressure of each storage server connected in Database Systems;
    The storage server that load pressure is less than default threshold value is obtained, is the first subregion wound in the storage server Build two new partitions.
  10. 10. the method for subregion division according to claim 8, it is characterised in that in the number by the new partition It is linked according to the data file of file and first subregion, pass is linked with create the new partition and first subregion After the step of being, including:
    Create data file in the new partition;The data file includes physical file.
  11. A kind of 11. device of subregion division, it is characterised in that including:
    First data file obtaining unit, for obtaining the data file of the first subregion;
    Newdata file obtaining unit, for obtaining the data file of new partition;
    Linking relationship creating unit, for by the data file of the new partition and the data file phase chain of first subregion Connect, to create the linking relationship of the new partition and first subregion.
  12. 12. the device of subregion division according to claim 11, it is characterised in that the data file obtaining unit, tool Body is used for the physical file and mapping link file for obtaining the first subregion.
  13. 13. the device of subregion division according to claim 12, it is characterised in that the linking relationship creating unit, tool Body is used for the data file being directed toward the mapping link file in the new partition in first subregion.
  14. 14. the device of subregion division according to claim 13, it is characterised in that further include:
    Mapping link file judgment sub-unit, for the data in the data file by new partition and first subregion Before file is linked, judge whether the data file in first subregion is mapping link file;
    Mapping link is directed toward subelement, for receiving the judging result of the mapping link file judgment sub-unit, if so, then will The upper level data file that the data file that mapping link file in the new partition is directed toward in first subregion is directed toward, To create the linking relationship of the new partition and the upper level subregion;
    Mapping link relation creates triggering subelement, for receiving the judging result of the mapping link file judgment sub-unit, If it is not, then trigger the linking relationship creating unit.
  15. 15. the device of subregion division according to claim 14, it is characterised in that the linking relationship creating unit, also Including:
    Set creates subelement, for creating mapping link set in the new partition;The mapping link set includes: Mapping link file in the new partition;
    Subregion mapping creates subelement, and mapping link text in the mapping link set is directed toward for being created for the new partition The mapping link of the first subregion where the data file that part is directed toward.
  16. 16. the device of subregion division according to claim 15, it is characterised in that the linking relationship creating unit, also Including:
    Persistence subelement, after creating mapping link set in the new partition, to the mapping link set Perform persistence operation.
  17. 17. the device of subregion division according to claim 15, it is characterised in that further include:
    Feedback information transmitting element, mapping link file in the mapping link set is directed toward for being created for the new partition After the mapping link of the first subregion where the data file of direction, send the first subregion to main service processes and complete division Feedback information;
    Dispatch request receiving unit, the subregion dispatch request sent for receiving the main service processes;
    Offline unit on subregion, enters data for preventing the access request to the subregion divided, and by new partition connection Storehouse system.
  18. 18. the device of the subregion division according to claim 11-17, it is characterised in that further include:
    Subregion creates unit, for it is described acquisition the first subregion data file before, be first partition creating at least Two new partitions.
  19. 19. the device of subregion division according to claim 18, it is characterised in that the subregion creates unit, including:
    Load pressure travels through subelement, for traveling through the load pressure of each storage server connected in Database Systems;
    Partition creating subelement, the storage server of default threshold value is less than for obtaining load pressure, in the storage service It is described first partition creating, two new partitions in device.
  20. 20. the device of subregion division according to claim 18, it is characterised in that further include:
    Physical file creating unit, for by the data file of the new partition and the data file phase chain of first subregion Connect, to create the new partition with after the linking relationship of first subregion, data text is created in the new partition Part;The data file includes physical file.
  21. A kind of 21. method for deleting data file in subregion, it is characterised in that including:
    Receive the instruction for deleting data file;
    Judge the type of the data file;
    If the type of the data file is physical file, the data text is deleted in the subregion for storing the data file Part;
    If the type of the data file is mapping link file, in the mapping link collection for the subregion for storing the data file The data file is deleted in conjunction.
  22. 22. the method according to claim 21 for deleting data file in subregion, it is characterised in that described in storage institute After stating the step of deleting the data file in the mapping link set of the subregion of data file, including:
    Judge whether there is the upper level data being directed toward pointed by the deleted data file in the mapping link set The mapping link file of other data files in subregion where file;
    If it is not, then delete the upper level deleted pointed by the deleted data file of subregion direction of the data file The mapping link of subregion where data file.
  23. 23. the method according to claim 22 for deleting data file in subregion, it is characterised in that deleted described Subregion where the upper level data file being directed toward except the subregion of the data file pointed by the deleted data file Mapping link the step of after, including:
    Judge in main service processes with the presence or absence of the upper level data file being directed toward pointed by the deleted data file The mapping link of the subregion at place;
    If it is not, then delete the data file stored in the subregion.
  24. A kind of 24. device for deleting data file in subregion, it is characterised in that including:
    Instruction reception unit is deleted, the instruction of data file is deleted for receiving;
    Type judging unit, for judging the type of the data file;
    Physical file deletes unit, for receiving the judging result of the type judging unit, if the type of the data file For physical file, then the data file is deleted in the subregion for storing the data file;
    Mapping link file deletes unit, for receiving the judging result of the type judging unit, if the data file Type is mapping link file, then the data text is deleted in the mapping link set of subregion of the data file is stored Part.
  25. 25. the device according to claim 24 for deleting data file in subregion, it is characterised in that further include:
    Subregion judging unit, for deleting the number in the mapping link set of subregion of the data file is stored described After file, judge whether there is upper one be directed toward pointed by the deleted data file in the mapping link set The mapping link file of other data files in subregion where level data file;
    Unit is deleted in subregion link, for receiving the judging result of the subregion judging unit, if it is not, then delete deleted it is described The mapping of the subregion where upper level data file pointed by the deleted data file of subregion direction of data file Link.
  26. 26. the device according to claim 25 for deleting data file in subregion, it is characterised in that further include:
    Mapping link judging unit, for being directed toward the deleted number in the subregion for having deleted the data file After mapping link according to the subregion where the upper level data file pointed by file, judge whether deposited in main service processes In the mapping link of the subregion where the upper level data file being directed toward pointed by the deleted data file;
    Data file deletes unit, for receiving the judging result of the mapping link judging unit, if it is not, then deleting described point The data file stored in area.
  27. A kind of 27. partition management system, it is characterised in that including:
    The device of subregion division according to any one of the claims 11 to 20;And
    The device for deleting data file in subregion according to any one of claim 24 to 26.
CN201610891411.3A 2016-10-12 2016-10-12 Method, device and system for splitting partition and deleting data file in partition Active CN107943412B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610891411.3A CN107943412B (en) 2016-10-12 2016-10-12 Method, device and system for splitting partition and deleting data file in partition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610891411.3A CN107943412B (en) 2016-10-12 2016-10-12 Method, device and system for splitting partition and deleting data file in partition

Publications (2)

Publication Number Publication Date
CN107943412A true CN107943412A (en) 2018-04-20
CN107943412B CN107943412B (en) 2021-10-22

Family

ID=61928789

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610891411.3A Active CN107943412B (en) 2016-10-12 2016-10-12 Method, device and system for splitting partition and deleting data file in partition

Country Status (1)

Country Link
CN (1) CN107943412B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110519319A (en) * 2018-05-22 2019-11-29 杭州海康威视数字技术股份有限公司 A kind of method and device dividing subregion
CN110825794A (en) * 2018-08-14 2020-02-21 华为技术有限公司 Partition merging method and database server
CN113238993A (en) * 2021-05-14 2021-08-10 中国人民银行数字货币研究所 Data processing method and device
US11269535B2 (en) 2019-01-28 2022-03-08 Beijing Oceanbase Technology Co., Ltd. Partition splitting method and apparatus, electronic device, and readable storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101387989A (en) * 2008-10-29 2009-03-18 北京世纪红山科技有限公司 Computer system and method for constructing virtual storage device based on sectorization management
US20100030793A1 (en) * 2008-07-31 2010-02-04 Yahoo! Inc. System and method for loading records into a partitioned database table
CN101986276A (en) * 2010-10-21 2011-03-16 成都市华为赛门铁克科技有限公司 Methods and systems for storing and recovering files and server
CN102945212A (en) * 2011-09-11 2013-02-27 微软公司 Pooled partition layout and representation
WO2013106993A1 (en) * 2012-01-17 2013-07-25 华为技术有限公司 Capacity expansion method and device and data access method and device
CN103229151A (en) * 2012-12-27 2013-07-31 华为技术有限公司 Partition extension method and device
CN103440345A (en) * 2013-09-11 2013-12-11 从兴技术有限公司 Distributed database extension method and distributed database extension system based on relational database
CN104503966A (en) * 2014-10-16 2015-04-08 杭州斯凯网络科技有限公司 Efficient maintenance-free automatic partition method for big data of PostgreSQL
CN105447112A (en) * 2015-11-12 2016-03-30 国云科技股份有限公司 Method for realizing efficient extension of Hash partition of relational database

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100030793A1 (en) * 2008-07-31 2010-02-04 Yahoo! Inc. System and method for loading records into a partitioned database table
CN101387989A (en) * 2008-10-29 2009-03-18 北京世纪红山科技有限公司 Computer system and method for constructing virtual storage device based on sectorization management
CN101986276A (en) * 2010-10-21 2011-03-16 成都市华为赛门铁克科技有限公司 Methods and systems for storing and recovering files and server
CN102945212A (en) * 2011-09-11 2013-02-27 微软公司 Pooled partition layout and representation
WO2013106993A1 (en) * 2012-01-17 2013-07-25 华为技术有限公司 Capacity expansion method and device and data access method and device
CN103229151A (en) * 2012-12-27 2013-07-31 华为技术有限公司 Partition extension method and device
CN103440345A (en) * 2013-09-11 2013-12-11 从兴技术有限公司 Distributed database extension method and distributed database extension system based on relational database
CN104503966A (en) * 2014-10-16 2015-04-08 杭州斯凯网络科技有限公司 Efficient maintenance-free automatic partition method for big data of PostgreSQL
CN105447112A (en) * 2015-11-12 2016-03-30 国云科技股份有限公司 Method for realizing efficient extension of Hash partition of relational database

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110519319A (en) * 2018-05-22 2019-11-29 杭州海康威视数字技术股份有限公司 A kind of method and device dividing subregion
CN110519319B (en) * 2018-05-22 2022-02-11 杭州海康威视数字技术股份有限公司 Method and device for splitting partitions
CN110825794A (en) * 2018-08-14 2020-02-21 华为技术有限公司 Partition merging method and database server
CN110825794B (en) * 2018-08-14 2022-03-29 华为云计算技术有限公司 Partition merging method and database server
US11762881B2 (en) 2018-08-14 2023-09-19 Huawei Cloud Computing Technologies Co., Ltd. Partition merging method and database server
US11269535B2 (en) 2019-01-28 2022-03-08 Beijing Oceanbase Technology Co., Ltd. Partition splitting method and apparatus, electronic device, and readable storage medium
EP3857402B1 (en) * 2019-01-28 2023-03-08 Beijing OceanBase Technology Co., Ltd. Partition splitting method and apparatus, electronic device, and readable storage medium
CN113238993A (en) * 2021-05-14 2021-08-10 中国人民银行数字货币研究所 Data processing method and device
CN113238993B (en) * 2021-05-14 2023-12-05 中国人民银行数字货币研究所 Data processing method and device

Also Published As

Publication number Publication date
CN107943412B (en) 2021-10-22

Similar Documents

Publication Publication Date Title
CN104813276B (en) Recover database from standby system streaming
Tsai et al. Towards a scalable and robust multi-tenancy SaaS
CN104598376A (en) Data driving layered automation test system and method
CN103106286B (en) Method and device for managing metadata
CN107003935A (en) Optimize database duplicate removal
CN107122360A (en) Data mover system and method
CN101916261A (en) Data partitioning method for distributed parallel database system
CN103139302A (en) Real-time copy scheduling method considering load balancing
US20210055885A1 (en) Enhanced data access using composite data views
CN107943412A (en) A kind of subregion division, the method, apparatus and system for deleting data file in subregion
CN104239377A (en) Platform-crossing data retrieval method and device
CN108595664A (en) A kind of agricultural data monitoring method under hadoop environment
CN107122238B (en) Efficient iterative Mechanism Design method based on Hadoop cloud Computational frame
CN107315814A (en) Data consistency checking method and system after a kind of KDB database data migrations
CN106156319A (en) Telescopic distributed resource description framework data storage method and device
CN106569896A (en) Data distribution and parallel processing method and system
Tsai et al. Data Partitioning and Redundancy Management for Robust Multi-Tenancy SaaS.
US20090030870A1 (en) Error propagation in object-relational mapping platform
CN117112691A (en) Storage method of big data-oriented multi-storage engine database
Pandagale et al. Hadoop-HBase for finding association rules using Apriori MapReduce algorithm
Yang et al. On construction of the air pollution monitoring service with a hybrid database converter
Dhanda Big data storage and analysis
CN115562676A (en) Triggering method of graph calculation engine
Kashyap et al. A review of leading databases: Relational & non-relational database
Heinonen From Classical DW to Cloud Data Warehouse

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant