CA3138961A1 - Hive table state changing method and device - Google Patents
Hive table state changing method and device Download PDFInfo
- Publication number
- CA3138961A1 CA3138961A1 CA3138961A CA3138961A CA3138961A1 CA 3138961 A1 CA3138961 A1 CA 3138961A1 CA 3138961 A CA3138961 A CA 3138961A CA 3138961 A CA3138961 A CA 3138961A CA 3138961 A1 CA3138961 A1 CA 3138961A1
- Authority
- CA
- Canada
- Prior art keywords
- status
- hive table
- target hive
- server
- target
- 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
- 238000000034 method Methods 0.000 title claims abstract description 30
- 230000008859 change Effects 0.000 claims abstract description 40
- 230000002045 lasting effect Effects 0.000 claims description 7
- 238000004590 computer program Methods 0.000 claims description 6
- 238000012217 deletion Methods 0.000 description 11
- 230000037430 deletion Effects 0.000 description 11
- 230000009286 beneficial effect Effects 0.000 description 5
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 239000010200 folin Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/248—Presentation of query results
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Information Transfer Between Computers (AREA)
- Stored Programmes (AREA)
- Computer And Data Communications (AREA)
Abstract
A method and an apparatus for changing statuses of Hive tables disclosed allow disabling or enabling of Hive tables and involve: receiving, by a server from a client, operation instructions directed to a target Hive table, wherein the operation instructions include status-changing instructions and/or a status-querying instruction; determining, by the server, whether a change in a current status of the target Hive table is to be implemented according to information about a table name, an operating user, and a desired status of the target Hive table contained in the status-changing instructions, and feeding back an implementation result to the client; and/or querying, by the server, the current status of the target Hive table according to the information about the table name and the operating user of the target Hive table contained in the status-querying instruction and feeding back a query result to the client.
Description
HIVE TABLE STATE CHANGING METHOD AND DEVICE
BACKGROUND OF THE INVENTION
Technical Field [0001] The present invention relates to big data technologies, and more particularly to a method and an apparatus for changing statuses of Hive tables.
Description of Related Art
BACKGROUND OF THE INVENTION
Technical Field [0001] The present invention relates to big data technologies, and more particularly to a method and an apparatus for changing statuses of Hive tables.
Description of Related Art
[0002] As a data warehouse tool based on Hadoop, Hive is be used to map structured data files into database tables, and serves to provide SQL-like query functionality. Hive-based data tables can be classified into internal tables and external tables, and the essential difference therebetween is whether deletion of a Hive table causes deletion of the data in that table.
Deletion of a Hive table can be achieved using the statement of drop table tableName.
However, either for internal tables or external tables, deletion with the foregoing drop statement will delete all the metadata such as field names and field types in the table as well as storage paths of table data files in HDFS immediately, which means gray-scale deletion is not supported.
Deletion of a Hive table can be achieved using the statement of drop table tableName.
However, either for internal tables or external tables, deletion with the foregoing drop statement will delete all the metadata such as field names and field types in the table as well as storage paths of table data files in HDFS immediately, which means gray-scale deletion is not supported.
[0003] Conventionally, table enabling and disabling functions like those supported by Base are not allowed in Hive open-source communities, and therefore degraded operation of Hive tables is impossible. The disadvantageous consequence is that Hive tables do not support gray-scale deletion, and thus the risk of deletion by error is high.
SUMMARY OF THE INVENTION
SUMMARY OF THE INVENTION
[0004] The objective of the present invention is to provide a method and an apparatus for changing statuses of Hive tables, which allow disabling or enabling of Hive tables.
[0005] To achieve the foregoing objective, in a first aspect, the present invention provides a Date recue / Date received 2021-12-03 method for changing statuses of Hive tables, comprising:
[0006] receiving, by a server from a client, operation instructions directed to a target Hive table, wherein the Hive table operation instructions include status-changing instructions and/or a status-querying instruction;
[0007] determining, by the server, whether a change in a current status of the target Hive table is to be implemented according to information about a table name, an operating user, and a desired status of the target Hive table contained in the status-changing instructions, and feeding back an implementation result to the client; and/or
[0008] querying, by the server, the current status of the target Hive table according to the information about the table name and the operating user of the target Hive table contained in the status-querying instruction and feeding back a query result to the client.
[0009] Preferably, the status-changing instructions include a disabling changing instruction and an changing enabling instruction, the disabling changing instruction is a disablinginstruction, the enabling changing instruction is an enablinginstruction.
[0010] More preferably, the step of "determining, by the server, whether a change in a current status of the target Hive table is to be implemented according to information about a table name, an operating user, and a desired status of the target Hive table contained in the status-changing instructions, and feeding back an implementation result to the client" comprises:
[0011] when the server confirms that the target Hive table exists, and the current operating user has operating authority, and the current status of the target Hive table is an enabled status, changing, by the server, the current status of the target Hive table into a disenabled status by modifying attribute parameters of the target Hive table based on the information about the table name, the operating user, and the desired status of the target Hive table contained in the disabling instruction, wherein the attribute parameters include the current status of the target Hive table, and a time to change the current status, or the attribute parameters also include a lasting period where the current status stays in a disabled status;
[0012] when the server confirms that the target Hive table exists, and the current operating user has operating authority, and the current status of the target Hive table is a disabled status, changing, by the server, the current status of the target Hive table into an enabled status by Date recue / Date received 2021-12-03 modifying the attribute parameters of the target Hive table based on the information about the table name, the operating user, and the desired status of the target Hive table in the enabling instruction;
[0013] when the server confirms that the target Hive table does not exist, or the current operating user does not have operating authority, or the desired status of the target Hive table is in consistence with the current status, refusing to implement the change in the current status of the target Hive table; and
[0014] feeding, by the server to the client, the implementation result about the target Hive table.
[0015] More preferably, the step of "querying, by the server, the current status of the target Hive table according to the information about the table name and the operating user of the target Hive table contained in the status-querying instruction and feeding back a query result to the client" comprises:
[0016] the statuses of the target Hive table include a disabled status and an enabled status; and
[0017] according to the table name and the operating user of the target Hive table contained in the status-querying instruction, when the current status of the target Hive table is the enabled status, feeding back, by the server, the query result to the client, or when the current status of the target Hive table is the disabled status, feeding back, by the server to the client, a prompt indicating that the disabled status is present and no query is allowed.
[0018] Optionally, after the step of "when the current status of the target Hive table is the disabled status, feeding back, by the server to the client, a prompt indicating that the disabled status is present and no query is allowed," the method further comprises:
[0019] recognizing the disabled status of target Hive table is a time-out incurred disabled status or a non-time-out incurred disabled status; and
[0020] when the target Hive table is in the time-out incurred disabled status, sending, by the server to the client, a prompt indicating that the target Hive table can be deleted, or when the target Hive table is in the non-time-out incurred disabled status, sending, by the server to the client, a prompt indicating that no operation is allowed to be done on the target Hive table.
[0021] Exemplarily, whether the target Hive table is in the time-out incurred disabled status or Date recue / Date received 2021-12-03 in the non-time-out incurred disabled status is determined by:
[0022] recognizing the attribute parameters of the target Hive table, when a difference between a current time and the time to change the current status exceeds a predetermined interval threshold, determining that the target Hive table is in the time-out incurred disabled status, or when the difference does not exceed the predetermined interval threshold, determining that the target Hive table is in the non-time-out incurred disabled status.
[0023] Preferably, the server implements the change in the current status of the target Hive table while modifying a number of copies of the target Hive table.
[0024] Exemplarily, the server is a Hive Thrift Server.
[0025] As compared to the prior art, the disclosed method provides the following beneficial effects.
[0026] In the disclosed method, the server receives operation instructions about the Hive table from the client and determines whether the Hive table whether meets the status changing conditions according to information about a table name, an operating user, and a desired status of the target Hive table contained in the status-changing instructions.
If the conditions are met, the server changes the status of the table and feeds back the change result to the client. If the conditions are not met, the server denies to make such change and sends its rejection to the client instead. In addition, the server may receive the status-querying instruction from the client, and determines whether the target Hive table meets the query conditions according to the table name and the operating user of the target Hive table contained in the status-querying instruction. If the conditions are met, the query result is fed back to the client; otherwise, a prompt indicating rejection of query is sent to the client.
If the conditions are met, the server changes the status of the table and feeds back the change result to the client. If the conditions are not met, the server denies to make such change and sends its rejection to the client instead. In addition, the server may receive the status-querying instruction from the client, and determines whether the target Hive table meets the query conditions according to the table name and the operating user of the target Hive table contained in the status-querying instruction. If the conditions are met, the query result is fed back to the client; otherwise, a prompt indicating rejection of query is sent to the client.
[0027] In view that a Hive table inherently does not support disabling and enabling functions, the present invention realizes the desired disabling and enabling functions by means of interaction between the server and the client through status changing instructions that change the attribute parameters of the target Hive table, without introducing any zookeeper component.
[0028] In a second aspect, the present invention provides an apparatus for changing statuses of Date recue / Date received 2021-12-03 Hive tables, which implements the previously disclosed method. The apparatus comprises:
[0029] a transceiver unit, for receiving, by a server from a client, operation instructions directed to a target Hive table, wherein the Hive table operation instructions include status-changing instructions and/or a status-querying instruction;
[0030] a change unit, for determining, by the server, whether a change in a current status of the target Hive table is to be implemented according to information about a table name, an operating user, and a desired status of the target Hive table contained in the status-changing instructions, and feeding back an implementation result to the client; and
[0031] a query unit, for querying, at the server, the current status of the target Hive table according to the information about the table name and the operating user of the target Hive table contained in the status-querying instruction and feeding back a query result to the client.
[0032] As compared to the prior art, the disclosed Hive table status change apparatus provides beneficial effects that are similar to those provided by the disclose method as enumerated above, and thus no repetitions are made herein.
[0033] In a third aspect, the present invention provides a computer-readable storage medium storing therein a computer program, wherein the computer program when executed by a processor performing the steps of the method for changing statuses of Hive tables as discussed previously.
[0034] As compared to the prior art, the disclosed computer-readable storage medium provides beneficial effects that are similar to those provided by the disclose method as enumerated above, and thus no repetitions are made herein.
BRIEF DESCRIPTION OF THE DRAWINGS
BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings are provided herein for better understanding of the present invention and form a part of this disclosure. The illustrative embodiments and their descriptions are for explaining the present invention and by no means folin any improper limitation to the present invention, wherein:
[0036] FIG. 1 is a flowchart of a method for changing statuses of Hive tables according to one Date recue / Date received 2021-12-03 embodiment of the present invention.
DETAILED DESCRIPTION OF THE INVENTION
DETAILED DESCRIPTION OF THE INVENTION
[0037] To make the foregoing objectives, features, and advantages of the present invention clearer and more understandable, the following description will be directed to some embodiments as depicted in the accompanying drawings to detail the technical schemes disclosed in these embodiments. It is, however, to be understood that the embodiments referred herein are only a part of all possible embodiments and thus not exhaustive. Based on the embodiments of the present invention, all the other embodiments can be conceived without creative labor by people of ordinary skill in the art, and all these and other embodiments shall be embraced in the scope of the present invention.
Embodiment 1
Embodiment 1
[0038] Referring to FIG. 1, the present embodiment provides a method for changing statuses of Hive tables, comprising:
[0039] receiving, by a server from a client, operation instructions directed to a target Hive table, wherein the Hive table operation instructions include status-changing instructions and/or a status-querying instruction; determining, by the server, whether a change in a current status of the target Hive table is to be implemented according to information about a table name, an operating user, and a desired status of the target Hive table contained in the status-changing instructions, and feeding back an implementation result to the client; and/or querying, by the server, the current status of the target Hive table according to the information about the table name and the operating user of the target Hive table contained in the status-querying instruction and feeding back a query result to the client.
[0040] In the disclosed method, the server receives operation instructions about the Hive table from the client and determines whether the Hive table whether meets the status changing conditions according to information about a table name, an operating user, and a desired status of the target Hive table contained in the status-changing instructions.
If the conditions are met, the server changes the status of the table and feeds back the change Date recue / Date received 2021-12-03 result to the client. If the conditions are not met, the server denies to make such change and sends its rejection to the client instead. In addition, the server may receive the status-querying instruction from the client, and determines whether the target Hive table meets the query conditions according to the table name and the operating user of the target Hive table contained in the status-querying instruction. If the conditions are met, the query result is fed back to the client; otherwise, a prompt indicating rejection of query is sent to the client.
If the conditions are met, the server changes the status of the table and feeds back the change Date recue / Date received 2021-12-03 result to the client. If the conditions are not met, the server denies to make such change and sends its rejection to the client instead. In addition, the server may receive the status-querying instruction from the client, and determines whether the target Hive table meets the query conditions according to the table name and the operating user of the target Hive table contained in the status-querying instruction. If the conditions are met, the query result is fed back to the client; otherwise, a prompt indicating rejection of query is sent to the client.
[0041] In view that a Hive table inherently does not support disabling and enabling functions, the present invention realizes the desired disabling and enabling functions by means of interaction between the server and the client through status changing instructions that change the attribute parameters of the target Hive table, without introducing any zookeeper component. By executing the disabling or enabling instruction, the attribute parameters of the target Hive table are modified. Any operation relates to a Hive table involves calling metadata from the metastore using getTablemethod. In getTable, according to the type of the current operation, determination statements based on attributes of the table can be added and executed, thereby realizing the desired disabling and enabling functions.
[0042] Specifically, the status-changing instructions include a disabling changing instruction and an enabling changing instruction. For example, the disabling changing instruction is a disablinginstruction, the enabling changing instruction is an enablinginstruction, the status-querying instruction shows the table status.
[0043] In the foregoing embodiment, the step of "determining, by the server, whether a change in a current status of the target Hive table is to be implemented according to information about a table name, an operating user, and a desired status of the target Hive table contained in the status-changing instructions, and feeding back an implementation result to the client"
comprises:
comprises:
[0044] when the server confirms that the target Hive table exists, and the current operating user has operating authority, and the current status of the target Hive table is an enabled status, changing, by the server, the current status of the target Hive table into a disenabled status by modifying attribute parameters of the target Hive table based on the information about Date recue / Date received 2021-12-03 the table name, the operating user, and the desired status of the target Hive table contained in the disabling instruction, wherein the attribute parameters include the current status of the target Hive table, and a time to change the current status, or the attribute parameters also include a lasting period where the current status stays in a disabled status; when the server confirms that the target Hive table exists, and the current operating user has operating authority, and the current status of the target Hive table is a disabled status, changing, by the server, the current status of the target Hive table into an enabled status by modifying the attribute parameters of the target Hive table based on the information about the table name, the operating user, and the desired status of the target Hive table in the enabling instruction; when the server confirms that the target Hive table does not exist, or the current operating user does not have operating authority, or the desired status of the target Hive table is in consistence with the current status, refusing to implement the change in the current status of the target Hive table; and feeding, by the server to the client, the implementation result about the target Hive table.
[0045] In a particular implementation, the disabling instruction is sent to the server through the client. The server based on the disabling instruction confirms whether the target Hive table exists and whether the current operating user has operating authority and whether the target Hive table is in the enabled status. When all the results are positive, the server enters the target Hive table into the disabled status by modifying the attribute parameters of the target Hive table. For example, the server changes the current status of the table into the disabled status, changes the time to change the current status ti or the server also changes the lasting period where the current status stays in a disabled status to n days. The server can at the same time optionally change the number of copies of the target Hive table data file.
Similarly, when the enabling instruction is sent to the server through the client, the server based on the enabling instruction confirms whether the target Hive table exists and whether the current operating user has operating authority and whether the target Hive table is currently in the disabled status. When all the results are positive, the server enters the target Hive table into the enabled status by modifying the attribute parameters of the target Hive table. For example, the server changes the current status into the enabled status, changes Date recue / Date received 2021-12-03 the time to change the current status t2. The server can at the same time optionally change the number of copies of the target Hive table data file.
Similarly, when the enabling instruction is sent to the server through the client, the server based on the enabling instruction confirms whether the target Hive table exists and whether the current operating user has operating authority and whether the target Hive table is currently in the disabled status. When all the results are positive, the server enters the target Hive table into the enabled status by modifying the attribute parameters of the target Hive table. For example, the server changes the current status into the enabled status, changes Date recue / Date received 2021-12-03 the time to change the current status t2. The server can at the same time optionally change the number of copies of the target Hive table data file.
[0046] Exemplarily, the server after receiving the disabling instruction about the target Hive table and changing the status of the target Hive table sets the attribute parameters of the target Hive table: the current status (table.status="disable"), the time to change the current status (table.status.modify.time="XXX"), and the lasting period where the current status stays in a disabled status in days, such as n days (table.storage.day="n"). If the instruction specifies a reasonable number of copies, the server may change the number of copies at the same time. Generally, a reasonable number of copies for a target Hive table in the disabled status is 1 or 2. The server after receiving the enabling instruction about the target Hive table and changing the status of the target Hive table sets the attribute parameters of the target Hive table: the current status (table.status="enable"), the time to change the current status (table.status.modify.time="XXX"), the lasting period where the current status stays in a disabled status in days, such as unlimited days (table.storage.day="99999"). If the instruction specifies a reasonable number of copies, the server may change the number of copies at the same time. Generally, a reasonable number of copies for a target Hive table the enabled status is 2 or 3.
[0047] In the foregoing embodiment, the step of "querying, by the server, the current status of the target Hive table according to the information about the table name and the operating user of the target Hive table contained in the status-querying instruction and feeding back a query result to the client" comprises:
[0048] recognizing whether the target Hive table is in a disabled status or an enabled status; and according to the table name and the operating user of the target Hive table contained in the status-querying instruction, when the current status of the target Hive table is the enabled status, feeding back, by the server, the query result to the client, or when the target Hive table is in the disabled status, feeding back a prompt to the client indicating that the current status is the disabled status and no query is possible. Therein, the disabled status of target Hive table is recognized a time-out incurred disabled status or a non-time-out incurred disabled status. When the target Hive table is in the time-out incurred disabled status, the Date recue / Date received 2021-12-03 server sends to the client a prompt indicating that the target Hive table can be deleted.
When the target Hive table is in the non-time-out incurred disabled status, the server sends to the client a prompt indicating that no operation is allowed to be done on the target Hive table. Exemplarily, the deletion instruction is drop table tableName.
When the target Hive table is in the non-time-out incurred disabled status, the server sends to the client a prompt indicating that no operation is allowed to be done on the target Hive table. Exemplarily, the deletion instruction is drop table tableName.
[0049] It is well known that a Hive table in its disabled status permits no operations thereon, no matter it is query, modification, writing or deletion. For example, when a user initiates a query request to the target Hive table in the disabled status through the client, the server replies to the client with a disabling prompt. At this time, if the user needs to further check the target Hive table, he/she may first enter the target Hive table into the hanging enabled status, and then perform the query operation.
[0050] Furthermore, in the foregoing embodiment, whether the target Hive table is in the time-out incurred disabled status or in the non-time-out incurred disabled status is determined by:
[0051] recognizing the attribute parameters of the target Hive table, when a difference between a current time and the time to change the current status exceeds a predetermined interval threshold, determining that the target Hive table is in the time-out incurred disabled status, or when the difference does not exceed the predetermined interval threshold, determining that the target Hive table is in the non-time-out incurred disabled status.
[0052] In a particular implementation, assuming that the lasting period of the disabled status of the target Hive table is n days, and the difference between the current time and the last status changing time of the target Hive table is greater than n days, it means that the target Hive table is in the time-out incurred disabled status and can be deleted.
Otherwise, the target Hive table is determined as being in the non-time-out incurred disabled status and cannot be deleted. It is to be noted that the target Hive table in the time-out incurred disabled status can only be deleted and no other operations such as query, modification, reading and writing can be performed. Exemplarily, the deletion instruction is drop table tableName.
Otherwise, the target Hive table is determined as being in the non-time-out incurred disabled status and cannot be deleted. It is to be noted that the target Hive table in the time-out incurred disabled status can only be deleted and no other operations such as query, modification, reading and writing can be performed. Exemplarily, the deletion instruction is drop table tableName.
[0053] In the foregoing embodiment, with addition of the time-out incurred disabled status and the non-time-out incurred disabled status, grey-scale deletion of Hive tables and degraded Date recue / Date received 2021-12-03 operation of Hive tables can be achieved.
[0054] Optionally, the server used in the foregoing embodiment is a Hive Thrift Server.
Embodiment 2
Embodiment 2
[0055] The present embodiment provides an apparatus for changing statuses of Hive tables. The apparatus comprises:
[0056] a transceiver unit, for receiving, by a server from a client, operation instructions directed to a target Hive table, wherein the Hive table operation instructions include status-changing instructions and/or a status-querying instruction;
[0057] a change unit, for determining, by the server, whether a change in a current status of the target Hive table is to be implemented according to information about a table name, an operating user, and a desired status of the target Hive table contained in the status-changing instructions, and feeding back an implementation result to the client; and/or
[0058] a query unit, for querying, by the server, the current status of the target Hive table according to the information about the table name and the operating user of the target Hive table contained in the status-querying instruction and feeding back a query result to the client.
[0059] As compared to the prior art, the disclosed Hive table status change apparatus provides beneficial effects that are similar to those provided by the disclose method as enumerated above, and thus no repetitions are made herein.
Embodiment 3
Embodiment 3
[0060] The present embodiment provides a computer-readable storage medium storing therein a computer program, wherein the computer program when executed by a processor performing the steps of the method for changing statuses of Hive tables as discussed previously.
[0061] As compared to the prior art, the disclosed computer-readable storage medium provides beneficial effects that are similar to those provided by the disclose method as enumerated above, and thus no repetitions are made herein.
Date recue / Date received 2021-12-03
Date recue / Date received 2021-12-03
[0062] As will be appreciated by people of ordinary skill in the art, implementation of all or a part of the steps of the method of the present invention as described previously may be realized by having a program instruct related hardware components. The program may be stored in a computer-readable storage medium, and the program is about performing the individual steps of the methods described in the foregoing embodiments. The storage medium may be a ROM/RAM, a disk, a compact disk, a memory card or the like.
[0063] The present invention has been described with reference to the preferred embodiments and it is understood that the embodiments are not intended to limit the scope of the present invention. Moreover, as the contents disclosed herein should be readily understood and can be implemented by a person skilled in the art, all equivalent changes or modifications which do not depart from the concept of the present invention should be encompassed by the appended claims. Hence, the scope of the present invention shall only be defined by the appended claims.
Date recue / Date received 2021-12-03
Date recue / Date received 2021-12-03
Claims (10)
1. A method for changing statuses of Hive tables, comprising steps of:
receiving, by a server from a client, operation instructions directed to a target Hive table, wherein the Hive table operation instructions include status-changing instructions and/or a status-query ing instruction;
determining, by the server, whether a change in a current status of the target Hive table is to be implemented according to information about a table name, an operating user, and a desired status of the target Hive table contained in the status-changing instructions, and feeding back an implementation result to the client; and/or querying, by the server, the current status of the target Hive table according to the information about the table name and the operating user of the target Hive table contained in the status-querying instruction and feeding back a query result to the client.
receiving, by a server from a client, operation instructions directed to a target Hive table, wherein the Hive table operation instructions include status-changing instructions and/or a status-query ing instruction;
determining, by the server, whether a change in a current status of the target Hive table is to be implemented according to information about a table name, an operating user, and a desired status of the target Hive table contained in the status-changing instructions, and feeding back an implementation result to the client; and/or querying, by the server, the current status of the target Hive table according to the information about the table name and the operating user of the target Hive table contained in the status-querying instruction and feeding back a query result to the client.
2. The method of claim 1, wherein the status-changing instructions include a disabling changing instruction and an enabling changing instruction, the disabling changing instruction is a disablinginstruction, the enabling changing instruction is an enablinginstruction.
3. The method of claim 2, wherein the step of "determining, by the server, whether a change in a current status of the target Hive table is to be implemented according to information about a table name, an operating user, and a desired status of the target Hive table contained in the status-changing instructions, and feeding back an implementation result to the client" comprises:
when the server confirms that the target Hive table exists, and the current operating user has Date recue / Date received 2021-12-03 operating authority, and the current status of the target Hive table is an enabled status, changing, by the server, the current status of the target Hive table into a disenabled status by modifying attribute parameters of the target Hive table based on the information about the table name, the operating user, and the desired status of the target Hive table contained in the disabling instruction, wherein the attribute parameters include the current status of the target Hive table, and a time to change the current status, or the attribute parameters also include a lasting period where the current status stays in a disabled status;
when the server confirms that the target Hive table exists, and the current operating user has operating authority, and the current status of the target Hive table is a disabled status, changing, by the server, the current status of the target Hive table into an enabled status by modifying the attribute parameters of the target Hive table based on the information about the table name, the operating user, and the desired status of the target Hive table in the enabling instruction;
when the server confirms that the target Hive table does not exist, or the current operating user does not have operating authority, or the desired status of the target Hive table is in consistence with the current status, refusing to implement the change in the current status of the target Hive table; and feeding, by the server to the client, the implementation result about the target Hive table.
when the server confirms that the target Hive table exists, and the current operating user has Date recue / Date received 2021-12-03 operating authority, and the current status of the target Hive table is an enabled status, changing, by the server, the current status of the target Hive table into a disenabled status by modifying attribute parameters of the target Hive table based on the information about the table name, the operating user, and the desired status of the target Hive table contained in the disabling instruction, wherein the attribute parameters include the current status of the target Hive table, and a time to change the current status, or the attribute parameters also include a lasting period where the current status stays in a disabled status;
when the server confirms that the target Hive table exists, and the current operating user has operating authority, and the current status of the target Hive table is a disabled status, changing, by the server, the current status of the target Hive table into an enabled status by modifying the attribute parameters of the target Hive table based on the information about the table name, the operating user, and the desired status of the target Hive table in the enabling instruction;
when the server confirms that the target Hive table does not exist, or the current operating user does not have operating authority, or the desired status of the target Hive table is in consistence with the current status, refusing to implement the change in the current status of the target Hive table; and feeding, by the server to the client, the implementation result about the target Hive table.
4. The method of claim 2, wherein the step of "querying, by the server, the current status of the target Hive table according to the information about the table name and the operating user of the target Hive table contained in the status-querying instruction and feeding back a query result to the client" comprises:
the statuses of the target Hive table include a disabled status and an enabled status; and according to the table name and the operating user of the target Hive table contained in the status-Date recue / Date received 2021-12-03 querying instruction, when the current status of the target Hive table is the enabled status, feeding back, by the server, the query result to the client, or when the current status of the target Hive table is the disabled status, feeding back, by the server to the client, a prompt indicating that the disabled status is present and no query is allowed.
the statuses of the target Hive table include a disabled status and an enabled status; and according to the table name and the operating user of the target Hive table contained in the status-Date recue / Date received 2021-12-03 querying instruction, when the current status of the target Hive table is the enabled status, feeding back, by the server, the query result to the client, or when the current status of the target Hive table is the disabled status, feeding back, by the server to the client, a prompt indicating that the disabled status is present and no query is allowed.
5. The method of claim 3, after the step of "when the current status of the target Hive table is the disabled status, feeding back, by the server to the client, a prompt indicating that the disabled status is present and no query is allowed," further comprising:
recognizing the disabled status of target Hive table is a time-out incurred disabled status or a non-time-out incurred disabled status; and when the target Hive table is in the time-out incurred disabled status, sending, by the server to the client, a prompt indicating that the target Hive table can be deleted, or when the target Hive table is in the non-time-out incurred disabled status, sending, by the server to the client, a prompt indicating that no operation is allowed to be done on the target Hive table.
recognizing the disabled status of target Hive table is a time-out incurred disabled status or a non-time-out incurred disabled status; and when the target Hive table is in the time-out incurred disabled status, sending, by the server to the client, a prompt indicating that the target Hive table can be deleted, or when the target Hive table is in the non-time-out incurred disabled status, sending, by the server to the client, a prompt indicating that no operation is allowed to be done on the target Hive table.
6. The method of claim 5, wherein whether the target Hive table is in the time-out incurred disabled status or in the non-time-out incurred disabled status is determined by:
recognizing the attribute parameters of the target Hive table, when a difference between a current time and the time to change the current status exceeds a predetermined interval threshold, determining that the target Hive table is in the time-out incurred disabled status, or when the difference does not exceed the predetermined interval threshold, determining that the target Hive table is in the non-time-out incurred disabled status.
recognizing the attribute parameters of the target Hive table, when a difference between a current time and the time to change the current status exceeds a predetermined interval threshold, determining that the target Hive table is in the time-out incurred disabled status, or when the difference does not exceed the predetermined interval threshold, determining that the target Hive table is in the non-time-out incurred disabled status.
7. The method of any of claims 1 through 6, wherein the server implements the change in the current status of the target Hive table while modifying a number of copies of the target Hive table.
Date recue / Date received 2021-12-03
Date recue / Date received 2021-12-03
8. The method of any of claims 1 through 6, wherein, the server is a Hive Thrift Server.
9. An apparatus for changing statuses of Hive tables, comprising:
a transceiver unit, for receiving, by a server from a client, operation instructions directed to a target Hive table, wherein the Hive table operation instructions include status-changing instructions and/or a status-querying instruction;
a change unit, for determining, by the server, whether a change in a current status of the target Hive table is to be implemented according to information about a table name, an operating user, and a desired status of the target Hive table contained in the status-changing instructions, and feeding back an implementation result to the client; and a query unit, for querying, at the server, the current status of the target Hive table according to the information about the table name and the operating user of the target Hive table contained in the status-querying instruction and feeding back a query result to the client.
a transceiver unit, for receiving, by a server from a client, operation instructions directed to a target Hive table, wherein the Hive table operation instructions include status-changing instructions and/or a status-querying instruction;
a change unit, for determining, by the server, whether a change in a current status of the target Hive table is to be implemented according to information about a table name, an operating user, and a desired status of the target Hive table contained in the status-changing instructions, and feeding back an implementation result to the client; and a query unit, for querying, at the server, the current status of the target Hive table according to the information about the table name and the operating user of the target Hive table contained in the status-querying instruction and feeding back a query result to the client.
10. A computer-readable storage medium storing therein a computer program, wherein the computer program when executed by a processor performing a method as described in any of claims 1 through 8.
Date recue / Date received 2021-12-03
Date recue / Date received 2021-12-03
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010975656.0 | 2020-09-16 | ||
CN202010975656.0A CN112256694B (en) | 2020-09-16 | 2020-09-16 | Hive table state changing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CA3138961A1 true CA3138961A1 (en) | 2022-03-16 |
Family
ID=74231748
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CA3138961A Pending CA3138961A1 (en) | 2020-09-16 | 2021-09-16 | Hive table state changing method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112256694B (en) |
CA (1) | CA3138961A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112860668B (en) * | 2021-02-23 | 2023-07-14 | 浪潮云信息技术股份公司 | Method for realizing Store disabling and enabling functions |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7890925B1 (en) * | 2007-04-05 | 2011-02-15 | Nvidia Corporation | Automatic generation of custom driver packages |
CN106713608B (en) * | 2016-07-26 | 2020-04-24 | 腾讯科技(深圳)有限公司 | Application function state modification method and device and terminal |
CN107249021A (en) * | 2017-05-27 | 2017-10-13 | 广东欧珀移动通信有限公司 | Method of data synchronization, device, storage medium, computer equipment and server |
-
2020
- 2020-09-16 CN CN202010975656.0A patent/CN112256694B/en active Active
-
2021
- 2021-09-16 CA CA3138961A patent/CA3138961A1/en active Pending
Also Published As
Publication number | Publication date |
---|---|
CN112256694B (en) | 2022-11-22 |
CN112256694A (en) | 2021-01-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11042550B2 (en) | Data classification | |
US20160117079A1 (en) | Method and apparatus for displaying application icons on terminal | |
CN110557284B (en) | Data aggregation method and device based on client gateway | |
CN109299157B (en) | Data export method and device for distributed big single table | |
KR20170010844A (en) | Processing mutations for a remote database | |
KR20110073444A (en) | Ranking search results based on affinity criteria | |
CN111177081B (en) | Game log content query method, device, computer equipment and storage medium | |
EP3035216A1 (en) | Cloud bursting a database | |
US10509716B2 (en) | Automated recovery of flighted features based on service requests | |
US6618758B1 (en) | System for downloading only a portion of a file from a server through a computer network utilizing a client menu downloaded periodically from the server | |
US8612635B2 (en) | Reusing system configuration information and metadata for related operations | |
CA3138961A1 (en) | Hive table state changing method and device | |
US20060230116A1 (en) | Electronic messaging backup catalog | |
US20150039759A1 (en) | Apparatus, method, and non-transitory computer readable storage medium thereof for controlling access of a resource | |
CN106776131B (en) | Data backup method and server | |
CN112118189B (en) | Flow sampling method, computer equipment and computer readable storage medium | |
CN112434037A (en) | Data processing method, processing device, data processing apparatus, and storage medium | |
US10348665B2 (en) | Email-initiated report service | |
CN111078321A (en) | Method for dynamically and rapidly loading module according to user use habit | |
CN106446080B (en) | Data query method, query service equipment, client equipment and data system | |
CN110928895A (en) | Data query method, data table establishing method, device and equipment | |
JP3984208B2 (en) | Search server and search program | |
CN112579589B (en) | Information importing method and device | |
CN106649473B (en) | Operational issue feedback query method | |
US20150373088A1 (en) | Information processing apparatus and non-transitory computer readable medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
EEER | Examination request |
Effective date: 20220916 |
|
EEER | Examination request |
Effective date: 20220916 |
|
EEER | Examination request |
Effective date: 20220916 |
|
EEER | Examination request |
Effective date: 20220916 |
|
EEER | Examination request |
Effective date: 20220916 |
|
EEER | Examination request |
Effective date: 20220916 |