CN108011744A - Obtain the method and device of key - Google Patents
Obtain the method and device of key Download PDFInfo
- Publication number
- CN108011744A CN108011744A CN201710705160.XA CN201710705160A CN108011744A CN 108011744 A CN108011744 A CN 108011744A CN 201710705160 A CN201710705160 A CN 201710705160A CN 108011744 A CN108011744 A CN 108011744A
- Authority
- CN
- China
- Prior art keywords
- key
- node
- destination node
- command
- shell
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/02—Standardisation; Integration
- H04L41/0246—Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
- H04L41/0266—Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using meta-data, objects or commands for formatting management information, e.g. using eXtensible markup language [XML]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/067—Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The present invention discloses a kind of method and device of acquisition key, is related to technical field of data processing, all key efficiency that can solve the problems, such as to obtain in the prior art in redis clusters are low.The method of the present invention mainly includes:Destination node in redis clusters is connected based on shell-command, the destination node is the node being not connected with all nodes determined according to the default order of connection, to be checked;The destination node is controlled to perform the querying command for being used for inquiring about all key in present node;After the key that the destination node inquires is obtained, disconnected with the destination node, and continue, according to the default order of connection, other nodes being not connected with to be connected based on the shell-command, untill the key in all nodes to be checked is obtained.The present invention is mainly suitable in the scene based on redis clusters inquiry key.
Description
Technical field
The present invention relates to technical field of data processing, more particularly to a kind of method and device of acquisition key.
Background technology
It is a key-value type storage system to reaffirm (redis), is broadly divided into two kinds of master slave mode and cluster mode.
Wherein, each node in master slave mode is stored with all key, and each node in cluster mode is only stored with part
Key, and the combination of key constitutes all key in whole cluster in all nodes.
When needing to inquire about all key in redis clusters, it is necessary to user's manual entry each node one after another
Redis-cli clients, then using keys* orders obtain present node in all key, until manual entry last
Node, and when obtaining all key in the node, all key in whole redis clusters could be obtained, efficiency is very low.
The content of the invention
In view of this, the present invention provides the method and device for obtaining key, can solve to obtain redis collection in the prior art
The problem of all key efficiency in group are low.
In a first aspect, the present invention provides a kind of method of acquisition key, the described method includes:
Destination node in redis clusters is connected based on shell-command, the destination node is according to the default order of connection
The node being not connected with definite, to be checked all nodes;
The destination node is controlled to perform the querying command for being used for inquiring about all key in present node;
After the key that the destination node inquires is obtained, disconnect, and continue according to the destination node
The default order of connection, other nodes being not connected with are connected based on the shell-command, until obtaining all nodes to be checked
In key untill.
Second aspect, the present invention provides a kind of device of acquisition key, described device includes:
Connection unit, for connecting the destination node in redis clusters based on shell-command, the destination node is root
The node being not connected with all nodes determined according to the default order of connection, to be checked;
Control unit, for controlling the destination node to perform the querying command for being used for inquiring about all key in present node;
Switching units, for after the key that the destination node inquires is obtained, being disconnected with the destination node;
The connection unit is additionally operable to continue according to the default order of connection, other are connected based on the shell-command
The node being not connected with, untill the key in all nodes to be checked is obtained until the acquiring unit.
The third aspect, the present invention provides a kind of storage medium, the storage medium is stored with a plurality of instruction, described instruction
Method suitable for being loaded by processor and being performed acquisition key as described in relation to the first aspect.
Fourth aspect, the present invention provides a kind of electronic equipment, the electronic equipment includes storage medium and processor;
The processor, is adapted for carrying out each instruction;
The storage medium, suitable for storing a plurality of instruction;
Described instruction is suitable for the method for being loaded by the processor and performing acquisition key as described in relation to the first aspect.
By above-mentioned technical proposal, the method and device of acquisition key provided by the invention, can obtain redis clusters
In all key when, without take a significant amount of time by manually again and again each node of manual entry redis-cli clients come
The key in each node is obtained, need to only be connected automatically in redis clusters successively according to the default order of connection by shell-command
Each node to be checked, and in connection after some node, be used to inquire about institute in present node by controlling the node to perform
There is the querying command of key to obtain all key in the node, after all key in obtaining the node, disconnected with the node
Connection, so as to continue to connect next node, untill the key in all nodes to be checked is obtained, so as to fulfill
It is automatic to obtain the function of all key in redis clusters, and then improve the efficiency for obtaining key.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention,
And can be practiced according to the content of specification, and in order to allow above and other objects of the present invention, feature and advantage can
Become apparent, below especially exemplified by the embodiment of the present invention.
Brief description of the drawings
By reading the detailed description of hereafter preferred embodiment, it is various other the advantages of and benefit it is common for this area
Technical staff will be clear understanding.Attached drawing is only used for showing the purpose of preferred embodiment, and is not considered as to the present invention
Limitation.And in whole attached drawing, identical component is denoted by the same reference numerals.In the accompanying drawings:
Fig. 1 shows a kind of flow chart of the method for acquisition key provided in an embodiment of the present invention;
Fig. 2 shows the flow chart of another method for obtaining key provided in an embodiment of the present invention;
Fig. 3 shows a kind of composition frame chart of the device of acquisition key provided in an embodiment of the present invention;
Fig. 4 shows the composition frame chart of another device for obtaining key provided in an embodiment of the present invention.
Embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
Limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
Completely it is communicated to those skilled in the art.
In order to improve the efficiency for obtaining key, an embodiment of the present invention provides a kind of method of acquisition key, as shown in Figure 1,
The described method includes:
101st, the destination node in redis clusters is connected based on shell-command.
Wherein, the destination node is to be not connected with all nodes determined according to the default order of connection, to be checked
Node, can be the portion in redis clusters wherein all nodes to be checked can be all nodes in redis clusters
Partial node, can according to demand depending on., can also since the nodal information in redis clusters can be obtained according to artificial enquiry
Automatically inquire about and obtain, so the default order of connection can be that the order of manual alignment is carried out previously according to node identification, can also
Be the order given tacit consent in automatic query result or after all nodal informations are obtained according to the suitable of preset rules arrangement
Sequence.
102nd, the destination node is controlled to perform the querying command for being used for inquiring about all key in present node.
Wherein, the querying command for inquiring about all key in present node can be keys* orders.When current device into
After work(is connected to destination node, keys* orders can be performed with control targe node, so that destination node utilizes keys* order energy
Enough inquire all key stored in present node.In addition, after destination node inquires wherein all key, can pass through
All key inquired are fed back to current device by shell-command by destination node so that current device can obtain target section
All key in point.
103rd, after the key that the destination node inquires is obtained, disconnected with the destination node, and continue basis
The default order of connection, other nodes being not connected with are connected based on the shell-command, are owned until acquisition is to be checked
Untill key in node.
Since current device can only connect a node at the same time in practical applications, so being inquired obtaining destination node
Key after, can be disconnected with the destination node, so as to continue to connect according to default connection based on shell-command
The definite next destination node of order.
The method of acquisition key provided in an embodiment of the present invention, can be in all key in obtaining redis clusters, without flower
The expense plenty of time is obtained in each node by the redis-cli clients of manually each each node of manual entry
Key, only need to connect each node to be checked in redis clusters automatically successively by shell-command according to the default order of connection,
And in connection after some node, by control the node to perform to be used for inquire about the querying command of all key in present node come
All key in the node are obtained, after all key in obtaining the node, are disconnected with the node, so as to continue
Next node is connected, untill the key in all nodes to be checked is obtained, redis clusters are obtained so as to fulfill automatic
In all key function, and then improve obtain key efficiency.
Further, additionally provide a kind of acquisition key's according to the method shown in Fig. 1, an alternative embodiment of the invention
Method, as shown in Fig. 2, this method mainly includes:
201st, the destination node in redis clusters is connected based on shell-command.
Wherein, a kind of implementation of linking objective node is treated as logging in the redis-cli clients of destination node
When work(logs in the redis-cli clients of destination node, destination node is just successfully linked up.In practical applications, can pass through
The form that username and password is sent to destination node logs in redis-cli clients, can also be by directly applying accessing mesh
The form for marking the special interface (interface that such as redis-cli clients communicate with the external world) of node logs in redis-cli visitors
Family end.Therefore, connecting the specific implementation of destination node in redis clusters based on shell-command can be:It is based on
Shell-command, access special interface or using account log-on message by way of log in mesh described in the redis clusters
The redis-cli clients of node are marked, to connect the destination node.
In addition, it is necessary to first obtain in redis clusters before the destination node during redis clusters are connected based on shell-command
All nodes.Referred in above-mentioned steps 101, in the node in obtaining redis clusters, can according to artificial enquiry and
, it can also automatically inquire about and obtain.Therefore, the specific implementation of all nodes in acquisition redis clusters can be:Obtain
All nodes of the redis clusters inquired in advance;Or all nodes in redis clusters are obtained based on shell-command.
202nd, the destination node is controlled to perform the querying command for being used for inquiring about all key in present node.
The specific implementation of this step can be:Control the destination node to obtain and perform by EOF orders encapsulation
Querying command, that is to say, that encapsulate querying command by EOF orders, when needing to perform querying command, control targe node obtains
The querying command encapsulated in EOF orders is taken, and control targe node performs the querying command obtained.
203rd, after the key that the destination node inquires is obtained, disconnected with the destination node, and continue basis
The default order of connection, other nodes being not connected with are connected based on the shell-command, are owned until acquisition is to be checked
Untill key in node.
The specific implementation of this step is identical with the specific implementation of above-mentioned steps 103, and details are not described herein.
204th, after the key of each node is obtained, the key processing based on default query demand to acquisition, and export
Query result corresponding with the default query demand;Alternatively, after the key of each node is obtained, the key of each node is passed
Third party's program is given, so that third party's program is based on key processing of the default query demand to acquisition, and it is defeated
Go out query result corresponding with the default query demand.
Query demand in practical application may not only include key all in inquiry redis clusters, it is also possible to including looking into
All key for meeting AD HOC in redis clusters, such as the key of query length within a preset range are ask, or is opened with XXX
The key of head.Therefore after all key in each node, can also according to default query demand to the key of acquisition at
Reason, so as to obtain query result corresponding with default query demand.Specifically, can the primary code based on shell-command come
Key processing based on default query demand to acquisition, can also send the key obtained at each node to third parties
Program, by third party's program based on key processing of the default query demand to acquisition, and it is corresponding to export default query demand
Query result.Wherein, third party's program can be the program that the advanced language of language more primary than shell is formed, such as third party
Language used in program can be java, python, ruby etc..
The method of acquisition key provided in an embodiment of the present invention, can not only automate and obtain owning in redis clusters
Key, additionally it is possible to pattern matching operation is carried out to all key of acquisition using the primary code or third party's program of shell, from
And it disclosure satisfy that more query demands.
Further, additionally provide a kind of acquisition key's according to above method embodiment, an alternative embodiment of the invention
Device, as shown in figure 3, described device mainly includes:Connection unit 31, control unit 32 and switching units 33.Wherein,
Connection unit 31, for connecting the destination node in redis clusters based on shell-command, the destination node is
The node being not connected with all nodes determined according to the default order of connection, to be checked.
All nodes wherein to be checked can be all nodes in redis clusters, can be the portion in redis clusters
Partial node, can according to demand depending on., can also since the nodal information in redis clusters can be obtained according to artificial enquiry
Automatically inquire about and obtain, so the default order of connection can be that the order of manual alignment is carried out previously according to node identification, can also
Be the order given tacit consent in automatic query result or after all nodal informations are obtained according to the suitable of preset rules arrangement
Sequence.
Control unit 32, the inquiry for being used to inquire about all key in present node for controlling the destination node to perform are ordered
Order;Wherein, the querying command for inquiring about all key in present node can be keys* orders.
Switching units 33, for after the key that the destination node inquires is obtained, disconnecting and connecting with the destination node
Connect;
The connection unit 31 is additionally operable to continue according to the default order of connection, it is connected based on the shell-command
The node that he was not connected with, untill the key in all nodes to be checked is obtained until the acquiring unit 33.
Since current device can only connect a node at the same time in practical applications, so being inquired obtaining destination node
Key after, can be disconnected with the destination node, so as to continue to connect according to default connection based on shell-command
The definite next destination node of order.
Further, as shown in figure 4, described device further includes:
Acquiring unit 34, before the destination node in redis clusters are connected based on shell-command, is obtained advance
All nodes of the redis clusters inquired;Or all nodes in redis clusters are obtained based on shell-command.
Further, the connection unit 31 is used to be based on shell-command, by accessing special interface or using account
The mode of log-on message logs in the redis-cli clients of destination node described in the redis clusters, to connect the target
Node.
Further, described control unit 32 is used to control the destination node to obtain and performs by EOF orders encapsulation
Querying command.
Further, as shown in figure 4, described device further includes:
Processing unit 35, for after the key of each node is obtained, being carried out based on default query demand to the key of acquisition
Processing;
Output unit 36, for exporting query result corresponding with the default query demand;
Delivery unit 37, for after the key of each node is obtained, sending the key of each node to third party programs,
So that third party's program is based on key processing of the default query demand to acquisition, and exports and looked into described preset
The corresponding query result of inquiry demand.
The device of acquisition key provided in an embodiment of the present invention, can be in all key in obtaining redis clusters, without flower
The expense plenty of time is obtained in each node by the redis-cli clients of manually each each node of manual entry
Key, only need to connect each node to be checked in redis clusters automatically successively by shell-command according to the default order of connection,
And in connection after some node, by control the node to perform to be used for inquire about the querying command of all key in present node come
All key in the node are obtained, after all key in obtaining the node, are disconnected with the node, so as to continue
Next node is connected, untill the key in all nodes to be checked is obtained, redis clusters are obtained so as to fulfill automatic
In all key function, and then improve obtain key efficiency.
Further, according to above-described embodiment, an alternative embodiment of the invention additionally provides a kind of storage medium, described
Storage medium is stored with a plurality of instruction, and described instruction is suitable for being loaded by processor and being performed the side as described above for obtaining key
Method.
Instruction in the storage medium of acquisition key provided in an embodiment of the present invention, can own in redis clusters are obtained
During key, without taking a significant amount of time by the way that manually the redis-cli clients of each node of manual entry are every to obtain again and again
Key in a node, only need to by shell-command according to the default order of connection successively automatically connect redis clusters in it is to be checked
Each node, and in connection after some node, be used to inquire about all key in present node by controlling the node to perform
Querying command obtains all key in the node, after all key in obtaining the node, is disconnected with the node, with
Just connection next node is can continue to, untill the key in all nodes to be checked is obtained, is obtained so as to fulfill automatic
The function of all key in redis clusters, and then improve the efficiency for obtaining key.
Further, according to above-described embodiment, an alternative embodiment of the invention additionally provides a kind of electronic equipment, described
Electronic equipment includes storage medium and processor;
The processor, is adapted for carrying out each instruction;
The storage medium, suitable for storing a plurality of instruction;
Described instruction is suitable for being loaded by the processor and being performed the method as described above for obtaining key.
The electronic equipment of acquisition key provided in an embodiment of the present invention, can be in all key in obtaining redis clusters, nothing
It need to take a significant amount of time by the redis-cli clients of manually each each node of manual entry to obtain in each node
Key, need to only connect each section to be checked in redis clusters automatically successively according to the default order of connection by shell-command
Point, and in connection after some node, by controlling the node to perform the querying command for being used for inquiring about all key in present node
To obtain all key in the node, after all key in obtaining the node, disconnected with the node, so as to after
Continuous connection next node, untill the key in all nodes to be checked is obtained, redis collection is obtained so as to fulfill automatic
The function of all key in group, and then improve the efficiency for obtaining key.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and does not have the portion being described in detail in some embodiment
Point, it may refer to the associated description of other embodiment.
It is understood that the correlated characteristic in the above method, apparatus and system can be referred to mutually.In addition, above-mentioned reality
It is to be used to distinguish each embodiment to apply " first " in example, " second " etc., and does not represent the quality of each embodiment.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, may be referred to the corresponding process in preceding method embodiment, details are not described herein.
Algorithm and display be not inherently related to any certain computer, virtual system or miscellaneous equipment provided herein.
Various general-purpose systems can also be used together with teaching based on this.As described above, required by constructing this kind of system
Structure be obvious.In addition, the present invention is not also directed to any certain programmed language.It should be understood that it can utilize various
Programming language realizes the content of invention described herein, and the description done above to language-specific is to disclose this hair
Bright preferred forms.
In the specification that this place provides, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention
Example can be put into practice in the case of these no details.In some instances, known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help to understand one or more of each inventive aspect,
Above in the description to the exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:I.e. required guarantor
The application claims of shield features more more than the feature being expressly recited in each claim.It is more precisely, such as following
Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore,
Thus the claims for following embodiment are expressly incorporated in the embodiment, wherein each claim is in itself
Separate embodiments all as the present invention.
Those skilled in the art, which are appreciated that, to carry out adaptively the module in the equipment in embodiment
Change and they are arranged in one or more equipment different from the embodiment.Can be the module or list in embodiment
Member or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or
Sub-component.In addition at least some in such feature and/or process or unit exclude each other, it can use any
Combination is disclosed to all features disclosed in this specification (including adjoint claim, summary and attached drawing) and so to appoint
Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power
Profit requires, summary and attached drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation
Replace.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included some features rather than further feature, but the combination of the feature of different embodiments means in of the invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed
One of meaning mode can use in any combination.
The all parts embodiment of the present invention can be with hardware realization, or to be run on one or more processor
Software module realize, or realized with combinations thereof.It will be understood by those of skill in the art that it can use in practice
Microprocessor or digital signal processor (DSP) are realized in the method and device of acquisition key according to embodiments of the present invention
Some or all components some or all functions.The present invention is also implemented as being used to perform side as described herein
The some or all equipment or program of device (for example, computer program and computer program product) of method.It is such
Realizing the program of the present invention can store on a computer-readable medium, or can have the shape of one or more signal
Formula.Such signal can be downloaded from internet website and obtained, and either be provided or with any other shape on carrier signal
Formula provides.
It should be noted that the present invention will be described rather than limits the invention for above-described embodiment, and ability
Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference symbol between bracket should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not
Element or step listed in the claims.Word "a" or "an" before element does not exclude the presence of multiple such
Element.The present invention can be by means of including the hardware of some different elements and being come by means of properly programmed computer real
It is existing.In if the unit claim of equipment for drying is listed, several in these devices can be by same hardware branch
To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and run after fame
Claim.
Claims (12)
- A kind of 1. method of acquisition key, it is characterised in that the described method includes:Destination node in redis clusters is connected based on shell-command, the destination node is to be determined according to the default order of connection , the node being not connected with all nodes to be checked;The destination node is controlled to perform the querying command for being used for inquiring about all key in present node;After the key that the destination node inquires is obtained, disconnect, and continue according to described default with the destination node The order of connection, other nodes being not connected with are connected based on the shell-command, until obtaining in all nodes to be checked Untill key.
- 2. according to the method described in claim 1, it is characterized in that, based on shell-command connect redis clusters in target Before node, the method further includes:Obtain all nodes of the redis clusters inquired in advance;Or all nodes in redis clusters are obtained based on shell-command.
- 3. the according to the method described in claim 1, it is characterized in that, mesh connected based on shell-command in redis clusters Mark node includes:Based on shell-command, access special interface or using account log-on message by way of log in the redis clusters Described in destination node redis-cli clients, to connect the destination node.
- 4. according to the method in any one of claims 1 to 3, it is characterised in that the control destination node performs Querying command for inquiring about all key in present node includes:Control the destination node to obtain and perform by the querying command of EOF orders encapsulation.
- 5. according to the method in any one of claims 1 to 3, it is characterised in that the method further includes:After the key of each node is obtained, the key processing based on default query demand to acquisition, and export with it is described pre- If the corresponding query result of query demand;Alternatively, after the key of each node is obtained, the key of each node is sent to third party programs, so as to the third party Program exports look into corresponding with the default query demand based on key processing of the default query demand to acquisition Ask result.
- 6. a kind of device of acquisition key, it is characterised in that described device includes:Connection unit, for connecting the destination node in redis clusters based on shell-command, the destination node is according to pre- The node being not connected with all nodes that if the order of connection determines, to be checked;Control unit, for controlling the destination node to perform the querying command for being used for inquiring about all key in present node;Switching units, for after the key that the destination node inquires is obtained, being disconnected with the destination node;The connection unit is additionally operable to continue according to the default order of connection, connects other based on the shell-command and does not connect The node taken over, untill the key in all nodes to be checked is obtained until the acquiring unit.
- 7. device according to claim 6, it is characterised in that described device further includes:Acquiring unit, before the destination node in redis clusters are connected based on shell-command, acquisition inquires in advance Redis clusters all nodes;Or all nodes in redis clusters are obtained based on shell-command.
- 8. device according to claim 6, it is characterised in that the connection unit is used to be based on shell-command, passes through visit Ask that special interface or the mode using account log-on message log in the redis- of destination node described in the redis clusters Cli clients, to connect the destination node.
- 9. the device according to any one of claim 6 to 8, it is characterised in that described control unit is used to control described Destination node obtains and performs the querying command encapsulated by EOF orders.
- 10. the device according to any one of claim 6 to 8, it is characterised in that described device further includes:Processing unit, for after the key of each node is obtained, the key processing based on default query demand to acquisition;Output unit, for exporting query result corresponding with the default query demand;Delivery unit, for after the key of each node is obtained, the key of each node being sent to third party programs, with toilet Third party's program is stated based on key processing of the default query demand to acquisition, and is exported and the default query demand Corresponding query result.
- A kind of 11. storage medium, it is characterised in that the storage medium is stored with a plurality of instruction, described instruction be suitable for by The method that reason device loads and performs the acquisition key as any one of claim 1 to 5.
- 12. a kind of electronic equipment, it is characterised in that the electronic equipment includes storage medium and processor;The processor, is adapted for carrying out each instruction;The storage medium, suitable for storing a plurality of instruction;Described instruction is suitable for being loaded as the processor and performing the side of the acquisition key as any one of claim 1 to 5 Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710705160.XA CN108011744A (en) | 2017-08-17 | 2017-08-17 | Obtain the method and device of key |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710705160.XA CN108011744A (en) | 2017-08-17 | 2017-08-17 | Obtain the method and device of key |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108011744A true CN108011744A (en) | 2018-05-08 |
Family
ID=62050868
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710705160.XA Pending CN108011744A (en) | 2017-08-17 | 2017-08-17 | Obtain the method and device of key |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108011744A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102799486A (en) * | 2012-06-18 | 2012-11-28 | 北京大学 | Data sampling and partitioning method for MapReduce system |
CN103312624A (en) * | 2012-03-09 | 2013-09-18 | 腾讯科技(深圳)有限公司 | Message queue service system and method |
CN103412897A (en) * | 2013-07-25 | 2013-11-27 | 中国科学院软件研究所 | Parallel data processing method based on distributed structure |
US20160266944A1 (en) * | 2015-03-09 | 2016-09-15 | International Business Machines Corporation | Scalable Parallel Messaging Process |
CN106357449A (en) * | 2016-09-27 | 2017-01-25 | 深圳市彬讯科技有限公司 | zedis distributed type buffer method |
-
2017
- 2017-08-17 CN CN201710705160.XA patent/CN108011744A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103312624A (en) * | 2012-03-09 | 2013-09-18 | 腾讯科技(深圳)有限公司 | Message queue service system and method |
CN102799486A (en) * | 2012-06-18 | 2012-11-28 | 北京大学 | Data sampling and partitioning method for MapReduce system |
CN103412897A (en) * | 2013-07-25 | 2013-11-27 | 中国科学院软件研究所 | Parallel data processing method based on distributed structure |
US20160266944A1 (en) * | 2015-03-09 | 2016-09-15 | International Business Machines Corporation | Scalable Parallel Messaging Process |
CN106357449A (en) * | 2016-09-27 | 2017-01-25 | 深圳市彬讯科技有限公司 | zedis distributed type buffer method |
Non-Patent Citations (2)
Title |
---|
POPSIDELEE: "redis集群批量删除key", 《CSDN,HTTPS://BLOG.CSDN.NET/BADYTING/ARTICLE/DETAILS/76176824》 * |
杨春龙: "Jedis实现批量删除redis cluster", 《CSDN,HTTPS://BLOG.CSDN.NET/YANGCL123/ARTICLE/DETAILS/52850569》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10334048B2 (en) | On-premise data collection and ingestion using industrial cloud agents | |
US8250355B2 (en) | Method, system, and product for identifying provisioning operations via planning methods | |
CN107507005A (en) | Data access method and system outside a kind of chain based on alliance's chain | |
CN107705151A (en) | Advertisement putting regulation and control show method and device | |
CN109474633A (en) | Method for converting protocol, calculates equipment and computer storage medium at device | |
CN103391312B (en) | Resource offline method for down loading and device | |
CN105786460A (en) | Software development method and device based on service composition | |
CN108737467A (en) | A kind of server log inspection method, device and system | |
CN105471968B (en) | A kind of method for interchanging data, system and data platform server | |
US20150286505A1 (en) | Computing system resource provisioning | |
CN105208090A (en) | Zookeeper-based Leader selection method | |
CN102208081A (en) | Method for making business process management (BPM) application to be suitable for being used by multi-tenancy (MT) usages and apparatus thereof | |
CN106375442A (en) | Cross-platform device information management method and apparatus | |
CN107609907A (en) | The regulation and control method and device of advertisement position | |
CN112532711A (en) | Edge computing application deployment method, terminal, edge computing node and storage medium | |
CN110347946A (en) | A kind of page display method, device, computer equipment and storage medium | |
CN110197064A (en) | Process handling method and device, storage medium and electronic device | |
CN104660997A (en) | Service oriented multi-source heterogeneous video surveillance adaptation method and system | |
CN113728342A (en) | Method for configuring a monitoring system for monitoring industrial processes and industrial assets | |
CN105376309A (en) | Access gateway distribution method and device | |
CN110457289A (en) | Advertisement promotion channel interconnection method, system, electronic equipment and readable storage medium storing program for executing | |
US20140019515A1 (en) | Adaptive business logic configurator | |
CN108011744A (en) | Obtain the method and device of key | |
CN103425793B (en) | Method for utilizing database purchase layer to access data base in instant communicating system | |
CN105354081B (en) | The method and device of synchronous binding service |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180508 |