WO2023065749A1 - Distributed database embedding method and apparatus, and device and storage medium - Google Patents

Distributed database embedding method and apparatus, and device and storage medium Download PDF

Info

Publication number
WO2023065749A1
WO2023065749A1 PCT/CN2022/107573 CN2022107573W WO2023065749A1 WO 2023065749 A1 WO2023065749 A1 WO 2023065749A1 CN 2022107573 W CN2022107573 W CN 2022107573W WO 2023065749 A1 WO2023065749 A1 WO 2023065749A1
Authority
WO
WIPO (PCT)
Prior art keywords
distributed database
information
port
file
computer
Prior art date
Application number
PCT/CN2022/107573
Other languages
French (fr)
Chinese (zh)
Inventor
刘松树
谢永恒
程强
张俊杰
毛勇岗
Original Assignee
北京锐安科技有限公司
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 北京锐安科技有限公司 filed Critical 北京锐安科技有限公司
Publication of WO2023065749A1 publication Critical patent/WO2023065749A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Definitions

  • the embodiments of the present application relate to the field of computer technology, for example, to an embedded method, device, device and storage medium of a distributed database.
  • a distributed database on the server side or a container technology are used to initialize related instances.
  • using the server-side distributed database for program testing will result in information conflicts among multiple tests; using container technology for testing cannot be compatible with various operating systems.
  • Embodiments of the present application provide an embedded method, device, equipment, and storage medium of a distributed database.
  • the embodiment of the present application provides an embedded method of a distributed database, including:
  • the installation file includes a configuration file
  • configuration information includes port information
  • the embodiment of the present application also provides an embedded device of a distributed database, which is configured as:
  • the installation file includes a configuration file
  • configuration information includes port information
  • the embodiment of the present application also provides a computer device, including a memory, a processor, and a computer program stored on the memory and operable on the processor, when the processor executes the computer program, it realizes the The embedded method of the distributed database described in the embodiment of the application.
  • the embodiment of the present application further provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the method described in the embodiment of the present application. Embedded methods for distributed databases.
  • Fig. 1 is a flow chart of an embedded method of a distributed database in Embodiment 1 of the present application;
  • FIG. 2 is a schematic structural diagram of an embedded device of a distributed database in Embodiment 2 of the present application;
  • FIG. 3 is a schematic structural diagram of a computer device in Embodiment 3 of the present application.
  • Fig. 1 is a flow chart of a method for embedding a distributed database provided in Embodiment 1 of the present application.
  • This embodiment can embed a distributed database, and this method can be executed by an embedded device of a distributed database.
  • the means may consist of hardware and/or software, and may generally be integrated in a device with embedded functionality of a distributed database. As shown in Figure 1, the method includes the following.
  • Step 110 obtain the distributed database installation package, and decompress the distributed database installation package to obtain the distributed database installation file.
  • the installation file can be understood as including all files of the distributed database installation.
  • configuration files can be files with the suffix ".yml”.
  • the distributed database installation package can be of any operating system version, for example: window version, Lenix version or Dos version, etc.
  • the distributed database can be, for example, an Elasticsearch database.
  • the distributed database installation package may be obtained from the local storage or the server, and then the distributed database installation package may be decompressed using a compression application program to obtain the installation file.
  • the following steps are further included: obtaining a temporary storage path.
  • obtaining the temporary storage path may be understood as allocating a temporary storage space in the memory of the terminal device for storing the installation file.
  • the method further includes: storing the installation file in the temporary storage path.
  • Step 120 modify the configuration file according to the preset configuration information.
  • the configuration information includes port information, a log file directory, a data file directory, and the like.
  • the port information can be randomly assigned by the current system according to the idle port of the target, or specified by the user.
  • Step 130 start the process of the distributed database on the port corresponding to the port information, so as to perform program testing according to the started distributed database.
  • the operating system after modifying the port information in the configuration file, the operating system starts a process in the port corresponding to the port information through a process call component (such as: Runtime), which is used to start the distributed database.
  • a process call component such as: Runtime
  • the distributed database after startup is used for program testing.
  • the port corresponding to the port information starts the process of the distributed database, it also includes: monitoring the log information of the distributed database during the startup process; judging whether the distributed database is started successfully according to the log information; if the startup is successful, Then return the start success message.
  • the log information may record the startup progress and startup status of the distributed database, and the like.
  • the operating system will monitor the log information of the distributed database during the startup process, and the startup progress and status of the monitored distributed database can be obtained in real time through the log information, so that Determine whether the distributed database is successfully started according to the startup progress and status, and return the startup success message if the startup is successful.
  • the port corresponding to the port information starts the process of the distributed database, it also includes: when receiving the instruction to end the distributed database service, obtaining the process occupying the port corresponding to the port information, and determining it as the target process; End the target process.
  • the port corresponding to the port information is obtained first, and then the process in the port is terminated, thereby ending the process of the distributed database.
  • the distributed database installation package is obtained, and the distributed database installation package is decompressed to obtain the installation file of the distributed database; wherein, the installation file includes a configuration file; the configuration file is modified according to preset configuration information; wherein, the configuration The information includes port information; the process of the distributed database is started at the port corresponding to the port information, so as to perform program testing according to the started distributed database.
  • the embedded method of the distributed database provided by the embodiment of the present application starts the process of the distributed database at the port corresponding to the port information, so as to perform program testing according to the started distributed database, so that the embedded distributed database is performing program testing It does not conflict and is compatible with various operating systems.
  • FIG. 2 is a schematic structural diagram of an embedded device of a distributed database provided in Embodiment 2 of the present application. As shown in FIG. 2 , the device includes the following.
  • the distributed database installation package acquisition module 210 is configured to obtain the distributed database installation package, and the distributed database installation package is decompressed to obtain the installation file of the distributed database; wherein the installation file includes a configuration file;
  • the configuration file modification module 220 is configured to modify the configuration file according to preset configuration information; wherein the configuration information includes port information;
  • the process starting module 230 is configured to start the process of the distributed database at the port corresponding to the port information, so as to perform program testing according to the started distributed database.
  • a log information monitoring module which is set to:
  • a temporary storage path acquisition module which is set to:
  • it also includes: a process end module, which is set to:
  • the above-mentioned device can execute the methods provided by all the foregoing embodiments of the present application, and has corresponding functional modules and beneficial effects for executing the above-mentioned methods.
  • the above-mentioned device can execute the methods provided by all the foregoing embodiments of the present application, and has corresponding functional modules and beneficial effects for executing the above-mentioned methods.
  • FIG. 3 is a schematic structural diagram of a computer device provided in Embodiment 3 of the present application.
  • FIG. 3 shows a block diagram of a computer device 312 suitable for implementing embodiments of the present application.
  • the computer device 312 shown in FIG. 3 is only an example, and should not limit the functions and scope of use of this embodiment of the present application.
  • Device 312 is a typical distributed database built-in computing device.
  • computer device 312 takes the form of a general-purpose computing device.
  • Components of computer device 312 may include, but are not limited to: one or more processors 316 , storage device 328 (also referred to as memory), and bus 318 connecting different system components (including storage device 328 and processor 316 ).
  • Bus 318 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus structures.
  • these architectures include but are not limited to Industry Standard Architecture (Industry Standard Architecture, ISA) bus, Micro Channel Architecture (Micro Channel Architecture, MCA) bus, Enhanced ISA bus, Video Electronics Standards Association (Video Electronics Standards Association, VESA) local bus and peripheral component interconnect (Peripheral Component Interconnect, PCI) bus.
  • Computer device 312 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computing device 312 and include both volatile and nonvolatile media, removable and non-removable media.
  • Storage device 328 may include computer system readable media in the form of volatile memory, such as random access memory (Random Access Memory, RAM) 330 and/or cache memory 332 .
  • Computer device 312 may further include other removable/non-removable, volatile/nonvolatile computer system storage media.
  • storage system 334 may be used to read and write to non-removable, non-volatile magnetic media (not shown in FIG. 3, commonly referred to as a "hard drive").
  • a disk drive for reading and writing to a removable non-volatile disk may be provided, as well as a removable non-volatile disk (such as a Compact Disc- Read Only Memory, CD-ROM), Digital Video Disc (Digital Video Disc-Read Only Memory, DVD-ROM) or other optical media) CD-ROM drive.
  • each drive may be connected to bus 318 through one or more data media interfaces.
  • the storage device 328 may include at least one program product having a set (for example, at least one) of program modules configured to execute the functions of the various embodiments of the present application.
  • a program 336 having a set (at least one) of program modules 326 may be stored, for example, in storage device 328, such program modules 326 including but not limited to an operating system, one or more application programs, other program modules, and program data, which Each or some combination of the examples may include the implementation of a network environment.
  • the program modules 326 generally perform the functions and/or methods of the embodiments described herein.
  • the computer device 312 may also communicate with one or more external devices 314 (e.g., a keyboard, pointing device, camera, display 324, etc.), and with one or more devices that enable a user to interact with the computer device 312, and/or Or communicate with any device (eg, network card, modem, etc.) that enables the computing device 312 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O, Input/Output) interface 322 .
  • the computer device 312 can also communicate with one or more networks (such as a local area network (Local Area Network, LAN), a wide area network, Wide Area Network, WAN) and/or a public network, such as the Internet, through the network adapter 320.
  • networks such as a local area network (Local Area Network, LAN), a wide area network, Wide Area Network, WAN) and/or a public network, such as the Internet, through the network adapter 320.
  • networks such as a local area network
  • network adapter 320 communicates with other modules of computer device 312 via bus 318 .
  • other hardware and/or software modules may be used in conjunction with computer device 312, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, disk arrays (Redundant Arrays of Independent Disks, RAID) systems, tape drives, and data backup storage systems.
  • the processor 316 executes various functional applications and data processing by running the programs stored in the storage device 328 , such as realizing the embedded method of the distributed database provided by the above-mentioned embodiments of the present application.
  • An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored.
  • the program is executed by a processing device, the method for embedding a distributed database as in the embodiment of the present application is implemented.
  • the computer-readable medium mentioned above in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two.
  • a computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof.
  • Examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more conductors, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only Memory (EPROM, Erasable Programmable Read-Only Memory), flash memory, optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device .
  • the program code contained on the computer readable medium can be transmitted by any appropriate medium, including but not limited to: electric wire, optical cable, RF (Radio Frequency, radio frequency), etc., or any suitable combination of the above.
  • the storage medium may be a non-transitory storage medium.
  • the client and the server can communicate using any currently known or future-developed network protocols such as HTTP (Hyper Text Transfer Protocol, Hypertext Transfer Protocol), and can communicate with any form or medium of digital Data communication (eg, communication network) interconnections.
  • HTTP Hyper Text Transfer Protocol
  • Examples of communication networks include local area networks ("LANs”), wide area networks ("WANs”), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device (also referred to as a computer device), the electronic device: obtains the distributed database installation package, and executes the The distributed database installation package is decompressed to obtain the installation file of the distributed database; wherein the installation file includes a configuration file; modify the configuration file according to preset configuration information; wherein the configuration information includes port information; The port corresponding to the port information starts the process of the distributed database, so as to perform program testing according to the started distributed database.
  • Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, or combinations thereof, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages - such as the "C" language or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through an Internet service provider). Internet connection).
  • LAN local area network
  • WAN wide area network
  • Internet service provider such as AT&T, MCI, Sprint, EarthLink, MSN, GTE, etc.
  • each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Among them, the name of the unit does not constitute a limitation of the unit itself under certain circumstances.
  • hardware logic components of exemplary types that can be used include: Field Programmable Gate Array (FPGA, Field Programmable Gate Array), Application Specific Integrated Circuit (ASIC, Application Specific Integrated Circuit), Application Specific Standard Product (ASSP, Application Specific Standard Product), System on Chip (SOC, System on Chip), Complex Programmable Logic Device (CPLD, Complex Programmable Logic Device) and so on.
  • FPGA Field Programmable Gate Array
  • ASIC Application Specific Integrated Circuit
  • ASSP Application Specific Standard Product
  • SOC System on Chip
  • CPLD Complex Programmable Logic Device
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media examples include one or more wire-based electrical connections, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM), or flash memory), optical fiber, compact disc read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM erasable programmable read only memory
  • flash memory flash memory
  • optical fiber compact disc read only memory
  • CD-ROM compact disc read only memory
  • magnetic storage or any suitable combination of the foregoing.

Abstract

Disclosed in embodiments of the preset application are a distributed database embedding method and apparatus, and a device and a storage medium. The method comprises: acquiring a distributed database installation package, and decompressing the distributed database installation package to obtain an installation file of a distributed database, wherein the installation file comprises a configuration file; modifying the configuration file according to preset configuration information, wherein the configuration information comprises port information; and starting a process of the distributed database at a port corresponding to the port information, to carry out program testing according to the started distributed database.

Description

分布式数据库的内嵌方法、装置、设备及存储介质Embedded method, device, equipment and storage medium of distributed database
本申请要求在2021年10月20日提交中国专利局、申请号为202111223218.X的中国专利申请的优先权,以上申请的全部内容通过引用结合在本申请中。This application claims priority to a Chinese patent application with application number 202111223218.X filed with the China Patent Office on October 20, 2021, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请实施例涉及计算机技术领域,例如涉及一种分布式数据库的内嵌方法、装置、设备及存储介质。The embodiments of the present application relate to the field of computer technology, for example, to an embedded method, device, device and storage medium of a distributed database.
背景技术Background technique
对于采用分布式数据库的编程信息系统,在进行单元测试或者集成测试的过程,需要调用分布式数据库中的数据进行测试。相关技术中,一般采用服务端的分布式数据库或者采用容器技术进行相关实例的初始化。然而,采用服务端的分布式数据库进行程序测试会产生多个测试之间的信息冲突等状况;采用容器技术进行测试无法兼容各种操作系统。For a programming information system using a distributed database, in the process of unit testing or integration testing, it is necessary to call the data in the distributed database for testing. In related technologies, generally, a distributed database on the server side or a container technology are used to initialize related instances. However, using the server-side distributed database for program testing will result in information conflicts among multiple tests; using container technology for testing cannot be compatible with various operating systems.
发明内容Contents of the invention
本申请实施例提供一种分布式数据库的内嵌方法、装置、设备及存储介质。Embodiments of the present application provide an embedded method, device, equipment, and storage medium of a distributed database.
第一方面,本申请实施例提供了一种分布式数据库的内嵌方法,包括:In the first aspect, the embodiment of the present application provides an embedded method of a distributed database, including:
获取分布式数据库安装包,并对所述分布式数据库安装包进行解压缩,获得分布式数据库的安装文件;其中,所述安装文件包括配置文件;Obtain a distributed database installation package, and decompress the distributed database installation package to obtain the installation file of the distributed database; wherein, the installation file includes a configuration file;
根据预设配置信息修改所述配置文件;其中,所述配置信息包括端口信息;modifying the configuration file according to preset configuration information; wherein the configuration information includes port information;
在所述端口信息对应的端口启动所述分布式数据库的进程,以根据启动后的分布式数据库进行程序测试。Start the process of the distributed database on the port corresponding to the port information, so as to perform program testing according to the started distributed database.
第二方面,本申请实施例还提供了一种分布式数据库的内嵌装置,设置为:In the second aspect, the embodiment of the present application also provides an embedded device of a distributed database, which is configured as:
获取分布式数据库安装包,并对所述分布式数据库安装包进行解压缩,获得分布式数据库的安装文件;其中,所述安装文件包括配置文件;Obtain a distributed database installation package, and decompress the distributed database installation package to obtain the installation file of the distributed database; wherein, the installation file includes a configuration file;
根据预设配置信息修改所述配置文件;其中,所述配置信息包括端口信息;modifying the configuration file according to preset configuration information; wherein the configuration information includes port information;
在所述端口信息对应的端口启动所述分布式数据库的进程,以根据启动后的分布式数据库进行程序测试。Start the process of the distributed database on the port corresponding to the port information, so as to perform program testing according to the started distributed database.
第三方面,本申请实施例还提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如本申请实施例所述的分布式数据库的内嵌方法。In the third aspect, the embodiment of the present application also provides a computer device, including a memory, a processor, and a computer program stored on the memory and operable on the processor, when the processor executes the computer program, it realizes the The embedded method of the distributed database described in the embodiment of the application.
第四方面,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如本申请实施例所述的分布式数据库的内嵌方法。In the fourth aspect, the embodiment of the present application further provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the method described in the embodiment of the present application. Embedded methods for distributed databases.
附图说明Description of drawings
图1是本申请实施例一中的一种分布式数据库的内嵌方法的流程图;Fig. 1 is a flow chart of an embedded method of a distributed database in Embodiment 1 of the present application;
图2是本申请实施例二中的一种分布式数据库的内嵌装置的结构示意图;FIG. 2 is a schematic structural diagram of an embedded device of a distributed database in Embodiment 2 of the present application;
图3是本申请实施例三中的一种计算机设备的结构示意图。FIG. 3 is a schematic structural diagram of a computer device in Embodiment 3 of the present application.
具体实施方式Detailed ways
下面结合附图和实施例对本申请进行说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。The application will be described below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the convenience of description, only some structures related to the present application are shown in the drawings but not all structures.
实施例一Embodiment one
图1为本申请实施例一提供的一种分布式数据库的内嵌方法的流程图,本实施例可将分布式数据库进行内嵌,该方法可以由分布式数据库的内嵌装置来执行,该装置可由硬件和/或软件组成,并一般可集成在具有分布式数据库的内嵌功能的设备中。如图1所示,该方法包括如下。Fig. 1 is a flow chart of a method for embedding a distributed database provided in Embodiment 1 of the present application. This embodiment can embed a distributed database, and this method can be executed by an embedded device of a distributed database. The means may consist of hardware and/or software, and may generally be integrated in a device with embedded functionality of a distributed database. As shown in Figure 1, the method includes the following.
步骤110,获取分布式数据库安装包,并对分布式数据库安装包进行解压缩,获得分布式数据库的安装文件。Step 110, obtain the distributed database installation package, and decompress the distributed database installation package to obtain the distributed database installation file.
其中,安装文件可以理解为包括分布式数据库安装的所有文件。例如:配置文件。配置文件可以以“.yml”为后缀的文件。分布式数据库安装包可以是任意操作系统版本的,例如:window版本、Lenix版本或者Dos版本等。分布式数据库例如可以是Elasticsearch数据库。Wherein, the installation file can be understood as including all files of the distributed database installation. For example: configuration files. Configuration files can be files with the suffix ".yml". The distributed database installation package can be of any operating system version, for example: window version, Lenix version or Dos version, etc. The distributed database can be, for example, an Elasticsearch database.
在一实施例中,可以从本地存储器或者服务端获取分布式数据库安装包,然后利用压缩应用程序对分布式数据库安装包进行解压缩,获得安装文件。In an embodiment, the distributed database installation package may be obtained from the local storage or the server, and then the distributed database installation package may be decompressed using a compression application program to obtain the installation file.
在一实施例中,在获取分布式数据库安装包之后,还包括如下步骤:获取临时存放路径。In an embodiment, after obtaining the distributed database installation package, the following steps are further included: obtaining a temporary storage path.
其中,获取临时存放路径可以理解为在终端设备中存储器中分配一临时存储空间,用于存储安装文件。Wherein, obtaining the temporary storage path may be understood as allocating a temporary storage space in the memory of the terminal device for storing the installation file.
相应的,在获得分布式数据库的安装文件之后,还包括:将所述安装文件存入所述临时存放路径。Correspondingly, after obtaining the installation file of the distributed database, the method further includes: storing the installation file in the temporary storage path.
步骤120,根据预设配置信息修改配置文件。Step 120, modify the configuration file according to the preset configuration information.
其中,配置信息包括端口信息、日志文件目录及数据文件目录等。端口信息可以是当前系统根据目标空闲的端口随机配发的,或者是用户指定的。Wherein, the configuration information includes port information, a log file directory, a data file directory, and the like. The port information can be randomly assigned by the current system according to the idle port of the target, or specified by the user.
步骤130,在端口信息对应的端口启动分布式数据库的进程,以根据启动后的分布式数据库进行程序测试。Step 130, start the process of the distributed database on the port corresponding to the port information, so as to perform program testing according to the started distributed database.
在一实施例中,在修改了配置文件中的端口信息之后,操作系统通过进程调取组件(如:Runtime)在该端口信息对应的端口中启动一进程,用于启动分布式数据库,从而根据启动后的分布式数据库进行程序测试。In one embodiment, after modifying the port information in the configuration file, the operating system starts a process in the port corresponding to the port information through a process call component (such as: Runtime), which is used to start the distributed database. The distributed database after startup is used for program testing.
在一实施例中,在端口信息对应的端口启动分布式数据库的进程之后,还包括:监控分布式数据库在启动过程中的日志信息;根据日志信息判断分布式数据库是否启动成功;若启动成功,则返回启动成功信息。In one embodiment, after the port corresponding to the port information starts the process of the distributed database, it also includes: monitoring the log information of the distributed database during the startup process; judging whether the distributed database is started successfully according to the log information; if the startup is successful, Then return the start success message.
其中,日志信息可以记录分布式数据库的启动进度及启动状态等。本实施例中,操作系统通过进程启动分布式数据库的过程中,会监控分布式数据库在启动过程中的日志信息,通过日志信息可以实时获取到监控到的分布式数据库的启动进度及状态,从而根据启动进度和状态来确定分布式数据库是否启动成功,当若启动成功,则返回启动成功信息。Wherein, the log information may record the startup progress and startup status of the distributed database, and the like. In this embodiment, during the process of starting the distributed database through the process, the operating system will monitor the log information of the distributed database during the startup process, and the startup progress and status of the monitored distributed database can be obtained in real time through the log information, so that Determine whether the distributed database is successfully started according to the startup progress and status, and return the startup success message if the startup is successful.
在一实施例中,在端口信息对应的端口启动分布式数据库的进程之后,还包括:当接收到结束分布式数据库服务的指令时,获取占用端口信息对应的端口的进程,确定为目标进程;结束目标进程。In one embodiment, after the port corresponding to the port information starts the process of the distributed database, it also includes: when receiving the instruction to end the distributed database service, obtaining the process occupying the port corresponding to the port information, and determining it as the target process; End the target process.
在一实施例中,首先获取到端口信息对应的端口,然后将端口中的进程结束掉,从而结束了分布式数据库的进程。In an embodiment, the port corresponding to the port information is obtained first, and then the process in the port is terminated, thereby ending the process of the distributed database.
本实施例,获取分布式数据库安装包,并对分布式数据库安装包进行解压缩,获得分布式数据库的安装文件;其中,安装文件包括配置文件;根据预设配置信息修改配置文件;其中,配置信息包括端口信息;在端口信息对应的端口启动分布式数据库的进程,以根据启动后的分布式数据库进行程序测试。本申请实施例提供的分布式数据库的内嵌方法,在端口信息对应的端口启动分布式数据库的进程,以根据启动后的分布式数据库进行程序测试,使得内嵌的分布式数据库在进行程序测试时既不冲突又可以兼容各种操作系统。In this embodiment, the distributed database installation package is obtained, and the distributed database installation package is decompressed to obtain the installation file of the distributed database; wherein, the installation file includes a configuration file; the configuration file is modified according to preset configuration information; wherein, the configuration The information includes port information; the process of the distributed database is started at the port corresponding to the port information, so as to perform program testing according to the started distributed database. The embedded method of the distributed database provided by the embodiment of the present application starts the process of the distributed database at the port corresponding to the port information, so as to perform program testing according to the started distributed database, so that the embedded distributed database is performing program testing It does not conflict and is compatible with various operating systems.
实施例二Embodiment two
图2是本申请实施例二提供的一种分布式数据库的内嵌装置的结构示意图,如图2所示,该装置包括如下。FIG. 2 is a schematic structural diagram of an embedded device of a distributed database provided in Embodiment 2 of the present application. As shown in FIG. 2 , the device includes the following.
分布式数据库安装包获取模块210,设置为获取分布式数据库安装包,并对 分布式数据库安装包进行解压缩,获得分布式数据库的安装文件;其中,安装文件包括配置文件;The distributed database installation package acquisition module 210 is configured to obtain the distributed database installation package, and the distributed database installation package is decompressed to obtain the installation file of the distributed database; wherein the installation file includes a configuration file;
配置文件修改模块220,设置为根据预设配置信息修改配置文件;其中,配置信息包括端口信息;The configuration file modification module 220 is configured to modify the configuration file according to preset configuration information; wherein the configuration information includes port information;
进程启动模块230,设置为在端口信息对应的端口启动分布式数据库的进程,以根据启动后的分布式数据库进行程序测试。The process starting module 230 is configured to start the process of the distributed database at the port corresponding to the port information, so as to perform program testing according to the started distributed database.
在一实施例中,还包括:日志信息监控模块,设置为:In one embodiment, it also includes: a log information monitoring module, which is set to:
监控分布式数据库在启动过程中的日志信息;Monitor the log information of the distributed database during startup;
根据日志信息判断分布式数据库是否启动成功;Judging whether the distributed database is started successfully according to the log information;
若启动成功,则返回启动成功信息。If the startup is successful, the startup success message will be returned.
在一实施例中,还包括:临时存放路径获取模块,设置为:In one embodiment, it also includes: a temporary storage path acquisition module, which is set to:
获取临时存放路径;Obtain the temporary storage path;
还包括:安装文件存放模块,设置为:It also includes: installing the file storage module, set to:
将安装文件存入临时存放路径。Save the installation files to the temporary storage path.
在一实施例中,还包括:进程结束模块,设置为:In one embodiment, it also includes: a process end module, which is set to:
当接收到结束分布式数据库服务的指令时,获取占用端口信息对应的端口的进程,将所述占用所述端口信息对应的端口的进程确定为目标进程;When receiving an instruction to end the distributed database service, obtain a process occupying a port corresponding to the port information, and determine the process occupying a port corresponding to the port information as a target process;
结束目标进程。End the target process.
上述装置可执行本申请前述所有实施例所提供的方法,具备执行上述方法相应的功能模块和有益效果。未在本实施例中描述的技术细节,可参见本申请前述所有实施例所提供的方法。The above-mentioned device can execute the methods provided by all the foregoing embodiments of the present application, and has corresponding functional modules and beneficial effects for executing the above-mentioned methods. For technical details not described in this embodiment, refer to the methods provided in all the foregoing embodiments of the present application.
实施例三Embodiment three
图3为本申请实施例三提供的一种计算机设备的结构示意图。图3示出了适于用来实现本申请实施方式的计算机设备312的框图。图3显示的计算机设备312仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。设备312是典型的分布式数据库的内嵌功能的计算设备。FIG. 3 is a schematic structural diagram of a computer device provided in Embodiment 3 of the present application. FIG. 3 shows a block diagram of a computer device 312 suitable for implementing embodiments of the present application. The computer device 312 shown in FIG. 3 is only an example, and should not limit the functions and scope of use of this embodiment of the present application. Device 312 is a typical distributed database built-in computing device.
如图3所示,计算机设备312以通用计算设备的形式表现。计算机设备312的组件可以包括但不限于:一个或者多个处理器316,存储装置328(也可记为内存),连接不同系统组件(包括存储装置328和处理器316)的总线318。As shown in FIG. 3, computer device 312 takes the form of a general-purpose computing device. Components of computer device 312 may include, but are not limited to: one or more processors 316 , storage device 328 (also referred to as memory), and bus 318 connecting different system components (including storage device 328 and processor 316 ).
总线318表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构 (Industry Standard Architecture,ISA)总线,微通道体系结构(Micro Channel Architecture,MCA)总线,增强型ISA总线、视频电子标准协会(Video Electronics Standards Association,VESA)局域总线以及外围组件互连(Peripheral Component Interconnect,PCI)总线。 Bus 318 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (Industry Standard Architecture, ISA) bus, Micro Channel Architecture (Micro Channel Architecture, MCA) bus, Enhanced ISA bus, Video Electronics Standards Association (Video Electronics Standards Association, VESA) local bus and peripheral component interconnect (Peripheral Component Interconnect, PCI) bus.
计算机设备312典型地包括多种计算机系统可读介质。这些介质可以是任何能够被计算机设备312访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。 Computer device 312 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computing device 312 and include both volatile and nonvolatile media, removable and non-removable media.
存储装置328可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(Random Access Memory,RAM)330和/或高速缓存存储器332。计算机设备312可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统334可以用于读写不可移动的、非易失性磁介质(图3未显示,通常称为“硬盘驱动器”)。尽管图3中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如只读光盘(Compact Disc-Read Only Memory,CD-ROM)、数字视盘(Digital Video Disc-Read Only Memory,DVD-ROM)或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线318相连。存储装置328可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本申请各实施例的功能。 Storage device 328 may include computer system readable media in the form of volatile memory, such as random access memory (Random Access Memory, RAM) 330 and/or cache memory 332 . Computer device 312 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 334 may be used to read and write to non-removable, non-volatile magnetic media (not shown in FIG. 3, commonly referred to as a "hard drive"). Although not shown in FIG. 3, a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk") may be provided, as well as a removable non-volatile disk (such as a Compact Disc- Read Only Memory, CD-ROM), Digital Video Disc (Digital Video Disc-Read Only Memory, DVD-ROM) or other optical media) CD-ROM drive. In these cases, each drive may be connected to bus 318 through one or more data media interfaces. The storage device 328 may include at least one program product having a set (for example, at least one) of program modules configured to execute the functions of the various embodiments of the present application.
具有一组(至少一个)程序模块326的程序336,可以存储在例如存储装置328中,这样的程序模块326包括但不限于操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块326通常执行本申请所描述的实施例中的功能和/或方法。A program 336 having a set (at least one) of program modules 326 may be stored, for example, in storage device 328, such program modules 326 including but not limited to an operating system, one or more application programs, other program modules, and program data, which Each or some combination of the examples may include the implementation of a network environment. The program modules 326 generally perform the functions and/or methods of the embodiments described herein.
计算机设备312也可以与一个或多个外部设备314(例如键盘、指向设备、摄像头、显示器324等)通信,还可与一个或者多个使得用户能与该计算机设备312交互的设备通信,和/或与使得该计算机设备312能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/O,Input/Output)接口322进行。并且,计算机设备312还可以通过网络适配器320与一个或者多个网络(例如局域网(Local Area Network,LAN),广域网Wide Area Network,WAN)和/或公共网络,例如因特网)通信。如图3所示,网络适配器320通过总线318与计算机设备312的其它模块通信。应当明白,尽管图3中未示出,可以结合计算机设备312使用其它硬件和/或软 件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、磁盘阵列(Redundant Arrays of Independent Disks,RAID)系统、磁带驱动器以及数据备份存储系统等。The computer device 312 may also communicate with one or more external devices 314 (e.g., a keyboard, pointing device, camera, display 324, etc.), and with one or more devices that enable a user to interact with the computer device 312, and/or Or communicate with any device (eg, network card, modem, etc.) that enables the computing device 312 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O, Input/Output) interface 322 . Moreover, the computer device 312 can also communicate with one or more networks (such as a local area network (Local Area Network, LAN), a wide area network, Wide Area Network, WAN) and/or a public network, such as the Internet, through the network adapter 320. As shown in FIG. 3 , network adapter 320 communicates with other modules of computer device 312 via bus 318 . It should be appreciated that although not shown in FIG. 3 , other hardware and/or software modules may be used in conjunction with computer device 312, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, disk arrays (Redundant Arrays of Independent Disks, RAID) systems, tape drives, and data backup storage systems.
处理器316通过运行存储在存储装置328中的程序,从而执行各种功能应用以及数据处理,例如实现本申请上述实施例所提供的分布式数据库的内嵌方法。The processor 316 executes various functional applications and data processing by running the programs stored in the storage device 328 , such as realizing the embedded method of the distributed database provided by the above-mentioned embodiments of the present application.
实施例四Embodiment four
本申请实施例提供了一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该程序被处理装置执行时实现如本申请实施例中的分布式数据库的内嵌方法。An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processing device, the method for embedding a distributed database as in the embodiment of the present application is implemented.
本申请上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、闪存、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(Radio Frequency,射频)等等,或者上述的任意合适的组合。The computer-readable medium mentioned above in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. A computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. Examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more conductors, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only Memory (EPROM, Erasable Programmable Read-Only Memory), flash memory, optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device . The program code contained on the computer readable medium can be transmitted by any appropriate medium, including but not limited to: electric wire, optical cable, RF (Radio Frequency, radio frequency), etc., or any suitable combination of the above.
存储介质可以是非暂态(non-transitory)存储介质。The storage medium may be a non-transitory storage medium.
在一些实施方式中,客户端、服务器可以利用诸如HTTP(Hyper Text Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通 信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。In some implementations, the client and the server can communicate using any currently known or future-developed network protocols such as HTTP (Hyper Text Transfer Protocol, Hypertext Transfer Protocol), and can communicate with any form or medium of digital Data communication (eg, communication network) interconnections. Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network of.
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备(也可记为计算机设备)执行时,使得该电子设备:获取分布式数据库安装包,并对所述分布式数据库安装包进行解压缩,获得分布式数据库的安装文件;其中,所述安装文件包括配置文件;根据预设配置信息修改所述配置文件;其中,所述配置信息包括端口信息;在所述端口信息对应的端口启动所述分布式数据库的进程,以根据启动后的分布式数据库进行程序测试。The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device (also referred to as a computer device), the electronic device: obtains the distributed database installation package, and executes the The distributed database installation package is decompressed to obtain the installation file of the distributed database; wherein the installation file includes a configuration file; modify the configuration file according to preset configuration information; wherein the configuration information includes port information; The port corresponding to the port information starts the process of the distributed database, so as to perform program testing according to the started distributed database.
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, or combinations thereof, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages - such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through an Internet service provider). Internet connection).
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本 身的限定。The units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Among them, the name of the unit does not constitute a limitation of the unit itself under certain circumstances.
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA,Field Programmable Gate Array)、专用集成电路(ASIC,Application Specific Integrated Circuit)、专用标准产品(ASSP,Application Specific Standard Product)、片上系统(SOC,System on Chip)、复杂可编程逻辑设备(CPLD,Complex Programmable Logic Device)等等。The functions described herein above may be performed at least in part by one or more hardware logic components. For example, without limitation, hardware logic components of exemplary types that can be used include: Field Programmable Gate Array (FPGA, Field Programmable Gate Array), Application Specific Integrated Circuit (ASIC, Application Specific Integrated Circuit), Application Specific Standard Product (ASSP, Application Specific Standard Product), System on Chip (SOC, System on Chip), Complex Programmable Logic Device (CPLD, Complex Programmable Logic Device) and so on.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM), or flash memory), optical fiber, compact disc read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
上述为本申请的一些实施例。本领域技术人员会理解,本申请不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种变化、重新调整和替代而不会脱离本申请的保护范围。因此,虽然通过以上实施例对本申请进行了说明,但是本申请不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本申请的范围由所附的权利要求范围决定。The foregoing are some embodiments of the present application. Those skilled in the art will understand that the present application is not limited to the specific embodiments described here, and various changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present application. Therefore, although the present application has been described through the above embodiments, the present application is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present application consists of The scope of the appended claims determines.

Claims (10)

  1. 一种分布式数据库的内嵌方法,包括:An embedded method of a distributed database, comprising:
    获取分布式数据库安装包,并对所述分布式数据库安装包进行解压缩,获得分布式数据库的安装文件;其中,所述安装文件包括配置文件;Obtain a distributed database installation package, and decompress the distributed database installation package to obtain the installation file of the distributed database; wherein, the installation file includes a configuration file;
    根据预设配置信息修改所述配置文件;其中,所述配置信息包括端口信息;modifying the configuration file according to preset configuration information; wherein the configuration information includes port information;
    在所述端口信息对应的端口启动所述分布式数据库的进程,以根据启动后的分布式数据库进行程序测试。Start the process of the distributed database on the port corresponding to the port information, so as to perform program testing according to the started distributed database.
  2. 根据权利要求1所述的方法,在所述端口信息对应的端口启动所述分布式数据库的进程之后,还包括:The method according to claim 1, after the port corresponding to the port information starts the process of the distributed database, further comprising:
    监控所述分布式数据库在启动过程中的日志信息;Monitor the log information of the distributed database during startup;
    根据所述日志信息判断所述分布式数据库是否启动成功;judging whether the distributed database is started successfully according to the log information;
    响应于所述分布式数据库启动成功,返回启动成功信息。In response to the successful start of the distributed database, return start success information.
  3. 根据权利要求1所述的方法,在获取分布式数据库安装包之后,还包括:According to the method according to claim 1, after obtaining the distributed database installation package, it also includes:
    获取临时存放路径;Obtain the temporary storage path;
    在获得分布式数据库的安装文件之后,还包括:After obtaining the installation file of the distributed database, it also includes:
    将所述安装文件存入所述临时存放路径。and storing the installation file in the temporary storage path.
  4. 根据权利要求1所述的方法,在所述端口信息对应的端口启动所述分布式数据库的进程之后,还包括:The method according to claim 1, after the port corresponding to the port information starts the process of the distributed database, further comprising:
    响应于接收到结束所述分布式数据库服务的指令,获取占用所述端口信息对应的端口的进程,将所述占用所述端口信息对应的端口的进程确定为目标进程;In response to receiving an instruction to end the distributed database service, acquire a process occupying a port corresponding to the port information, and determine the process occupying a port corresponding to the port information as a target process;
    结束所述目标进程。End the target process.
  5. 一种分布式数据库的内嵌装置,包括:An embedded device for a distributed database, comprising:
    分布式数据库安装包获取模块,设置为获取分布式数据库安装包,并对所述分布式数据库安装包进行解压缩,获得分布式数据库的安装文件;其中,所述安装文件包括配置文件;The distributed database installation package obtaining module is configured to obtain the distributed database installation package, and decompress the distributed database installation package to obtain the installation file of the distributed database; wherein the installation file includes a configuration file;
    配置文件修改模块,设置为根据预设配置信息修改所述配置文件;其中,所述配置信息包括端口信息;The configuration file modification module is configured to modify the configuration file according to preset configuration information; wherein the configuration information includes port information;
    进程启动模块,设置为在所述端口信息对应的端口启动所述分布式数据库的进程,以根据启动后的分布式数据库进行程序测试。The process starting module is configured to start the process of the distributed database at the port corresponding to the port information, so as to perform program testing according to the started distributed database.
  6. 根据权利要求5所述的装置,还包括:日志信息监控模块,设置为:The device according to claim 5, further comprising: a log information monitoring module, configured to:
    监控所述分布式数据库在启动过程中的日志信息;Monitor the log information of the distributed database during startup;
    根据所述日志信息判断所述分布式数据库是否启动成功;judging whether the distributed database is started successfully according to the log information;
    响应于所述分布式数据库启动成功,返回启动成功信息。In response to the successful start of the distributed database, return start success information.
  7. 根据权利要求5所述的装置,还包括:临时存放路径获取模块,设置为:The device according to claim 5, further comprising: a temporary storage path acquisition module, which is set to:
    获取临时存放路径;Obtain the temporary storage path;
    还包括:安装文件存放模块,设置为:It also includes: installing the file storage module, set to:
    将所述安装文件存入所述临时存放路径。and storing the installation file in the temporary storage path.
  8. 根据权利要求5所述的装置,还包括:进程结束模块,设置为:The device according to claim 5, further comprising: a process end module, configured to:
    响应于接收到结束所述分布式数据库服务的指令,获取占用所述端口信息对应的端口的进程,将所述占用所述端口信息对应的端口的进程确定为目标进程;In response to receiving an instruction to end the distributed database service, acquire a process occupying a port corresponding to the port information, and determine the process occupying a port corresponding to the port information as a target process;
    结束所述目标进程。End the target process.
  9. 一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1-4中任一所述的分布式数据库的内嵌方法。A computer device, comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, when the processor executes the computer program, the distribution as described in any one of claims 1-4 is realized Embedded methods for databases.
  10. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-4中任一所述的分布式数据库的内嵌方法。A computer-readable storage medium, a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the embedded method of the distributed database according to any one of claims 1-4 is realized .
PCT/CN2022/107573 2021-10-20 2022-07-25 Distributed database embedding method and apparatus, and device and storage medium WO2023065749A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111223218.XA CN113886264A (en) 2021-10-20 2021-10-20 Embedded method, device, equipment and storage medium of distributed database
CN202111223218.X 2021-10-20

Publications (1)

Publication Number Publication Date
WO2023065749A1 true WO2023065749A1 (en) 2023-04-27

Family

ID=79003899

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/107573 WO2023065749A1 (en) 2021-10-20 2022-07-25 Distributed database embedding method and apparatus, and device and storage medium

Country Status (2)

Country Link
CN (1) CN113886264A (en)
WO (1) WO2023065749A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093640A (en) * 2023-10-18 2023-11-21 上海柯林布瑞信息技术有限公司 Data extraction method and device based on pooling technology

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113886264A (en) * 2021-10-20 2022-01-04 北京锐安科技有限公司 Embedded method, device, equipment and storage medium of distributed database

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180336023A1 (en) * 2017-05-16 2018-11-22 Bank Of America Corporation Distributed storage framework information server platform architecture
CN110389900A (en) * 2019-07-10 2019-10-29 深圳市腾讯计算机系统有限公司 A kind of distributed experiment & measurement system test method, device and storage medium
CN111124890A (en) * 2019-11-30 2020-05-08 苏州浪潮智能科技有限公司 Distributed database performance test method, system, terminal and storage medium
CN111625434A (en) * 2020-05-08 2020-09-04 苏州浪潮智能科技有限公司 Database OLTP benchmark performance test method, system and related components
CN113886264A (en) * 2021-10-20 2022-01-04 北京锐安科技有限公司 Embedded method, device, equipment and storage medium of distributed database

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180336023A1 (en) * 2017-05-16 2018-11-22 Bank Of America Corporation Distributed storage framework information server platform architecture
CN110389900A (en) * 2019-07-10 2019-10-29 深圳市腾讯计算机系统有限公司 A kind of distributed experiment & measurement system test method, device and storage medium
CN111124890A (en) * 2019-11-30 2020-05-08 苏州浪潮智能科技有限公司 Distributed database performance test method, system, terminal and storage medium
CN111625434A (en) * 2020-05-08 2020-09-04 苏州浪潮智能科技有限公司 Database OLTP benchmark performance test method, system and related components
CN113886264A (en) * 2021-10-20 2022-01-04 北京锐安科技有限公司 Embedded method, device, equipment and storage medium of distributed database

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093640A (en) * 2023-10-18 2023-11-21 上海柯林布瑞信息技术有限公司 Data extraction method and device based on pooling technology
CN117093640B (en) * 2023-10-18 2024-01-23 上海柯林布瑞信息技术有限公司 Data extraction method and device based on pooling technology

Also Published As

Publication number Publication date
CN113886264A (en) 2022-01-04

Similar Documents

Publication Publication Date Title
KR102158557B1 (en) Method and device for determining response time
WO2023065749A1 (en) Distributed database embedding method and apparatus, and device and storage medium
CN109213611B (en) Cross-process communication method, device, terminal and storage medium
CN110008045B (en) Method, device and equipment for aggregating microservices and storage medium
WO2021013243A1 (en) Method for starting mini program, device, and computer storage medium
JP6710790B2 (en) Method and apparatus for operating a smart network interface card
CN108650287B (en) Upgrading method and device for terminal device in Internet of things and computer readable medium
US20050160150A1 (en) Apparatus and method for managing and transporting virtual disks over a network to networked stations
CN110580244A (en) file processing method and device, server and storage medium
WO2023061286A1 (en) Operating system booting method and apparatus, and electronic device
CN110851204B (en) Application starting method and device and application packaging method and device
CN108874441B (en) Board card configuration method, device, server and storage medium
CN112596720A (en) Service operation method and device, electronic equipment and computer storage medium
CN111459822B (en) Method, device, equipment and readable medium for extracting system component data
CN109697034B (en) Data writing method and device, electronic equipment and storage medium
CN110881224B (en) Network long connection method, device, equipment and storage medium
US9792168B2 (en) System and method for cloud remediation of a client with a non-bootable storage medium
CN111198853B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN109218338B (en) Information processing system, method and device
CN111355629B (en) Client test method and device, computer equipment and storage medium
CN114443480A (en) Test method, test system, readable medium and electronic device
CN113448730A (en) Service processing method and device, computer equipment and storage medium
CN109614137B (en) Software version control method, device, equipment and medium
CN108228829B (en) Method and apparatus for generating information
CN111309575A (en) Method, device, server and storage medium for starting and stopping test tool

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22882371

Country of ref document: EP

Kind code of ref document: A1