CN108121822A - A kind of write-in data method and device - Google Patents

A kind of write-in data method and device Download PDF

Info

Publication number
CN108121822A
CN108121822A CN201810019079.0A CN201810019079A CN108121822A CN 108121822 A CN108121822 A CN 108121822A CN 201810019079 A CN201810019079 A CN 201810019079A CN 108121822 A CN108121822 A CN 108121822A
Authority
CN
China
Prior art keywords
write
default
write command
working area
sent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810019079.0A
Other languages
Chinese (zh)
Inventor
王志远
罗华林
单学成
唐锦阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201810019079.0A priority Critical patent/CN108121822A/en
Publication of CN108121822A publication Critical patent/CN108121822A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2358Change logging, detection, and notification
    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • 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

Abstract

An embodiment of the present invention provides a kind of write-in data method and devices, and applied to client, the above method includes:When default working area meets default transmission condition, default quantity write command temporary in advance in default working area is sent to by server by first thread, and default quantity write command is deleted from default working area, when default quantity write command temporary in advance in default working area is sent to server by first thread, new write command is received by the second thread, received new write command is sent to default working area.Using write-in data method provided in an embodiment of the present invention, when default quantity write command is sent to server by first thread, new write command can be continued to by the second thread, the efficiency of write-in data can be improved.

Description

A kind of write-in data method and device
Technical field
The present invention relates to Computer Applied Technology field, more particularly to a kind of write-in data method and device.
Background technology
HBase (Hadoop database, extra large dupp database) is a PostgreSQL database distributed, towards row, It has been widely used at present in mass data storage and analysis.Big rule can be erected in server group using HBase technologies Mode structure storage cluster, wherein, which can be described as Hbase clusters.HBase in each server in the form of a table Data are stored, there are much tables in each server, is referred to as Hbase tables.
Hbase as a high reliability, high-performance, towards row, telescopic distributed memory system, equipped with The corresponding Hbase clients of Hbase clusters and its writing buffer, wherein, writing buffer is used to collect the transmission of Hbase clients Write command, write command refers to increases inputted using the administrator of Hbase clients, data for Hbase tables, delete and The operational orders such as modification, such as so-and-so data etc. are write in certain HBase table.
However, inventor has found in the implementation of the present invention, at least there are the following problems for the prior art:
Existing write-in data step includes:The write command received can be sent to writing buffer by Hbase clients. When the write command in writing buffer meets default condition, Hbase clients can send the write command in writing buffer To server.After server receives write command, each write command can be performed, data are write in the Hbase tables into server, and Generate the corresponding write-in result for writing successfully or writing failure.However, Hbase clients send write command from writing buffer , it is necessary to wait the write-in of server generation to be obtained as a result, can just continue to write command and be sent to service after to server Device so that the efficiency for writing data is low.
The content of the invention
The embodiment of the present invention is designed to provide a kind of write-in data method and device.Specific technical solution is as follows:
In order to achieve the above objectives, the embodiment of the invention discloses a kind of write-in data method, applied to client, method bag It includes:
When default working area meets default transmission condition, will in advance be kept in the default working area by first thread Default quantity write command be sent to server, and the default quantity write command is deleted from the default working area It removes, wherein, the default quantity is determined according to the default transmission condition;
Default quantity write command temporary in advance in the default working area is sent to by first thread described During server, new write command is received by the second thread, received new write command is sent to described default temporary Area.
Optionally, in the default quantity write command that will in advance be kept in the default working area by first thread It is sent to after server, the method further includes:
Obtain the write-in result of the corresponding default quantity write command;
According to said write as a result, determining the write state of the default quantity write command.
Optionally, said write result fails to write successfully or writing;
It is described according to said write as a result, determine the default quantity write command write state, including:
When said write result is to write successfully, determine that the default quantity write command writes successfully;
Alternatively, when said write result fails for write-in, the default quantity write command write-in failure is determined.
Optionally, after the definite default quantity write command write-in failure, the method further includes:
The default quantity write command is sent to the default working area.
Optionally, the default working area meets default transmission condition, including:
The number of write command temporary in advance reaches the default quantity in the default working area;
Alternatively, the size of write command temporary in advance in the default working area reaches predetermined threshold value;
Alternatively, meeting the transmission condition apart from the default working area last time reaches the first preset duration;
Alternatively, in the second preset duration, the number of the write command in the default working area is not further added by.
In order to achieve the above objectives, the embodiment of the invention discloses a kind of write-in data set, applied to client, device bag It includes:
Transceiver module, for that when default working area meets default transmission condition, described will be preset by first thread temporary It deposits default quantity write command temporary in advance in area and is sent to server;
Default quantity write command temporary in advance in the default working area is sent to by first thread described During server, new write command is received by the second thread, received new write command is sent to described default temporary Area;
Processing module, for the default quantity write command to be deleted from the default working area, wherein, it is described pre- If quantity is determined according to the default transmission condition.
Optionally, the transceiver module is additionally operable to obtain the write-in result of the corresponding default quantity write command;
The processing module is additionally operable to according to said write as a result, determining the write-in shape of the default quantity write command State.
Optionally, said write result fails to write successfully or writing;
The processing module is additionally operable to write finger when said write result when writing successfully, to determine that the default quantity is a Order writes successfully;
Alternatively, when said write result fails for write-in, the default quantity write command write-in failure is determined.
Optionally, the transceiver module is additionally operable to the default quantity write command being sent to the default working area.
Optionally, the default working area meets default transmission condition, including:
The number of write command temporary in advance reaches the default quantity in the default working area;
Alternatively, the size of write command temporary in advance in the default working area reaches predetermined threshold value;
Alternatively, meeting the transmission condition apart from the default working area last time reaches the first preset duration;
Alternatively, in the second preset duration, the number of the write command in the default working area is not further added by.
In order to achieve the above objectives, the embodiment of the invention discloses a kind of electronic equipment, including processor, communication interface, deposit Reservoir and communication bus, wherein, processor, communication interface, memory completes mutual communication by communication bus;
Memory, for storing computer program;
Processor during for performing the program stored on memory, realizes any of the above-described write-in data method Step.
At the another aspect that the present invention is implemented, a kind of computer readable storage medium is additionally provided, it is described computer-readable Instruction is stored in storage medium, when run on a computer so that computer performs any of the above-described write-in number According to method.
At the another aspect that the present invention is implemented, the embodiment of the present invention additionally provides a kind of computer program production comprising instruction Product, when run on a computer so that computer performs any of the above-described write-in data method.
A kind of write-in data method and device provided in an embodiment of the present invention, applied to client, when default working area is expired When foot presets transmission condition, default quantity temporary in advance in default working area can be write finger by client by first thread Order is sent to server, and default quantity write command is deleted from default working area.It is temporary that will be preset by first thread When depositing in area default quantity write command temporary in advance and being sent to server, client can be received newly by the second thread Received new write command is sent to default working area by write command.Using the write-in data method of the embodiment of the present invention, Client can be continued to when default quantity write command is sent to server by first thread by the second thread New write command can improve the efficiency of write-in data.Certainly, implement any of the products of the present invention or method must be not necessarily required to Reach all the above advantage simultaneously.
Description of the drawings
It in order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is attached drawing needed in technology description to be briefly described.
Fig. 1 is a kind of application scenario diagram for writing data method provided in an embodiment of the present invention;
Fig. 2 is a kind of flow diagram for writing data method provided in an embodiment of the present invention;
Fig. 3 is a kind of structure diagram for writing data set provided in an embodiment of the present invention;
Fig. 4 is the structure diagram of a kind of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is described.
The step of write-in data of the prior art, includes:Client, will according to the instruction for the administrator for using client The write command received is sent to writing buffer, and the write command in writing buffer then is sent to server again.Server connects It receives write command and does corresponding write-in processing, the write-in result for the write command received can be generated afterwards.
But client, after write command is sent to server, can wait server generation to be obtained is directed to write command Write-in as a result, in waiting process, client can not continue to write command, cause write-in data efficiency it is low.
In order to solve the problems, such as that write-in data efficiency existing in the prior art is low, the present invention provides a kind of write-in data sides Method and device, the above method can be applied to client, and when default working area meets default transmission condition, client can lead to It crosses first thread and default quantity write command temporary in advance in default working area is sent to server, and default quantity is a Write command is deleted from default working area.Default quantity temporary in advance in default working area is being write by finger by first thread When order is sent to server, client can receive new write command by the second thread, by received new write command It is sent to default working area.Using the client of write-in data method provided by the invention, by first thread by present count When amount write command is sent to server, new write command can be continued to by the second thread, write-in data can be improved Efficiency.
The concrete application scene of above-mentioned write-in data method is referring to Fig. 1.
As shown in Figure 1, client 10 can receive write command by the second thread, the write command received is sent to pre- If working area, wherein, default working area can be the region of memory in client 10.When default working area meets default transmission item During part, default quantity write command temporary in advance in default working area is then sent to service by client 10 by first thread Device 11.After server 11 receives default quantity write command, corresponding write operation can be performed.Client 10 will preset When quantity write command is sent to server 11, new write command can be continued to by the second thread, write-in can be improved The efficiency of data.
It should be noted that a kind of write-in data method provided in an embodiment of the present invention, is preferably applied to client, specifically Can be Hbase (Hadoop database, extra large dupp database) client, can with the processing capability in real time of lifting system and Reliability.The present invention is illustrated exemplified by being applied to HBase clients, other situations are similar therewith.
Referring to Fig. 2, Fig. 2 is a kind of flow diagram for writing data method provided in an embodiment of the present invention, can be included Following steps:
S201:It, will be temporary in advance in default working area by first thread when default working area meets default transmission condition The default quantity write command deposited is sent to server, and default quantity write command is deleted from default working area.
Wherein, default quantity can be determined according to default transmission condition.Default transmission condition can be by technical staff It is rule of thumb configured, can be determined according to the number of the write command in default working area, it can also be according to default working area In the size of write command determine, can also be determined according to preset time point.Specifically how to determine, will implement below It is illustrated in example.Default quantity write command can be the administrator using Hbase clients that Hbase clients receive The write command for Hbase tables of input.The data to be write can be carried in write command, Hbase clients can be utilized and write Increase, deletion and the modification to data in Hbase tables are realized in instruction.Default working area can be the memory in Hbase clients Region.
In a kind of realization method, the Hbase tables in server can be multiple, and Hbase clients can be in server Each Hbase tables distribute one piece of region of memory respectively, using the region of memory as the corresponding default working area of the Hbase tables, For storing the write command for the Hbase tables.When the default working area of a certain Hbase tables meets default transmission condition, Hbase clients can preset this with activation pin the write-in thread (i.e. first thread) in working area.Hbase clients can pass through The default quantity write command that first thread is preset this in working area is sent to server, can also be obtained by first thread The write-in result for the default quantity write command sent of server generation.Default quantity write command is being sent to clothes It is engaged in after device, Hbase clients can will be sent to the default quantity write command of server from corresponding by first thread It is deleted in default working area, so that Hbase clients can continue to new write command.
Optionally, Hbase clients can be that multiple write-in threads are opened in a default working area.Illustratively, Hbase Client can be default working area Y, open thread A, thread B and thread C.When Hbase clients will be preset temporarily by thread A It deposits default quantity write command in area Y and is sent to server, when write-in result to be obtained, Hbase clients can be after continued access Receive new write command.If default working area Y meets default transmission condition again, thread A does not get write-in result yet.This When, Hbase clients can will preset quantity write command by thread B and be sent to server in default working area Y, wait obtains Take write-in result.Meanwhile Hbase clients can continue to new write command.If default working area Y meets again default During transmission condition, write-in result has not been obtained in thread A and thread B.At this point, Hbase clients can will be preset by thread C Quantity write command is preset in the Y of working area and is sent to server, waits write-in result to be obtained.It is write in this way, can further improve Enter the efficiency of data.
S202:Default quantity write command temporary in advance in default working area is being sent to by service by first thread During device, new write command is received by the second thread, received new write command is sent to default working area.
Wherein, the second thread can be the thread mutually asynchronous with first thread.
Hbase clients can receive new write command by the second thread, then parse the write command, determine that this is write The Hbase tables where the data carried are instructed, and it is corresponding default temporary that the write command is sent to the Hbase tables determined Area.
In the prior art, write command can also be sent to server by Hbase clients according to asynchronous write mode Afterwards, new write command is continued to.But according to the asynchronous write mode, write command can be sent to by Hbase clients first Writing buffer, and only just the write command in writing buffer can be sent to server when writing buffer is full, can cause to write The delay of data.
By above-mentioned as it can be seen that using write-in data method provided in an embodiment of the present invention, Hbase clients are passing through First Line When default quantity write command temporary in advance in default working area is sent to server by journey, it can be continued by the second thread New write command is received, and then improves the efficiency of write-in data.
Optionally, Hbase clients are being write default quantity temporary in advance in default working area by first thread Instruction is sent to after server, it is also possible that obtaining the write-in result of corresponding default quantity write command.According to write-in as a result, Determine the write state of default quantity write command.
Wherein, since write command can be sayed in itself without status information, therefore Hbase clients can be write command mark correspondence Write state.Wherein, write state can include:Etc. it is to be written, write successfully with write-in fail.For example, one can be designed Kind new data structure A, there are one write command and its write states for a data structure A encapsulation, you can are embodied as each writing finger Order marks respective write state.Also, when neotectonics goes out a data structure A, the write-in of write command in data structure A State is defaulted as " waiting to be written ".Other any labeling methods that can realize the embodiment of the present invention, belong to implementation of the present invention The protection domain of example, does not repeat one by one herein.
In a kind of realization method, present count that Hbase clients will be temporary in advance in default working area by first thread Amount write command is sent to after server, and the default quantity that is directed to that server returns can be obtained by first thread and writes finger The write-in result of order.According to the write-in of acquisition as a result, by the write state of default quantity write command from etc. to be written be updated to It writes successfully or write-in fails.If specifically, in the 3rd preset duration, Hbase clients do not receive server and return The write-in for default quantity write command returned is as a result, Hbase clients can determine the write-in of default quantity write command As a result it is write-in failure.
By above-mentioned as it can be seen that using write-in data method provided in an embodiment of the present invention, Hbase clients can determine to write finger The write state of order so that Hbase clients can carry out respective handling according to write state, improves the effect of write-in data Rate.
In one particular embodiment of the present invention, write-in result can be to be written to work(or write-in failure.
According to write-in as a result, determining the write state of default quantity write command, can include:
When writing result to write successfully, determine that default quantity write command writes successfully.
Alternatively, when writing result to write failure, determine that default quantity write command write-in fails.
Specifically, Hbase clients can not be determined to write in default quantity write command according to the write-in result of acquisition Enter successful write command and the write command of write-in failure.
Therefore, when the write-in result that the server that Hbase clients are obtained by first thread returns is to write successfully, Hbase clients can determine that the default quantity write command for being sent to server all writes successfully, will preset quantity The write state of write command from etc. to be written be updated to write successfully;When the write-in that the server obtained by first thread returns When as a result failing for write-in, Hbase clients can determine that the default quantity write command for being sent to server all writes and lose Lose, will preset the write state of quantity write command from etc. to be written be updated to write-in failure.
By above-mentioned as it can be seen that using write-in data method provided in an embodiment of the present invention, Hbase clients can determine to write finger The write state of order is writes successfully or writes failure, so that Hbase clients can carry out accordingly according to write state Processing improves the efficiency of write-in data.
In one particular embodiment of the present invention, after default quantity write command write-in failure is determined, above-mentioned side Method further includes:Default quantity write command is sent to default working area.
Specifically, it is the default quantity write command of write-in failure for write state, Hbase clients can will write The default quantity write command of failure is re-transmitted to default working area, so that Hbase clients can continue to lose write-in The default quantity write command lost is sent to server.In addition, Hbase clients can also analyze the reason for write-in failure, from And the problem of positioning Hbase clusters and Hbase tables etc., it realizes and more careful and flexible control is realized to Hbase.
By above-mentioned as it can be seen that using write-in data method provided in an embodiment of the present invention, Hbase clients can lose write-in The write command lost is re-transmitted to default working area, completes the write-in of data, improves the accuracy of write-in data.
In the specific implementation of the present invention, preset working area and meet default transmission condition, including:
The number of write command temporary in advance reaches default quantity in default working area;
Alternatively, the size of write command temporary in advance in default working area reaches predetermined threshold value;
Alternatively, meeting transmission condition apart from the last time apart from default working area reaches the first preset duration;
Alternatively, in the second preset duration, the number of the write command in default working area is not further added by.
Wherein, presetting quantity, predetermined threshold value, the first preset duration and the second preset duration can be by technical staff according to warp It tests and is configured.
Specifically, it can flexibly formulate default transmission condition according to business needs.For example, default transmission condition, Ke Yishi The number of write command temporary in advance reaches default quantity in above-mentioned default working area;Alternatively, it is kept in advance in default working area The size of write command reach predetermined threshold value;It is preset alternatively, meeting transmission condition apart from the default working area last time and reaching first Duration;Alternatively, in the second preset duration, the number of the write command in default working area is not further added by namely is preset second In duration, Hbase clients do not receive new write command.
It should be noted that when determining above-mentioned default transmission condition, it is necessary to ensure what is kept in advance in default working area Write command is without departing from the size of Hbase client writing buffers.
The above-mentioned default transmission condition that provides is merely exemplary, should not form the restriction to the embodiment of the present invention.
By above-mentioned as it can be seen that using write-in data method provided in an embodiment of the present invention, Hbase clients can be formulated flexibly Transmission condition, improve write-in data efficiency.
Referring to Fig. 3, Fig. 3 is a kind of structure diagram for writing data set provided in an embodiment of the present invention, shown in Fig. 2 Flow chart it is corresponding, which can include:
Transceiver module 301, for when default working area meets default transmission condition, described will be preset by first thread Default quantity write command temporary in advance is sent to server in working area;
Default quantity write command temporary in advance in the default working area is sent to by first thread described During server, new write command is received by the second thread, received new write command is sent to described default temporary Area;
Processing module 302, for the default quantity write command to be deleted from the default working area, wherein, institute Default quantity is stated to be determined according to the default transmission condition.
Optionally, the transceiver module 301 is additionally operable to obtain the write-in result of the corresponding default quantity write command;
The processing module 302 is additionally operable to according to said write as a result, determining the write-in of the default quantity write command State.
Optionally, said write result fails to write successfully or writing;
The processing module 302 is additionally operable to write when writing successfully, to determine that the default quantity is a when said write result Instruction writes successfully;
Alternatively, when said write result fails for write-in, the default quantity write command write-in failure is determined.
Optionally, the transceiver module 301 is additionally operable to the default quantity write command being sent to described default temporary Area.
Optionally, the default working area meets default transmission condition, including:
The number of write command temporary in advance reaches the default quantity in the default working area;
Alternatively, the size of write command temporary in advance in the default working area reaches predetermined threshold value;
Alternatively, meeting the transmission condition apart from the default working area last time reaches the first preset duration;
Alternatively, in the second preset duration, the number of the write command in the default working area is not further added by.
By above-mentioned as it can be seen that using write-in data set provided in an embodiment of the present invention, Hbase clients are passing through First Line It, can be by the second thread after continued access when journey presets in working area default quantity write command temporary in advance and is sent to server New write command is received, and then improves the efficiency of write-in data.
The embodiment of the present invention additionally provides a kind of electronic equipment, as shown in figure 4, including processor 401, communication interface 402, Memory 403 and communication bus 404, wherein, processor 401, communication interface 402, memory 403 is complete by communication bus 404 Into mutual communication,
Memory 403, for storing computer program;
Processor 401 during for performing the program stored on memory 403, realizes following steps:
When default working area meets default transmission condition, will in advance be kept in the default working area by first thread Default quantity write command be sent to server, and the default quantity write command is deleted from the default working area It removes, wherein, the default quantity is determined according to the default transmission condition;
Default quantity write command temporary in advance in the default working area is sent to by first thread described During server, new write command is received by the second thread, received new write command is sent to described default temporary Area.
It should be noted that other realization methods of above-mentioned write-in data method are identical with preceding method embodiment part, Which is not described herein again.
Default quantity write command is being sent to service by electronic equipment provided in an embodiment of the present invention by first thread During device, new write command can be continued to by the second thread, the efficiency of write-in data can be improved.
The communication bus 404 that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, abbreviation PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, abbreviation EISA) bus etc..The communication bus 404 can be divided into address bus, data/address bus, Controlling bus etc..For ease of representing, only represented in figure with a thick line, it is not intended that an only bus or a type of Bus.
Communication interface 402 is for the communication between above-mentioned electronic equipment and other equipment.
Memory 403 can include random access memory (Random Access Memory, abbreviation RAM), can also Including nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.Optionally, memory 403 can also be at least one storage device for being located remotely from aforementioned processor.
Above-mentioned processor 401 can be general processor, including central processing unit (Central Processing Unit, abbreviation CPU), network processing unit (Network Processor, abbreviation NP) etc.;It can also be digital signal processor (Digital Signal Processing, abbreviation DSP), application-specific integrated circuit (Application Specific Integrated Circuit, abbreviation ASIC), field programmable gate array (Field-Programmable Gate Array, Abbreviation FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware components.
In another embodiment provided by the invention, a kind of computer readable storage medium is additionally provided, which can It reads to be stored with instruction in storage medium, when run on a computer so that computer performs provided in an embodiment of the present invention Write data method.
Specifically, above-mentioned write-in data method, including:
When default working area meets default transmission condition, will in advance be kept in the default working area by first thread Default quantity write command be sent to server, and the default quantity write command is deleted from the default working area It removes, wherein, the default quantity is determined according to the default transmission condition;
Default quantity write command temporary in advance in the default working area is sent to by first thread described During server, new write command is received by the second thread, received new write command is sent to described default temporary Area.
It should be noted that other realization methods of above-mentioned write-in data method are identical with preceding method embodiment part, Which is not described herein again.
By running the instruction stored in computer readable storage medium provided in an embodiment of the present invention, passing through First Line When default quantity write command is sent to server by journey, new write command, Neng Gouti can be continued to by the second thread The efficiency of height write-in data.
In another embodiment provided by the invention, a kind of computer program product for including instruction is additionally provided, when it When running on computers so that computer performs write-in data method provided in an embodiment of the present invention.
Specifically, above-mentioned write-in data method, including:
When default working area meets default transmission condition, will in advance be kept in the default working area by first thread Default quantity write command be sent to server, and the default quantity write command is deleted from the default working area It removes, wherein, the default quantity is determined according to the default transmission condition;
Default quantity write command temporary in advance in the default working area is sent to by first thread described During server, new write command is received by the second thread, received new write command is sent to described default temporary Area.
It should be noted that other realization methods of above-mentioned write-in data method are identical with preceding method embodiment part, Which is not described herein again.
By running the instruction stored in computer readable storage medium provided in an embodiment of the present invention, passing through First Line When default quantity write command is sent to server by journey, new write command, Neng Gouti can be continued to by the second thread The efficiency of height write-in data.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or its any combination real It is existing.When implemented in software, can entirely or partly realize in the form of a computer program product.The computer program Product includes one or more computer instructions.When loading on computers and performing the computer program instructions, all or It partly generates according to the flow or function described in the embodiment of the present invention.The computer can be all-purpose computer, special meter Calculation machine, computer network or other programmable devices.The computer instruction can be stored in computer readable storage medium In or from a computer readable storage medium to another computer readable storage medium transmit, for example, the computer Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or It is the data storage devices such as server, the data center integrated comprising one or more usable mediums.The usable medium can be with It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state disk Solid State Disk (SSD)) etc..
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant are intended to Non-exclusive inclusion, so that process, method, article or equipment including a series of elements not only will including those Element, but also including other elements that are not explicitly listed or further include as this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that Also there are other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is described using relevant mode, identical similar portion between each embodiment Point just to refer each other, and the highlights of each of the examples are difference from other examples.Especially for device, For electronic equipment, computer readable storage medium and computer program product embodiments comprising instruction, due to its basic phase Embodiment of the method is similar to, so description is fairly simple, the relevent part can refer to the partial explaination of embodiments of method.

Claims (11)

1. a kind of write-in data method, which is characterized in that applied to client, the described method includes:
It is pre- by what is kept in advance in the default working area by first thread when default working area meets default transmission condition If quantity write command is sent to server, and the default quantity write command is deleted from the default working area, In, the default quantity is determined according to the default transmission condition;
Default quantity write command temporary in advance in the default working area is sent to by service by first thread described During device, new write command is received by the second thread, received new write command is sent to the default working area.
2. according to the method described in claim 1, it is characterized in that, it is described will be in the default working area by first thread Temporary default quantity write command is sent to after server in advance, and the method further includes:
Obtain the write-in result of the corresponding default quantity write command;
According to said write as a result, determining the write state of the default quantity write command.
3. according to the method described in claim 2, it is characterized in that, said write result fails to write successfully or writing;
It is described according to said write as a result, determine the default quantity write command write state, including:
When said write result is to write successfully, determine that the default quantity write command writes successfully;
Alternatively, when said write result fails for write-in, the default quantity write command write-in failure is determined.
4. according to the method described in claim 3, it is characterized in that, determine that the default quantity write command write-in is lost described After losing, the method further includes:
The default quantity write command is sent to the default working area.
5. according to the method described in claim 1, it is characterized in that, the default working area meets default transmission condition, including:
The number of write command temporary in advance reaches the default quantity in the default working area;
Alternatively, the size of write command temporary in advance in the default working area reaches predetermined threshold value;
Alternatively, meeting the transmission condition apart from the default working area last time reaches the first preset duration;
Alternatively, in the second preset duration, the number of the write command in the default working area is not further added by.
6. a kind of write-in data set, which is characterized in that applied to client, described device includes:
Transceiver module, for when default working area meets default transmission condition, by first thread by the default working area In temporary in advance default quantity write command be sent to server;
Default quantity write command temporary in advance in the default working area is sent to by service by first thread described During device, new write command is received by the second thread, received new write command is sent to the default working area;
Processing module, for the default quantity write command to be deleted from the default working area, wherein, the present count Amount is determined according to the default transmission condition.
7. device according to claim 6, which is characterized in that
The transceiver module is additionally operable to obtain the write-in result of the corresponding default quantity write command;
The processing module is additionally operable to according to said write as a result, determining the write state of the default quantity write command.
8. device according to claim 7, which is characterized in that said write result fails to write successfully or writing;
The processing module is additionally operable to, when said write result is to write successfully, determine that the default quantity write command is write Enter success;
Alternatively, when said write result fails for write-in, the default quantity write command write-in failure is determined.
9. device according to claim 8, which is characterized in that
The transceiver module is additionally operable to the default quantity write command being sent to the default working area.
10. device according to claim 6, which is characterized in that the default working area meets default transmission condition, bag It includes:
The number of write command temporary in advance reaches the default quantity in the default working area;
Alternatively, the size of write command temporary in advance in the default working area reaches predetermined threshold value;
Alternatively, meeting the transmission condition apart from the default working area last time reaches the first preset duration;
Alternatively, in the second preset duration, the number of the write command in the default working area is not further added by.
11. a kind of electronic equipment, which is characterized in that including processor, communication interface, memory and communication bus, wherein, it is described Processor, the communication interface, the memory complete mutual communication by the communication bus;
The memory, for storing computer program;
The processor during for performing the program stored on the memory, realizes any sides of claim 1-5 Method step.
CN201810019079.0A 2018-01-09 2018-01-09 A kind of write-in data method and device Pending CN108121822A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810019079.0A CN108121822A (en) 2018-01-09 2018-01-09 A kind of write-in data method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810019079.0A CN108121822A (en) 2018-01-09 2018-01-09 A kind of write-in data method and device

Publications (1)

Publication Number Publication Date
CN108121822A true CN108121822A (en) 2018-06-05

Family

ID=62232825

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810019079.0A Pending CN108121822A (en) 2018-01-09 2018-01-09 A kind of write-in data method and device

Country Status (1)

Country Link
CN (1) CN108121822A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101321089A (en) * 2008-07-07 2008-12-10 中兴通讯股份有限公司 Warehouse entry method of performance data in telecommunication network management system
CN102478813A (en) * 2010-11-22 2012-05-30 大连创达技术交易市场有限公司 Method for interacting instruction and hardware in numerical control system
CN104077420A (en) * 2014-07-21 2014-10-01 北京京东尚科信息技术有限公司 Method and device for importing data into HBase database
CN104184817A (en) * 2014-08-28 2014-12-03 广州金山网络科技有限公司 Download optimizing method and device and terminal
CN107229673A (en) * 2017-04-20 2017-10-03 努比亚技术有限公司 Method for writing data, Hbase terminals and the storage medium of Hbase databases
US20170344374A1 (en) * 2016-05-26 2017-11-30 Centipede Semi Ltd. Processor with efficient reorder buffer (rob) management

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101321089A (en) * 2008-07-07 2008-12-10 中兴通讯股份有限公司 Warehouse entry method of performance data in telecommunication network management system
CN102478813A (en) * 2010-11-22 2012-05-30 大连创达技术交易市场有限公司 Method for interacting instruction and hardware in numerical control system
CN104077420A (en) * 2014-07-21 2014-10-01 北京京东尚科信息技术有限公司 Method and device for importing data into HBase database
CN104184817A (en) * 2014-08-28 2014-12-03 广州金山网络科技有限公司 Download optimizing method and device and terminal
US20170344374A1 (en) * 2016-05-26 2017-11-30 Centipede Semi Ltd. Processor with efficient reorder buffer (rob) management
CN107229673A (en) * 2017-04-20 2017-10-03 努比亚技术有限公司 Method for writing data, Hbase terminals and the storage medium of Hbase databases

Similar Documents

Publication Publication Date Title
US11416456B2 (en) Method, apparatus, and computer program product for data quality analysis
KR102337092B1 (en) Traffic measurement method, device, and system
CN104601696B (en) Service processing method, service calling system, device and system
CN104239493B (en) cross-cluster data migration method and system
US11178213B2 (en) Automated configuration based deployment of stream processing pipeline
CN104239518B (en) Data de-duplication method and device
CN107395665A (en) A kind of block chain service handling and business common recognition method and device
US11509530B2 (en) Impartial buffering in stream processing
JP6299266B2 (en) Data storage method, storage system, program, and storage apparatus
CN106027595A (en) Access log processing method and system for CDN node
CN105743808A (en) Method and device of adapting QoS
CN108255620A (en) A kind of business logic processing method, apparatus, service server and system
CN108418859A (en) The method and apparatus for writing data
CN103530253B (en) Cluster many overall situations Buffer Pool system, Centroid, calculating node and management method
CN107870872B (en) Method and apparatus for managing cache
CN108932241A (en) Daily record data statistical method, device and node
CN107783728A (en) Date storage method, device and equipment
CN108108126A (en) A kind of data processing method, device and equipment
CN108228099A (en) A kind of method and device of data storage
CN108121822A (en) A kind of write-in data method and device
US10949102B2 (en) Leveraging snapshot for time series pattern analysis prediction
CN108804568A (en) Copy data storage method and device in ceph in a kind of Openstack
CN109408496A (en) A kind of method and device reducing data redundancy
CN109491961A (en) A kind of method and Snapshot Devices of file system snapshot
CN108037950A (en) A kind of information deletion method, device, electronic equipment and readable storage medium storing program for executing

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