CN114661423A - Cluster configuration detection method and device, computer equipment and storage medium - Google Patents

Cluster configuration detection method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114661423A
CN114661423A CN202210366812.2A CN202210366812A CN114661423A CN 114661423 A CN114661423 A CN 114661423A CN 202210366812 A CN202210366812 A CN 202210366812A CN 114661423 A CN114661423 A CN 114661423A
Authority
CN
China
Prior art keywords
configuration information
parameter values
configuration
information file
cluster
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210366812.2A
Other languages
Chinese (zh)
Inventor
陈佳依
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Asset Management Co Ltd
Original Assignee
Ping An Asset Management 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 Ping An Asset Management Co Ltd filed Critical Ping An Asset Management Co Ltd
Priority to CN202210366812.2A priority Critical patent/CN114661423A/en
Publication of CN114661423A publication Critical patent/CN114661423A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2289Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by configuration test
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45591Monitoring or debugging support

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a cluster configuration detection method, a device, computer equipment and a storage medium, wherein the method comprises the following steps: determining target servers corresponding to different environments from a server cluster; correspondingly extracting at least one configuration information file from the target server based on a request instruction sent by the management server, wherein the configuration information file comprises a standard item and/or a heterogeneous item; acquiring parameter values of the standard items, and comparing and judging the parameter values of the same standard items of different target servers; and if one parameter value is a null value and/or a plurality of parameter values are inconsistent, feeding back prompt information to a preset terminal. The server clusters of the same program are detected, so that the configuration of the server clusters which are responsible for the development of the same program to be on-line is ensured to meet the requirements and be consistent, meanwhile, the phenomenon that the configuration error is reported is prevented from influencing the judgment of a developer on the error report in a test environment, and the test development efficiency is improved.

Description

Cluster configuration detection method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a cluster configuration detection method and apparatus, a computer device, and a storage medium.
Background
The server cluster is a system connected by a plurality of node servers, and needs to go through three different stages of development, test and production in the process of developing services (such as new software and new functions), wherein each stage is generally based on different environments, and the servers used in the different environments are combined to form the server cluster corresponding to the service.
However, the performance of the servers used in different environments may be different (for example, the operating system used in the development environment is a high version, and the operating system used in the test environment is a low version), which may cause an error report phenomenon of the same code in different environments (for example, the high version operating system supports a new function, and the low version operating system does not support a new function), but due to the difference in the performance of the servers, it is difficult for business personnel to distinguish whether an error report occurs due to code change or environmental inconsistency, which affects the business development process.
Disclosure of Invention
The invention aims to provide a cluster configuration detection method, a cluster configuration detection device, computer equipment and a storage medium, which are used for solving the problems in the prior art.
In order to achieve the above object, the present invention provides a cluster configuration detection method, including:
determining target servers corresponding to different environments from a server cluster;
correspondingly extracting at least one configuration information file from the target server based on a request instruction sent by a management server, wherein the configuration information file comprises a standard item and/or a heterogeneous item;
acquiring parameter values of the standard items, and comparing and judging the parameter values of the same standard items of different target servers;
and if one of the parameter values is a null value and/or the parameter values are inconsistent, feeding back prompt information to a preset terminal.
Preferably, the extracting at least one configuration information file from the target server based on the request instruction sent by the management server includes:
and taking the environment attribute corresponding to the configuration information file as an environment identifier corresponding to the configuration information file, wherein the environment attribute comprises a development environment, a test environment and a production environment.
Preferably, the extracting at least one configuration information file from the target server based on the request instruction sent by the management server includes:
identifying a category identification of the configuration information file;
and correspondingly acquiring a standard item and/or a heterogeneous item of the configuration information file based on the category identification.
Preferably, the obtaining of the standard item and/or the heterogeneous item of the configuration information file based on the category identifier includes:
extracting a standard item and/or a heterogeneous item corresponding to the category identification from a preset configuration relation table; the configuration relation table stores a plurality of category identifications and corresponding relations of standard items and/or heterogeneous items corresponding to the category identifications in advance.
Preferably, the obtaining the parameter value of the standard item and comparing and judging the parameter values of the same standard item of different target servers includes:
extracting the proxy class name of the parameter value based on a JAVA reflection mechanism, and taking the proxy class name as a key value of the parameter value;
and obtaining parameter values of the same key values of the same category identifiers of different environment identifiers, and comparing and judging the parameter values.
Preferably, the extracting the proxy class name of the parameter value based on the JAVA reflection mechanism includes:
acquiring a character string of the parameter value;
constructing a corresponding abstract syntax tree according to the character string, traversing the abstract syntax tree in a breadth mode by using a syntax parser, and creating a model file based on the nodes of the abstract syntax tree;
compiling the model file into an initial byte code file;
and loading the initial byte code file into a preset virtual machine through a class loader to obtain an agent class name corresponding to the parameter value.
Preferably, the compiling the model file into an initial byte code file includes:
and setting the model file as a source code file, and calling a preset compiler to compile the source code file into the initial byte code file.
In order to achieve the above object, the present invention further provides a cluster configuration detecting apparatus, including:
the determining module is used for determining target servers corresponding to different environments from the server cluster;
the extraction module is used for correspondingly extracting at least one configuration information file from the target server based on a request instruction sent by the management server, wherein the configuration information file comprises a standard item and/or a heterogeneous item;
the comparison module is used for acquiring the parameter values of the standard items and comparing and judging the parameter values of the same standard items of different target servers;
and the feedback module is used for feeding back prompt information to a preset terminal if one of the parameter values is a null value and/or the parameter values are inconsistent.
To achieve the above object, the present invention also provides a computer device, comprising:
a memory storing at least a computer program; and
a processor executing the computer program stored in the memory to implement any one of the above cluster configuration detection methods.
To achieve the above object, the present invention further provides a computer-readable storage medium storing a computer program, which when executed by a processor, implements the cluster configuration detecting method according to any one of the above.
The beneficial effects of the above technical scheme are that:
the cluster configuration detection method, the cluster configuration detection device, the computer equipment and the storage medium provided by the invention have the advantages that the server clusters of the same program are detected, the configuration of the server clusters which are responsible for developing the same program to be online is ensured to be consistent and consistent, meanwhile, the judgment of error reporting by developers is prevented from being influenced due to the error reporting phenomenon caused by the configuration error in a test environment, and the test development efficiency is improved.
Drawings
FIG. 1 is a flowchart illustrating a cluster configuration detection method according to an embodiment of the present invention;
FIG. 2 is another flow chart illustrating a cluster configuration detection method according to an embodiment of the present invention;
FIG. 3 is a functional block diagram of a second cluster configuration detection apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device of a three-cluster configuration detection method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments described herein are only for the purpose of illustrating the present invention and are not to be construed as limiting the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
As shown in fig. 1, which is a schematic flow chart of a cluster configuration detection method according to this embodiment, it can be seen that the method includes steps S100-400, which are specifically as follows:
s100: and determining target servers corresponding to different environments from the server cluster.
In an exemplary embodiment, before new software or new functions are brought online, development or modification of codes is generally required in a development environment, and then a program generated by the codes is tested in a test environment to repair defects, so that the program can be uploaded to a production environment to perform external services after the program runs normally. The different environments for development, test and production include a plurality of sub-servers, one or more sub-servers may be designated by a developer in advance as target servers of the development, test or production environment, or one or more sub-servers may be randomly selected from a server cluster as target servers of the development, test or production environment.
A server includes a plurality of configurations, such as: the configuration may be used to characterize a configuration that may be used by the program when the program is running, and the configuration that may be used by the program running is preset by a developer or is set according to a characteristic of the program, for example: aiming at the game program, a server provided with drive systems such as DirectX, netFreamwork and the like can be set to normally run; the log processing program can be set to be normally operated by a server provided with middleware such as kafka, and when the middleware such as kafka is not installed in one of the servers in development, test or production, an operation error phenomenon may occur when the log processing program is operated in a corresponding environment.
Furthermore, the development environment is usually used for writing codes to generate corresponding programs, so that the configuration of a target server of the development environment can usually meet the configuration required by program operation; the test environment is generally used for checking, deleting and repairing defects possibly occurring in a code layer of a program, but if the test environment is not provided with configuration required by program operation, error reporting phenomenon occurs in the program operation due to the fact that the configuration is not accordant, and developers can be caused to difficultly identify whether the defects of the code layer exist or not to influence the test efficiency; the production environment is generally used for external services, that is, the production environment is online for customers to use, and if the configurations of the target servers corresponding to the development and test environments meet the program running requirements, but the production environment is not provided with the configuration required by program running or the configuration is inconsistent with the configuration of the development and test environments, the phenomenon that the customers cannot use the software normally or the defect that the customers do not use the software during development and test may occur, so that the use experience of the customers is influenced. Therefore, the configuration of the designated or selected target server corresponding to the development, test and production environment plays a critical role in the stability of program operation, and the configuration of the server cluster responsible for the development of the same program to the online server cluster is required to be consistent and consistent, which is the key for providing stable and efficient service for the cluster.
S200: and correspondingly extracting at least one configuration information file from the target server based on a request instruction sent by the management server, wherein the configuration information file comprises a standard item and/or a heterogeneous item.
In an exemplary embodiment, after determining target servers corresponding to respective environments, a developer may initiate a detected request instruction to the respective target servers through a management server, and after receiving the request instruction, the target servers configure themselves to produce a plurality of configuration information files according to configured categories, for example: the configuration information of the drive system generates a configuration information file corresponding to the type of the drive system, the configuration information of the memory generates a configuration information file corresponding to the type of the memory, and the configuration information of each middleware generates a configuration information file corresponding to each middleware. Preferably, the category attribute corresponding to each configuration information file is used as a category identifier of the corresponding configuration information file and is loaded into the configuration information file, where the category attribute includes a driving system, a memory, middleware, and the like, for example: the configuration information files of the driving system all carry the class identification of the driving system, and the configuration information files of the middleware all carry the class identification of the middleware. Meanwhile, the environment attribute corresponding to each target server is used as the environment identifier of the corresponding configuration information file and is loaded into the configuration information file, and the environment attribute comprises the following steps: development environment, test environment, production environment, and the like, for example: the configuration information files of the development environment all carry the environment identification of the development environment, the configuration information files of the test environment all carry the environment identification of the test environment, and the configuration information files of the production environment all carry the environment identification of the production environment.
Furthermore, the configuration requirements of the server for the operation of different programs are different, for example, one program may only be operated in a high-version operating system, and a low-version operating system does not support the operation of the program; or one program can run in different versions of the operating system at the same time, but other requirements on the configuration in the two versions of the operating system, and the like. Preferably, specific parameter values in the configuration information file are pre-divided into standard items and heterogeneous items, the specific division can be preset by a developer or set according to the requirements of the program on configuration, the standard items are used for representing configuration information necessary when the program runs, and the heterogeneous items are used for representing configuration information which has no influence on the program running. Taking kafaka middleware as an example, the configuration information of 'host.name' representing a host address, 'log.dirs' representing a data storage address and 'zookeeper.connect' representing a zookeeper connection character string is a heterogeneous item, and the configuration information representing 'host.name', 'log.dirs' and 'zookeeper.connect' has no influence on the running of a program, namely, the parameter values of the three pieces of configuration information in target servers corresponding to different environments can be different; and the other configuration information, such as the port representing the service port, the num.network.threads representing the maximum number of threads for processing messages, and the num.io.threads representing the number of threads for processing IO, are standard items, and the configuration information representing the port, the num.network.threads, the num.io.threads, and the like has influence on the operation of the program, namely, the parameter values of the influenced configuration information in the target servers corresponding to different environments need to meet the requirements and be consistent.
The configuration of the configuration information files identified by different categories is different, i.e. the standard items and the heterogeneous items of the configuration information files identified by different categories are also different, for example: the standard item/heterogeneous item of the configuration information file of the drive system category identification and the standard item/heterogeneous item of the configuration information file of the middleware category identification. Preferably, the corresponding relations of the standard items and/or the heterogeneous items corresponding to the plurality of category identifiers and the plurality of category identifiers are pre-stored in a configuration relation table, and after the configuration information file is obtained, the standard items and/or the heterogeneous items corresponding to the category identifiers can be extracted from the configuration relation table by identifying the category identifiers in the configuration information file, so that the configuration parameter values of which the corresponding program runs need to meet the requirements and are consistent, and the configuration parameter values of which the program runs have no influence and are not limited.
S300: and acquiring the parameter values of the standard items, and comparing and judging the parameter values of the same standard items of different target servers.
In an exemplary embodiment, the configuration information file is composed of standard items and/or heterogeneous items, and since the heterogeneous items have no influence on the program operation, the heterogeneous items can be excluded when performing the comparison judgment. Taking kafka middleware as an example, the standard items include "port", "num. The parameter value for "port" may be 11111, the parameter value for "num. Or may be understood as "port", "num. network. threads", "num. io. threads" for characterizing the classified items of 11111, 10, 1.
As shown in fig. 2, which is another schematic flow chart of a cluster configuration detection method according to this embodiment, it can be seen from the figure that S300 includes steps S301 and S302, which are specifically as follows:
s301: and extracting the proxy class name of the parameter value based on a JAVA reflection mechanism, and taking the proxy class name as a key value of the parameter value.
In an exemplary embodiment, a string of the parameter value is obtained; constructing a corresponding abstract syntax tree according to the character string, traversing the abstract syntax tree in a breadth mode by using a syntax parser, and creating a model file based on the nodes of the abstract syntax tree; setting the model file as a source code file, and calling a preset compiler to compile the source code file into the initial byte code file; and loading the initial byte code file into a preset virtual machine through a class loader to obtain an agent class name corresponding to the parameter value. The preset compiler is a JAVAC compilation tool, the initial bytecode file is a class file, the virtual machine is a JAVA virtual machine, and the class loaders include a boot (boottrap) class loader, an Extension (Extension) class loader, a System (System) class loader (also called an application class loader), and a Custom (Custom) class loader, which are not limited herein.
Since the configuration information file usually consists of character strings, the character strings in the standard items need to be classified after the standard items are extracted, and it can be understood that different types of standard items need to be compared one by one when performing comparison judgment, for example: taking kafka as an example, comparing and judging the parameter values of the port in the development environment and the port in the test or generation environment, and comparing and judging the parameter values of the num. The proxy class name of the parameter value is extracted by the JAVA reflection mechanism, based on the above example, that is, the proxy class name of the parameter value of 11111 is "port", the proxy class name of the parameter value of 10 is "num. And the proxy class name is used as a key value of the corresponding parameter value, the parameter value is used as a value, and the parameter value is stored in a configuration information file in a key-value format.
S302: and obtaining parameter values of the same key value of the same category identification of different environment identifications, and comparing and judging the parameter values.
In an exemplary embodiment, a plurality of configuration information files of the same category identification in development, test and production environments are respectively obtained, standard items are extracted from the configuration information files, a plurality of same key values are identified, and parameter values of the plurality of key values are compared and judged. For example: taking kafaka as an example, three configuration information files with kafka category identifications in the development, test and production environments are respectively obtained, standard items such as ' port ', ' num. The comparison and judgment of the parameter values or the value values can be carried out in a character string comparison or character string shape comparison mode.
S400: and if one of the parameter values is a null value and/or the parameter values are inconsistent, feeding back prompt information to a preset terminal.
In an exemplary embodiment, if one of the parameter values is a null value and/or a plurality of the parameter values are inconsistent in the development, test and production environments, the configuration of the target server representing the development, test and production environments is inconsistent, and a phenomenon that the program runs incorrectly in the environments with inconsistent corresponding configurations may occur. The method comprises the steps of obtaining a configuration information file corresponding to a null value parameter value or an inconsistent parameter value, feeding back an environment identifier, a category identifier and a key value corresponding to the null value parameter value or the inconsistent parameter value of the configuration information file to a preset terminal in a prompt message mode such as a mail or a short message, so that a developer can check information through the terminal, correspondingly modify the configuration or replace a server, ensure that the configuration of a server cluster which is responsible for developing the same program to be on-line is in accordance with requirements and consistent, simultaneously avoid the influence on the judgment of the developer on error reporting due to the error reporting phenomenon of the configuration in a test environment, and improve the test development efficiency.
Example two
Fig. 3 is a functional block diagram of a cluster configuration detecting apparatus according to the second embodiment.
The cluster configuration detection device 3 includes a determination module 31, an extraction module 32, a comparison module 33, and a feedback module 34. The module referred to in the present invention is a series of computer program segments capable of being executed by a processor and performing a fixed function, and is stored in a memory. In the present embodiment, the functions of the modules will be described in detail in the following embodiments.
The determining module 31 determines target servers corresponding to different environments from the server cluster.
In an exemplary embodiment, before new software or new functions are brought online, development or modification of codes is generally required in a development environment, and then a program generated by the codes is tested in a test environment to repair defects, so that the program can be uploaded to a production environment to perform external services after the program runs normally. The different environments for development, test and production include a plurality of sub-servers, one or more sub-servers may be designated by a developer in advance as target servers of the development, test or production environment, or one or more sub-servers may be randomly selected from a server cluster as target servers of the development, test or production environment.
The extracting module 32 is configured to correspondingly extract at least one configuration information file from the target server based on a request instruction sent by the management server, where the configuration information file includes a standard item and/or a heterogeneous item.
In an exemplary embodiment, after determining target servers corresponding to respective environments, a developer may initiate a detected request instruction to the respective target servers through a management server, and after receiving the request instruction, the target servers configure themselves to produce a plurality of configuration information files according to configured categories, for example: the configuration information of the drive system generates a configuration information file corresponding to the type of the drive system, the configuration information of the memory generates a configuration information file corresponding to the type of the memory, and the configuration information of each middleware generates a configuration information file corresponding to each middleware.
The comparison module 33 is configured to obtain the parameter values of the standard items, and compare and determine the parameter values of the same standard items of different target servers.
In an exemplary embodiment, a string of the parameter values is obtained; constructing a corresponding abstract syntax tree according to the character string, traversing the abstract syntax tree in a breadth mode by using a syntax parser, and creating a model file based on the nodes of the abstract syntax tree; compiling the model file into an initial byte code file; loading the initial byte code file into a preset virtual machine through a class loader to obtain an agent class name corresponding to the parameter value, and taking the agent class name as a key value of the parameter value; and obtaining parameter values of the same key values of the same category identifiers of different environment identifiers, and comparing and judging the parameter values.
The feedback module 34 is configured to feed back a prompt message to a preset terminal if one of the parameter values is a null value and/or the parameter values are inconsistent.
In an exemplary embodiment, if one of the parameter values is a null value and/or a plurality of the parameter values are inconsistent in the parameter values that are compared one by one in the development, test and production environments, the configuration of the target server representing the development, test and production environments is inconsistent, and a phenomenon that the program runs incorrectly in the environments with inconsistent corresponding configurations may occur.
EXAMPLE III
Fig. 4 is a schematic structural diagram of a computer device of the three-cluster configuration detection method according to this embodiment.
In the exemplary embodiment, computer device 4 includes, but is not limited to, a memory 41, a processor 42, and a computer program, such as a cluster configuration detection program, stored in memory 41 and executable on the processor. Those skilled in the art will appreciate that the depicted diagram is merely an example of a computing device and is not meant to be limiting and that the depicted diagram may include more or fewer components than those shown, or some components may be combined, or different components, e.g., the computing device may also include input output devices, network access devices, buses, etc.
The memory 41 includes at least one type of computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 41 may be an internal storage module of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the memory 41 may be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device. Of course, the memory 41 may also include both internal and external memory modules of the computer device. In this embodiment, the memory 41 is generally used for storing an operating system and various types of application software installed in the computer device. Further, the memory 41 may also be used to temporarily store various types of data that have been output or are to be output.
The Processor 42 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. The processor 42 is an operation core and a control center of the computer device, and is connected to each part of the whole computer device by various interfaces and lines, and executes an operating system of the computer device and various installed application programs, program codes, and the like.
The processor 42 executes the operating system of the computer device as well as various applications installed. The processor 42 executes the application program to implement the steps in the above-mentioned various cluster configuration detection method embodiments, such as steps S100, S200, S300, and S400 shown in fig. 1.
Example four
The present embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., on which a computer program is stored, which when executed by a processor implements corresponding functions. The computer-readable storage medium of this embodiment is used for storing a computer program for implementing the cluster configuration detection method, and when being executed by the processor 42, implements the cluster configuration detection method of one, two, or three embodiments.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
It should be noted that, in this document, 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 an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The application is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A cluster configuration detection method, comprising:
determining target servers corresponding to different environments from a server cluster;
correspondingly extracting at least one configuration information file from the target server based on a request instruction sent by a management server, wherein the configuration information file comprises a standard item and/or a heterogeneous item;
acquiring parameter values of the standard items, and comparing and judging the parameter values of the same standard items of different target servers;
and if one of the parameter values is a null value and/or the parameter values are inconsistent, feeding back prompt information to a preset terminal.
2. The cluster configuration detection method according to claim 1, wherein the extracting at least one configuration information file from the target server based on the request instruction sent by the management server includes:
and taking the environment attribute corresponding to the configuration information file as an environment identifier corresponding to the configuration information file, wherein the environment attribute comprises a development environment, a test environment and a production environment.
3. The cluster configuration detection method according to claim 2, wherein the extracting at least one configuration information file from the target server based on the request instruction sent by the management server comprises:
identifying a category identification of the configuration information file;
and correspondingly acquiring a standard item and/or a heterogeneous item of the configuration information file based on the category identification.
4. The method according to claim 3, wherein the obtaining of the standard item and/or the heterogeneous item of the configuration information file based on the category identifier comprises:
extracting a standard item and/or a heterogeneous item corresponding to the category identification from a preset configuration relation table; the configuration relation table stores a plurality of category identifications and corresponding relations of standard items and/or heterogeneous items corresponding to the category identifications in advance.
5. The cluster configuration detection method according to claim 3, wherein the obtaining of the parameter value of the standard item and the comparison and determination of the parameter value of the same standard item of different target servers includes:
extracting the proxy class name of the parameter value based on a JAVA reflection mechanism, and taking the proxy class name as a key value of the parameter value;
and obtaining parameter values of the same key values of the same category identifiers of different environment identifiers, and comparing and judging the parameter values.
6. The cluster configuration detection method of claim 5, wherein the extracting the proxy class name of the parameter value based on the JAVA reflection mechanism comprises:
acquiring a character string of the parameter value;
constructing a corresponding abstract syntax tree according to the character string, traversing the abstract syntax tree in a breadth mode by using a syntax parser, and creating a model file based on the nodes of the abstract syntax tree;
compiling the model file into an initial byte code file;
and loading the initial byte code file into a preset virtual machine through a class loader to obtain the proxy class name corresponding to the parameter value.
7. The cluster configuration detection method of claim 1, wherein compiling the model file into an initial byte code file comprises:
and setting the model file as a source code file, and calling a preset compiler to compile the source code file into the initial byte code file.
8. A cluster configuration detection apparatus, comprising:
the determining module is used for determining target servers corresponding to different environments from the server cluster;
the extraction module is used for correspondingly extracting at least one configuration information file from the target server based on a request instruction sent by the management server, wherein the configuration information file comprises a standard item and/or a heterogeneous item;
the comparison module is used for acquiring the parameter values of the standard items and comparing and judging the parameter values of the same standard items of different target servers;
and the feedback module is used for feeding back prompt information to a preset terminal if one of the parameter values is a null value and/or the parameter values are inconsistent.
9. A computer device, comprising:
a memory storing at least a computer program; and
a processor executing a computer program stored in the memory to implement the cluster configuration detection method of any of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is executed by a processor to implement the cluster configuration detection method according to any one of claims 1 to 7.
CN202210366812.2A 2022-04-08 2022-04-08 Cluster configuration detection method and device, computer equipment and storage medium Pending CN114661423A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210366812.2A CN114661423A (en) 2022-04-08 2022-04-08 Cluster configuration detection method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210366812.2A CN114661423A (en) 2022-04-08 2022-04-08 Cluster configuration detection method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114661423A true CN114661423A (en) 2022-06-24

Family

ID=82035026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210366812.2A Pending CN114661423A (en) 2022-04-08 2022-04-08 Cluster configuration detection method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114661423A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115640109A (en) * 2022-11-04 2023-01-24 苏州阿基米德网络科技有限公司 Task scheduling method, system and client
CN116991470A (en) * 2023-09-26 2023-11-03 云账户技术(天津)有限公司 Method, device, computer equipment and storage medium for inspecting environment configuration data

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115640109A (en) * 2022-11-04 2023-01-24 苏州阿基米德网络科技有限公司 Task scheduling method, system and client
CN115640109B (en) * 2022-11-04 2023-11-14 苏州阿基米德网络科技有限公司 Task scheduling method, system and client
CN116991470A (en) * 2023-09-26 2023-11-03 云账户技术(天津)有限公司 Method, device, computer equipment and storage medium for inspecting environment configuration data

Similar Documents

Publication Publication Date Title
CN106156186B (en) Data model management device, server and data processing method
CN114661423A (en) Cluster configuration detection method and device, computer equipment and storage medium
CN115185550A (en) Service deployment method, device, computer equipment and storage medium
CN111045927A (en) Performance test evaluation method and device, computer equipment and readable storage medium
CN113448862B (en) Software version testing method and device and computer equipment
CN111694612A (en) Configuration checking method, device, computer system and storage medium
CN111158741A (en) Method and device for monitoring change of dependency relationship of business module on third-party class library
CN112148278A (en) Visual block chain intelligent contract framework and intelligent contract development and deployment method
CN111367890A (en) Data migration method and device, computer equipment and readable storage medium
CN111694750A (en) Method and device for constructing software testing environment
CN112559337A (en) Code coverage rate testing method and device, electronic equipment and storage medium
US9396239B2 (en) Compiling method, storage medium and compiling apparatus
CN116661758B (en) Method, device, electronic equipment and medium for optimizing log framework configuration
CN112561690A (en) Method, system, equipment and storage medium for testing credit card staging service interface
EP3999917B1 (en) Method and system for generating a digital representation of asset information in a cloud computing environment
CN111352631A (en) Interface compatibility detection method and device
CN116841906A (en) Intelligent contract detection method and device and electronic equipment
CN116599881A (en) Cloud platform tenant modeling test method, device, equipment and storage medium
CN115033489A (en) Code resource detection method and device, electronic equipment and storage medium
CN114527993A (en) Application deployment method, device, equipment and medium
CN114706586A (en) Code compiling method, code running method, code compiling device, code running device, computer equipment and storage medium
CN112948480B (en) Data extraction method, device, electronic equipment and storage medium
CN118035072A (en) Automatic acceptance method and system based on multi-version upgrading
CN118535217A (en) Patch file generation method, system and storage medium
CN113986233A (en) Software update package generation method, storage medium and terminal equipment

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