CN109189753B - Method and device for adding user information in HUE - Google Patents

Method and device for adding user information in HUE Download PDF

Info

Publication number
CN109189753B
CN109189753B CN201811215908.9A CN201811215908A CN109189753B CN 109189753 B CN109189753 B CN 109189753B CN 201811215908 A CN201811215908 A CN 201811215908A CN 109189753 B CN109189753 B CN 109189753B
Authority
CN
China
Prior art keywords
user
information
hue
file
user information
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.)
Active
Application number
CN201811215908.9A
Other languages
Chinese (zh)
Other versions
CN109189753A (en
Inventor
孙运
李富裕
陈浩
赵冬阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Inspur Cloud Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Cloud Information Technology Co Ltd filed Critical Inspur Cloud Information Technology Co Ltd
Priority to CN201811215908.9A priority Critical patent/CN109189753B/en
Publication of CN109189753A publication Critical patent/CN109189753A/en
Application granted granted Critical
Publication of CN109189753B publication Critical patent/CN109189753B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a device for adding user information in HUE, wherein the method comprises the following steps: receiving an adding request for indicating that target user information is added in the HUE; generating a user information file according to the adding request; storing the user information file to a server where the HUE is located; and calling a command of the HUE so as to add the target user information in the HUE according to the user information file stored in the server. The device includes: the device comprises a request receiving unit, a file generating unit, a file unloading unit and an information adding unit. The scheme can synchronize the user information in the HDFS to the HUE.

Description

Method and device for adding user information in HUE
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for adding user information in a HUE.
Background
The Hadoop WEB management console (HUE) is a tool for managing the common components of Hadoop in a WEB page visualization format, wherein Hadoop is the infrastructure of a distributed system developed by the Apache foundation. The user can manage the data in the corresponding folder through the HUE, such as adding data, deleting data, modifying data or viewing data.
The process of managing data by a user through a HUE depends on user information added in the HUE, but the user information in the HUE is not synchronized with the user information in a Hadoop Distributed File System (HDFS). When a user manages data in the HDFS by using the HUE, the user information in the HUE and the user information in the HDFS are asynchronous, so that the user cannot normally manage the data in the HDFS, and the specific expression shows that the user cannot manage data created by supergroup in the HDFS through the HUE, and further the use experience of the user is poor.
Disclosure of Invention
The embodiment of the invention provides a method and a device for adding user information in a HUE, which can synchronize the user information in an HDFS (Hadoop distributed File System) to the HUE.
In a first aspect, an embodiment of the present invention provides a method for adding user information in a HUE, including:
receiving an adding request for indicating that target user information is added in the HUE;
generating a user information file according to the adding request;
storing the user information file to a server where the HUE is located;
and calling a command of the HUE so as to add the target user information in the HUE according to the user information file stored in the server.
Optionally, the generating a user information file according to the addition request includes:
analyzing the adding request to obtain user name information, user affiliated grouping information and user password information;
respectively converting the user name information, the grouping information to which the user belongs and the user password information into JSON strings to obtain a user name information JSON string, a grouping information JSON string to which the user belongs and a user password information JSON string;
and storing the user name information JSON string, the grouping information JSON string to which the user belongs and the user password information JSON string into a JSON file to obtain the user information file.
Optionally, the invoking the command of the HUE to add the target user information in the HUE according to the user information file stored in the server includes:
calling a first shell command of the HUE to read the user information file from the server, and adding a target user in the HUE according to the user name information JSON string stored in the user information file;
calling a second shell command of the HUE to set a login password for the target user according to the user password information JSON string stored in the user information file;
and calling a third shell command of the HUE to set a group to which the target user belongs according to the group information JSON string to which the user belongs, which is stored in the user information file.
Optionally, after the third shell command invoking the HUE, further comprising:
and configuring operation authority for the target user according to the received authority configuration instruction.
Alternatively,
after the generating the user information file according to the addition request, further comprising: storing the user information file in a predefined target directory;
the storing the user information file to a server where the HUE is located includes: and calling a Python script to copy the user information file stored in the target directory to the server where the HUE is located.
In a second aspect, an embodiment of the present invention further provides an apparatus for adding user information in a HUE, including: the device comprises a request receiving unit, a file generating unit, a file unloading unit and an information adding unit;
the request receiving unit is used for receiving an adding request for indicating that target user information is added in the HUE;
the file generating unit is used for generating a user information file according to the adding request received by the request receiving unit;
the file unloading unit is used for storing the user information file generated by the file generating unit to a server where the HUE is located;
the information adding unit is used for calling a command of the HUE so as to add the target user information in the HUE according to the user information file stored in the server by the file unloading unit.
Optionally, the file generating unit includes: a file parsing subunit, a JSON string conversion subunit, and a JSON string storage subunit, wherein,
the file analysis subunit is used for analyzing the addition request to obtain user name information, user affiliated group information and user password information;
the JSON string conversion subunit is used for respectively converting the user name information, the grouping information to which the user belongs and the user password information which are analyzed by the file analysis subunit into JSON strings to obtain a user name information JSON string, a grouping information JSON string to which the user belongs and a user password information JSON string;
the JSON string storage subunit is configured to store the user name information JSON string converted by the JSON string conversion subunit, the group information JSON string to which the user belongs, and the user password information JSON string into a JSON file, so as to obtain the user information file.
Optionally, the information adding unit includes: a first command invoking subunit, a second command invoking subunit, and a third command invoking subunit, wherein,
the first command calling subunit is configured to call a first shell command of the HUE to read the user information file from the server, and add a target user to the HUE according to the user name information JSON string stored in the user information file;
the second command calling subunit is configured to call a second shell command of the HUE to set a login password for the target user according to the user password information JSON string stored in the user information file;
and the third command calling subunit is used for calling a third shell command of the HUE so as to set a group to which the target user belongs according to the group information JSON string to which the user belongs, which is stored in the user information file.
Optionally, the apparatus for adding user information in HUE further comprises: a right configuration unit;
and the authority configuration unit is used for configuring operation authority for the target user added in the HUE by the information adding unit according to the received authority configuration instruction.
Alternatively,
the file generating unit is further used for storing the generated user information file into a predefined target directory;
and the file dump unit is used for calling a Python script so as to copy the user information file stored in the target directory to the server where the HUE is located.
According to the method and the device for adding the user information into the HUE, provided by the embodiment of the invention, after the adding request for indicating the addition of the target user information into the HUE is received, the user information file is generated according to the adding request, the generated user information file is stored in the server where the HUE is located, and then the command of the HUE is called, so that the target user information is added into the HUE according to the called command and the user information file stored in the server. Therefore, after the user information in the HDFS is used as the target user information to send the corresponding adding request, the user information in the HDFS can be added into the HUE, the synchronization of the user information in the HUE and the user information in the HDFS is achieved, the user can normally manage the data in the HDFS through the HUE, and the user is guaranteed to have good using experience.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart of a method for adding user information to a HUE according to one embodiment of the present invention;
FIG. 2 is a flowchart of a method for generating a user information file according to an embodiment of the present invention;
FIG. 3 is a flow chart of another method for adding user information to a HUE according to one embodiment of the present invention;
FIG. 4 is a flowchart of yet another method for adding user information to a HUE according to one embodiment of the present invention;
fig. 5 is a schematic diagram of a device for adding user information to a HUE according to an embodiment of the present invention;
FIG. 6 is a diagram of an apparatus for adding user information to a HUE according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of another apparatus for adding user information to a HUE according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of an apparatus for adding user information to a HUE according to an embodiment of the present invention;
fig. 9 is a schematic diagram of another apparatus for adding user information to a HUE according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a method for adding user information in a HUE, where the method may include the following steps:
step 101: receiving an adding request for indicating that target user information is added in the HUE;
step 102: generating a user information file according to the adding request;
step 103: storing the user information file to a server where the HUE is located;
step 104: and calling a command of the HUE to add the target user information in the HUE according to the user information file stored in the server.
According to the method for adding the user information in the HUE, after an adding request for indicating that the target user information is added to the HUE is received, a user information file is generated according to the adding request, the generated user information file is stored in a server where the HUE is located, and then a command of the HUE is called, so that the target user information is added to the HUE according to the user information file stored in the server through the called command. Therefore, after the user information in the HDFS is used as the target user information to send the corresponding adding request, the user information in the HDFS can be added into the HUE, the synchronization of the user information in the HUE and the user information in the HDFS is achieved, the user can normally manage the data in the HDFS through the HUE, and the user is guaranteed to have good using experience.
Optionally, on the basis of the method for adding user information in HUE shown in fig. 1, step 102 generates a user information file according to the received addition request, and as shown in fig. 2, this step may be specifically implemented by the following sub-steps:
step 201: analyzing the adding request to obtain user name information, user affiliated grouping information and user password information;
step 202: converting the user name information, the grouping information to which the user belongs and the user password information into JSON strings respectively to obtain corresponding JSON strings of the user name information, the grouping information to which the user belongs and the JSON strings of the user password information;
step 203: and storing the acquired user name information JSON string, the grouping information JSON string to which the user belongs and the user password information JSON string into a JSON file to obtain a user information file.
The received adding request carries information such as a user name, a user belonging group, a user password and the like, the information carried by the adding request is converted into a user name information JSON string, a user belonging group information JSON string, a user password information JSON string and the like to be stored in a JSON file, and then the JSON file in which the user name information JSON string, the user belonging group information JSON string and the user password information JSON string are stored is determined as a user information file. Wherein, the suffix of the JSON file is JSON.
Firstly, JSON strings such as a user name information JSON string, a grouping information JSON string to which a user belongs, a user password information JSON string and the like are stored in a user information file, the user name, the grouping to which the user belongs and the user password can be determined according to the user name information JSON string, the grouping information JSON string to which the user belongs and the user password information JSON string, the user name, the grouping to which the user belongs and the user login password can be set when user information is added into the HUE according to the user information file, and the user can normally log in and manage data after the user information is added into the HUE.
Secondly, because the JSON string is a lightweight data exchange format, the user name information, the grouping information to which the user belongs and the user password information are converted into corresponding JSON strings, and the converted JSON strings are stored in a JSON file to serve as a user information file, so that the called command of the HUE can identify the information stored in the user information file, the command of the HUE can be ensured to smoothly add the user information in the HUE according to the user information file, and the implementability of the user information adding method can be further ensured.
Alternatively, on the basis of the method for generating the user information file according to the addition request shown in fig. 2, as shown in fig. 3, the process of adding the target user information in the HUE in step 104 by calling the command of the HUE may be specifically realized by the following sub-steps:
step 301: calling a first shell command of the HUE to read a user information file from the server, and adding a target user in the HUE according to a user name information JSON string stored in the user information file;
step 302: calling a second shell command of the HUE to set a login password for the target user according to the user password information JSON string stored in the user information file;
step 303: and calling a third shell command of the HUE to set a belonged group for the target user according to the belonged group information JSON string of the user stored in the user information file.
After the user information file is stored in a server where the HUE is located, a first shell command of the HUE is called firstly, a target user is added into the HUE according to a user name information JSON string stored in the user information file on the server, then a second shell command of the HUE is called, a login password is set for the target user which is just added according to a user password information JSON string stored in the user information file, and then a third shell command of the HUE is called, so that a group which the user belongs to is set for the target user which is just added according to a group information JSON string which the user belongs to and is stored in the user information file. And the first shell command, the second shell command and the third shell command are all default commands of the HUE.
By calling the shell command of the HUE, target users are added in the HUE according to the user name information JSON string, the user password information JSON string and the user belonging grouping information JSON string stored in the user information file, a login password and a belonging grouping are set for the added target users, and then the users can log in on the HUE through the user names and the login passwords, so that data are managed. The process of adding the target user, setting the login password and the belonged group is realized by calling the shell command, manual operation is not needed, and convenience of adding user information in the HUE is improved.
Optionally, on the basis of the method shown in fig. 3, which is implemented by calling a shell command of the HUE to add user information to the HUE, after the group to which the target user belongs is set by calling a third shell command in step 303, the operation right may be further configured for the target user according to the received right configuration instruction.
Add target user in HUE to after setting up login password and affiliated group for target user, further can configure operation authority for target user, with the operation of logging in after the HUE to the user carries out the management and control, guarantee the security through the data that the HUE managed.
In the embodiment of the invention, the authority configuration instruction can be sent by the user independently, and can also be acquired from the user information file, and the specific mode for acquiring the authority configuration instruction can be flexibly determined according to the requirements of service implementation. In addition, the operation authority configured for the target user specifically means the operation authority of Apache allocated for the user.
Alternatively, on the basis of the method for adding user information in the HUE shown in fig. 1, after the user information file is generated according to the addition request in step 102, the generated user information file may be stored in a predefined target directory. Correspondingly, when the user information file is stored in the server where the HUE is located in step 103, the user information file stored in the target directory may be copied to the server where the HUE is located by calling the Python script.
After the generated user information file is stored in a predefined target directory, the self-realized Python script is called, so that the server where the HUE is located for copying the user information file stored in the target directory can be stored, the user information file does not need to be stored in the server where the HUE is located in a manual operation mode, and the process of adding the user information on the HUE is more convenient.
Optionally, on the basis of the method for adding user information to the HUE provided in each of the above embodiments, after the user information is added to the HUE, a monitoring audit may be performed on each piece of user information, that is, an operation performed by the user corresponding to each piece of user information through the HUE is monitored, so as to facilitate tracing of illegal operations of the user, which is beneficial to improving the security of the HUE.
The following describes in further detail the method for adding user information to a HUE provided in the embodiment of the present invention by combining the methods for adding user information to a HUE provided in the above embodiments, and as shown in fig. 4, the method may specifically include the following steps:
step 401: an addition request is received indicating to add target user information in the HUE.
In the embodiment of the present invention, an addition request sent by a user through a foreground is received, where the addition request is used to instruct to add target user information in the HUE, where the target user information may be information of one user or information of one user group, and one user group includes multiple users.
Step 402: and generating a user information file according to the adding request, and storing the generated user information file into a predefined target directory.
In the embodiment of the invention, the user name information, the grouping information to which the user belongs and the user password information carried by the adding request are obtained by analyzing the adding request, the user name information, the grouping information to which the user belongs and the user password information are converted into a user name information JSON string, a grouping information JSON string to which the user belongs and a user password information JSON string, the user name information JSON string, the grouping information JSON string to which the user belongs and the user password information JSON string are stored into a JSON file, and the JSON file in which the user name information JSON string, the grouping information JSON string to which the user belongs and the user password information JSON string are stored is used as the user information file. And finally, storing the obtained user information file into a predefined target directory.
Step 403: and judging whether the user information file is successfully stored in the target directory, if so, executing the step 404, and otherwise, executing the step 411.
In the embodiment of the present invention, if the user information file is successfully generated and the generated user information file is successfully stored in the predefined target directory, the following steps may be continued to add the user information to the HUE, and step 404 is executed accordingly, otherwise, the user information cannot be added to the HUE, and step 411 is executed accordingly.
Step 404: and copying the user information file to a server where the HUE is located.
In the embodiment of the invention, the self-realized Python script is called, and the user information file stored in the target directory is copied to the server where the HUE is located.
Step 405: and calling a first shell command of the HUE, and adding a target user in the HUE.
In the embodiment of the invention, the user information file is read from the server where the HUE is located by calling the first shell command of the HUE, and the target user is added in the HUE according to the user name information JSON string stored in the user information file.
Step 406: and judging whether the target user is successfully added into the HUE, if so, executing the step 407, otherwise, executing the step 411.
In the embodiment of the present invention, after the first shell command is invoked, it is determined whether the target user is successfully added to the HUE, if so, the step of subsequently adding user information may be continued, and step 407 is correspondingly performed, otherwise, the operation of adding user information to the HUE cannot be continued, and step 411 is correspondingly performed.
Step 407: and calling a second shell command of the HUE, and setting a login password for the target user.
In the embodiment of the invention, the second shell command of the HUE is called, and the login password is set for the added target user according to the user password information JSON string stored in the user information file.
Step 408: and judging whether the login password is successfully set for the target user, if so, executing the step 409, otherwise, executing the step 411.
In the embodiment of the present invention, after the second shell command is called, it is determined whether the login password is successfully set for the target user, if so, the step of subsequently adding the user information may be continued, and step 409 is correspondingly performed, otherwise, the operation of adding the user information to the HUE may not be continued, and step 411 is correspondingly performed.
Step 409: and calling a third shell command of the HUE to set the affiliated group for the target user.
In the embodiment of the invention, the second shell command of the HUE is called, and the added target user is set with the affiliated group according to the group information JSON string of the user, which is stored in the user information file.
Step 410: and judging whether the grouping belonging to the target user is successfully set, if so, executing a step 412, and otherwise, executing a step 411.
In the embodiment of the present invention, after the third shell command is invoked, it is determined whether the belonging group is successfully set for the target user, if so, it may be determined that the target user information has been successfully added to the HUE, and step 412 is executed accordingly, otherwise, it is determined that the addition of the target user information to the HUE fails, and step 411 is executed accordingly.
Step 411: and determining that the target user information is failed to be added into the HUE, and ending the current process.
Step 412: and determining that the target user information is successfully added to the HUE.
As shown in fig. 5 and 6, the embodiment of the present invention provides an apparatus for adding user information to a HUE. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. From a hardware level, as shown in fig. 5, a hardware structure diagram of a device where the apparatus for adding user information to the HUE provided in the embodiment of the present invention is located is shown, where the device in the embodiment may generally include other hardware, such as a forwarding chip responsible for processing a packet, in addition to the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 5. Taking a software implementation as an example, as shown in fig. 6, as a logical apparatus, the apparatus is formed by reading, by a CPU of a device in which the apparatus is located, corresponding computer program instructions in a non-volatile memory into a memory for execution. The device for adding user information in the HUE provided by the embodiment comprises: a request receiving unit 601, a file generating unit 602, a file unloading unit 603, and an information adding unit 604;
a request receiving unit 601 configured to receive an addition request indicating that target user information is added in the HUE;
a file generating unit 602, configured to generate a user information file according to the addition request received by the request receiving unit 601;
a file dump unit 603, configured to store the user information file generated by the file generation unit 602 in the server where the HUE is located;
an information adding unit 604, configured to invoke a command of the HUE to add the target user information in the HUE according to the user information file stored in the server by the file dump unit 603.
Alternatively, on the basis of the apparatus for adding user information to the HUE shown in fig. 6, as shown in fig. 7, the file generating unit 602 includes: a file parsing subunit 6021, a JSON string conversion subunit 6022, and a JSON string storage subunit 6023, wherein,
a file analysis subunit 6021, configured to analyze the addition request to obtain user name information, group information to which the user belongs, and user password information;
a JSON string converting subunit 6022, configured to convert the user name information, the group information to which the user belongs, and the user password information, which are analyzed by the file analyzing subunit 6021, into JSON strings, respectively, and obtain a user name information JSON string, a group information JSON string to which the user belongs, and a user password information JSON string;
a JSON string storing subunit 6023, configured to store the user name information JSON string, the group information JSON string to which the user belongs, and the user password information JSON string converted by the JSON string converting subunit 6022 into a JSON file, so as to obtain a user information file.
Alternatively, in addition to the apparatus for adding user information in a HUE shown in fig. 7, as shown in fig. 8, the information adding unit 604 includes: a first command invoking sub-unit 6041, a second command invoking sub-unit 6042, and a third command invoking sub-unit 6043, wherein,
a first command calling subunit 6041, configured to call a first shell command of the HUE, so as to read the user information file from the server, and add a target user in the HUE according to the user name information JSON string stored in the user information file;
a second command calling subunit 6042, configured to call a second shell command of the HUE, so as to set a login password for the target user according to the user password information JSON string stored in the user information file;
and a third command invoking subunit 6043, configured to invoke a third shell command of the HUE, so as to set a belonging group for the target user according to the group information JSON string to which the user belongs, which is stored in the user information file.
Optionally, on the basis of the apparatus for adding user information to the HUE shown in fig. 8, as shown in fig. 9, the apparatus for adding user information to the HUE further comprises: a right configuration unit 605;
and an authority configuring unit 605, configured to configure an operation authority for the target user added in the HUE by the information adding unit 604 according to the received authority configuration instruction.
Optionally, on the basis of the apparatus for adding user information to a HUE provided in any one of fig. 6 to 9, the file generating unit 602 is further configured to store the generated user information file in a predefined target directory, and the file unloading unit 603 is configured to call a Python script to copy the user information file stored in the target directory to a server where the HUE is located.
It should be noted that, because the contents of information interaction, execution process, and the like between the units in the apparatus are based on the same concept as the method embodiment of the present invention, specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
In addition, in the method and apparatus for adding user information to HUE provided in the foregoing embodiments, HUE refers to Apache HUE.
The embodiment of the present invention further provides a readable medium, which includes an execution instruction, and when a processor of a storage controller executes the execution instruction, the storage controller executes the method for adding user information in a HUE provided in the foregoing embodiments.
An embodiment of the present invention further provides a storage controller, including: a processor, a memory, and a bus;
the memory is used for storing execution instructions, the processor is connected with the memory through the bus, and when the memory controller runs, the processor executes the execution instructions stored in the memory, so that the memory controller executes the method for adding user information in the HUE provided by the above embodiments.
In summary, the method and apparatus for adding user information to HUE provided in the embodiments of the present invention at least have the following beneficial effects:
1. in the embodiment of the invention, after an adding request for indicating adding target user information into the HUE is received, a user information file is generated according to the adding request, the generated user information file is stored in a server where the HUE is located, and then a command of the HUE is called, so that the target user information is added into the HUE according to the user information file stored in the server through the called command. Therefore, after the user information in the HDFS is used as the target user information to send the corresponding adding request, the user information in the HDFS can be added into the HUE, the synchronization of the user information in the HUE and the user information in the HDFS is achieved, the user can normally manage the data in the HDFS through the HUE, and the user is guaranteed to have good using experience.
2. In the embodiment of the invention, a user can input the adding instruction through the operation interface so as to conveniently add the user information in the HUE, and the user information can be added to the HUE in real time according to the requirement, so that the convenience and timeliness of adding the user information in the HUE are improved.
3. In the embodiment of the invention, JSON strings such as a user name information JSON string, a user affiliated grouping information JSON string and a user password information JSON string are stored in the user information file, the user name, the user affiliated grouping and the user password can be determined according to the user name information JSON string, the user affiliated grouping information JSON string and the user password information JSON string, and then the user name, the user affiliated grouping and the user login password can be set when the user information is added into the HUE according to the user information file, so that the user can normally log in and manage data after the user information is added into the HUE.
4. In the embodiment of the invention, the JSON string is a lightweight data exchange format, the user name information, the grouping information to which the user belongs and the user password information are converted into the corresponding JSON string, and the converted JSON string is stored in the JSON file to be used as the user information file, so that the called command of the HUE can identify the information stored in the user information file, the command of the HUE can be ensured to smoothly add the user information in the HUE according to the user information file, and the implementability of the user information adding method can be ensured.
5. In the embodiment of the invention, a target user is added into the HUE by calling a shell command of the HUE according to the user name information JSON string, the user password information JSON string and the user belonging grouping information JSON string stored in the user information file, and a login password and a belonging grouping are set for the added target user, and then the user can log in on the HUE through the user name and the login password to further manage data. The process of adding the target user, setting the login password and the belonged group is realized by calling the shell command, manual operation is not needed, and convenience of adding user information in the HUE is improved.
6. In the embodiment of the present invention, after a target user is added to the HUE and a login password and an affiliated group are set for the target user, an operation authority may be further configured for the target user to manage and control the operation of the user after logging in the HUE, thereby ensuring the security of data managed by the HUE.
7. In the embodiment of the invention, after the generated user information file is stored in the predefined target directory, the self-realized Python script is called, so that the server where the HUE is located can be copied from the user information file stored in the target directory, and the user information file is not required to be stored in the server where the HUE is located in a manual operation mode, so that the process of adding the user information on the HUE is more convenient.
8. In the embodiment of the present invention, on the basis of the method for adding user information to a HUE provided in each of the above embodiments, after the user information is added to the HUE, a monitoring audit may be performed on each piece of user information, that is, an operation performed by a user corresponding to each piece of user information through the HUE is monitored, so as to facilitate tracing of illegal operations of the user, which is beneficial to improving the security of the HUE.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a" does not exclude the presence of other similar elements in a process, method, article, or apparatus that comprises the element.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it is to be noted that: the above description is only a preferred embodiment of the present invention, and is only used to illustrate the technical solutions of the present invention, and not to limit the protection scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (2)

1. A method for adding user information to a HUE, comprising:
receiving an adding request for indicating that target user information is added in the HUE;
generating a user information file according to the adding request;
storing the user information file to a server where the HUE is located;
calling a command of the HUE to add the target user information in the HUE according to the user information file stored in the server;
the generating of the user information file according to the adding request comprises:
analyzing the adding request to obtain user name information, user affiliated grouping information and user password information;
respectively converting the user name information, the grouping information to which the user belongs and the user password information into JSON strings to obtain a user name information JSON string, a grouping information JSON string to which the user belongs and a user password information JSON string;
storing the user name information JSON string, the grouping information JSON string to which the user belongs and the user password information JSON string into a JSON file to obtain the user information file;
the invoking the command of the HUE to add the target user information in the HUE according to the user information file stored in the server, comprising:
calling a first shell command of the HUE to read the user information file from the server, and adding a target user in the HUE according to the user name information JSON string stored in the user information file;
calling a second shell command of the HUE to set a login password for the target user according to the user password information JSON string stored in the user information file;
calling a third shell command of the HUE to set a group to which the target user belongs according to the group information JSON string to which the user belongs, which is stored in the user information file;
after the third shell command invoking the HUE, further comprising:
configuring operation authority for the target user according to the received authority configuration instruction;
after the generating the user information file according to the addition request, further comprising:
storing the user information file in a predefined target directory;
the storing the user information file to a server where the HUE is located includes:
and calling a Python script to copy the user information file stored in the target directory to the server where the HUE is located.
2. An apparatus for adding user information to a HUE, comprising: the device comprises a request receiving unit, a file generating unit, a file unloading unit and an information adding unit;
the request receiving unit is used for receiving an adding request for indicating that target user information is added in the HUE;
the file generating unit is used for generating a user information file according to the adding request received by the request receiving unit;
the file unloading unit is used for storing the user information file generated by the file generating unit to a server where the HUE is located;
the information adding unit is used for calling a command of the HUE so as to add the target user information in the HUE according to the user information file stored in the server by the file unloading unit;
the file generation unit includes: a file parsing subunit, a JSON string conversion subunit, and a JSON string storage subunit, wherein,
the file analysis subunit is used for analyzing the addition request to obtain user name information, user affiliated group information and user password information;
the JSON string conversion subunit is used for respectively converting the user name information, the grouping information to which the user belongs and the user password information which are analyzed by the file analysis subunit into JSON strings to obtain a user name information JSON string, a grouping information JSON string to which the user belongs and a user password information JSON string;
the JSON string storage subunit is used for storing the user name information JSON string converted by the JSON string conversion subunit, the grouping information JSON string to which the user belongs and the user password information JSON string into a JSON file to obtain the user information file;
the information adding unit includes: a first command invoking subunit, a second command invoking subunit, and a third command invoking subunit, wherein,
the first command calling subunit is configured to call a first shell command of the HUE to read the user information file from the server, and add a target user to the HUE according to the user name information JSON string stored in the user information file;
the second command calling subunit is configured to call a second shell command of the HUE to set a login password for the target user according to the user password information JSON string stored in the user information file;
the third command calling subunit is configured to call a third shell command of the HUE to set a belonging group for the target user according to the group information JSON string to which the user belongs, stored in the user information file;
further comprising: a right configuration unit;
the authority configuration unit is used for configuring operation authority for the target user added in the HUE by the information adding unit according to the received authority configuration instruction;
the file generating unit is further used for storing the generated user information file into a predefined target directory;
and the file dump unit is used for calling a Python script so as to copy the user information file stored in the target directory to the server where the HUE is located.
CN201811215908.9A 2018-10-18 2018-10-18 Method and device for adding user information in HUE Active CN109189753B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811215908.9A CN109189753B (en) 2018-10-18 2018-10-18 Method and device for adding user information in HUE

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811215908.9A CN109189753B (en) 2018-10-18 2018-10-18 Method and device for adding user information in HUE

Publications (2)

Publication Number Publication Date
CN109189753A CN109189753A (en) 2019-01-11
CN109189753B true CN109189753B (en) 2021-02-19

Family

ID=64946041

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811215908.9A Active CN109189753B (en) 2018-10-18 2018-10-18 Method and device for adding user information in HUE

Country Status (1)

Country Link
CN (1) CN109189753B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111898161B (en) * 2020-08-07 2023-01-06 苏州浪潮智能科技有限公司 Method, system, device and medium for managing authority of HUE

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104408167A (en) * 2014-12-09 2015-03-11 浪潮电子信息产业股份有限公司 Method for expanding sqoop function in Hue based on django
CN106301892A (en) * 2016-08-02 2017-01-04 浪潮电子信息产业股份有限公司 Hue service arrangement based on Apache Ambari and configuration and surveillance method
CN106843981A (en) * 2017-02-06 2017-06-13 郑州云海信息技术有限公司 A kind of Hue automatizations of service configuration treating method based on Apache Ambari
CN107563153A (en) * 2017-08-03 2018-01-09 华子昂 A kind of PacBio microarray dataset IT architectures based on Hadoop structures

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9172608B2 (en) * 2012-02-07 2015-10-27 Cloudera, Inc. Centralized configuration and monitoring of a distributed computing cluster
US9477731B2 (en) * 2013-10-01 2016-10-25 Cloudera, Inc. Background format optimization for enhanced SQL-like queries in Hadoop

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104408167A (en) * 2014-12-09 2015-03-11 浪潮电子信息产业股份有限公司 Method for expanding sqoop function in Hue based on django
CN106301892A (en) * 2016-08-02 2017-01-04 浪潮电子信息产业股份有限公司 Hue service arrangement based on Apache Ambari and configuration and surveillance method
CN106843981A (en) * 2017-02-06 2017-06-13 郑州云海信息技术有限公司 A kind of Hue automatizations of service configuration treating method based on Apache Ambari
CN107563153A (en) * 2017-08-03 2018-01-09 华子昂 A kind of PacBio microarray dataset IT architectures based on Hadoop structures

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Hue学习(一)";heartseaworld;《edu.enmotech.com/home.php?mod=space&uid=25&do=blog&id=152》;20170322;第1-2页 *

Also Published As

Publication number Publication date
CN109189753A (en) 2019-01-11

Similar Documents

Publication Publication Date Title
US11088903B2 (en) Hybrid cloud network configuration management
KR102209276B1 (en) Messaging protocol communication management
US20180101371A1 (en) Deployment manager
CN109670297B (en) Method and device for opening service permission, storage medium and electronic equipment
CN109479062B (en) Usage tracking in hybrid cloud computing systems
CN114666412A (en) Access services in a hybrid cloud computing system
CN108287894B (en) Data processing method, device, computing equipment and storage medium
US11115272B1 (en) Detecting configuration drift for computing resource stacks
CN111787126B (en) Container creation method, server, and storage medium
CN110928554A (en) Deployment method, device, equipment and storage medium
CN113626133A (en) Virtual machine control method, device, equipment and computer readable storage medium
CN108874441A (en) A kind of board configuration method, device, server and storage medium
US11838296B1 (en) Providing secure software project development environments
CN113158195B (en) Distributed vulnerability scanning method and system based on POC script
CN109189753B (en) Method and device for adding user information in HUE
CN110442492A (en) A kind of System Operation Log management method and device
CN113515395A (en) Application access method and device based on multi-cloud management platform
CN111327680B (en) Authentication data synchronization method, device, system, computer equipment and storage medium
CN110096543B (en) Data operation method, device, server and medium of application program
US11782881B2 (en) Recommending remotely executed applications for opening files
CN115774742A (en) Data storage newly-increased method, device, equipment, medium and product of private cloud
CN115469807A (en) Disk function configuration method, device, equipment and storage medium
US11509730B1 (en) Analyzing web service frontends to extract security-relevant behavior information
CN114666161A (en) Component security policy management method, device, equipment and storage medium
US20210374106A1 (en) Using drag-and-drop to open local files remotely

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
CB02 Change of applicant information

Address after: 250100 No. 1036 Tidal Road, Jinan High-tech Zone, Shandong Province, S01 Building, Tidal Science Park

Applicant after: Inspur cloud Information Technology Co.,Ltd.

Address before: 250100 No. 1036 Tidal Road, Jinan High-tech Zone, Shandong Province, S01 Building, Tidal Science Park

Applicant before: Tidal Cloud Information Technology Co.,Ltd.

Address after: 250100 No. 1036 Tidal Road, Jinan High-tech Zone, Shandong Province, S01 Building, Tidal Science Park

Applicant after: Tidal Cloud Information Technology Co.,Ltd.

Address before: 250100 S06 tower, 1036, Chao Lu Road, hi tech Zone, Ji'nan, Shandong.

Applicant before: SHANDONG INSPUR CLOUD INFORMATION TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant