Movatterモバイル変換


[0]ホーム

URL:


CN116974988A - Capacity expansion method, computer and storage medium for uninterrupted service of distributed file system - Google Patents

Capacity expansion method, computer and storage medium for uninterrupted service of distributed file system
Download PDF

Info

Publication number
CN116974988A
CN116974988ACN202310954027.3ACN202310954027ACN116974988ACN 116974988 ACN116974988 ACN 116974988ACN 202310954027 ACN202310954027 ACN 202310954027ACN 116974988 ACN116974988 ACN 116974988A
Authority
CN
China
Prior art keywords
service
rbf
local
file system
object service
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
CN202310954027.3A
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.)
Inspur Jinan data Technology Co ltd
Original Assignee
Inspur Jinan data Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Jinan data Technology Co ltdfiledCriticalInspur Jinan data Technology Co ltd
Priority to CN202310954027.3ApriorityCriticalpatent/CN116974988A/en
Publication of CN116974988ApublicationCriticalpatent/CN116974988A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The invention provides a capacity expansion method, a computer and a storage medium for continuous service of a distributed file system, wherein the method comprises the following steps: defining RBF object service in an object class of a local server port in advance, and initially assigning the RBF object service as NULL; adding an object switching function in an object class of a local server port in advance, wherein the object switching function is used for controlling to enable a local object service or an RBF object service; in response to enabling the RBF object service, a preset RBF object service code is acquired from the local distributed file system by the object switching function and NULL is replaced, and an interface of the local object service is added as a sub-service of the RBF object service. The invention defines RBF service in the object class of the local service, so that the RBF service is used as a sub-service object in the local object class, and the object switching function is preset in the object class, thereby switching to the RBF service to achieve the aim of capacity expansion under the condition of not changing IP and port numbers.

Description

Translated fromChinese
分布式文件系统不停服务的扩容方法、计算机及存储介质Expansion method, computer and storage medium for non-stop service of distributed file system

技术领域Technical field

本发明涉及服务器应用技术领域,尤其涉及分布式文件系统不停服务的扩容方法、计算机及存储介质。The present invention relates to the field of server application technology, and in particular to a capacity expansion method, a computer and a storage medium for non-stop service of a distributed file system.

背景技术Background technique

在大数据业务运行过程中,若该系统底层有着不止一套的存储系统,那么在一个任务中,系统的客户端不可能实现对两个存储系统的同时访问,因为系统客户端的对应的服务器IP地址+端口号在该时间段内是不能改变的,具体如图1所示,任务读写数据均只能在服务端1上进行,若想在该任务执行过程中对服务端2的数据进行操作,则需要在任务开始之前将所需的数据从服务端2迁移到服务端1上,这种方式极其浪费资源。而HDFS系统中的RBF可解决该问题,图1右侧所示为RBF(Router-based Federation)基于路由的Federation方案,RBF模块将两个存储端的namespace(命名空间)给统一起来,对外提供服务,在客户端配置上RBF的ip+端口号之后,就可在一个任务中实现对两个服务端数据的访问与写入。但是若一个系统在最开始的时候HDFS(Hadoop Distributed File System)分布式文件系统客户端仅需对接的一个服务端,在后期因为数据量过大想对系统进行扩容时,需要切换到RBF场景下时,由于还需要在HDFS客户端(后续简称未HDFS系统)中增加RBF的IP+端口号,因此需要停止正在运行的业务,这往往在实际的业务场景下是不能被允许的。During the operation of big data business, if there is more than one storage system at the bottom of the system, then in one task, it is impossible for the client of the system to access two storage systems at the same time, because the corresponding server IP of the system client The address + port number cannot be changed during this time period. As shown in Figure 1, the task of reading and writing data can only be performed on server 1. If you want to perform data on server 2 during the execution of the task, operation, you need to migrate the required data from server 2 to server 1 before the task starts. This method is extremely wasteful of resources. The RBF in the HDFS system can solve this problem. The right side of Figure 1 shows the routing-based Federation solution of RBF (Router-based Federation). The RBF module unifies the namespaces of the two storage ends to provide external services. , after configuring the RBF ip + port number on the client, you can access and write data on the two servers in one task. However, if a system initially only needs one server to connect to the HDFS (Hadoop Distributed File System) distributed file system client, and later wants to expand the system due to excessive data volume, it needs to switch to the RBF scenario. At this time, since the IP + port number of RBF needs to be added to the HDFS client (hereinafter referred to as HDFS system), the running business needs to be stopped, which is often not allowed in actual business scenarios.

因此,如何能够在不中断服务情况下实现切换RBF以实现扩容的方案是本领域亟需解决的。Therefore, how to switch the RBF without interrupting the service to achieve capacity expansion is an urgent need in this field.

发明内容Contents of the invention

为了能够在不中断服务情况下实现切换RBF以实现扩容,在本发明的第一方面,提出了一种分布式文件系统不停服务的扩容方法,所述方法包括:预先在本地的服务器端口的对象类中定义RBF对象服务,并将所述RBF对象服务初始赋值为NULL;预先在本地的服务器端口的对象类中添加对象切换功能,所述对象切换功能用于控制启用本地对象服务或者启用所述RBF对象服务;响应于启用RBF对象服务,由所述对象切换功能从本地分布式文件系统中获取预设的RBF对象服务代码并替换所述NULL,并将本地对象服务的接口添加为所述RBF对象服务的子服务。In order to be able to switch RBF to achieve capacity expansion without interrupting service, in the first aspect of the present invention, a capacity expansion method of a distributed file system with non-stop service is proposed. The method includes: pre-configuring the local server port Define the RBF object service in the object class, and initially assign the RBF object service to NULL; add an object switching function to the object class of the local server port in advance, and the object switching function is used to control the activation of the local object service or enable all The RBF object service; in response to enabling the RBF object service, the object switching function obtains the preset RBF object service code from the local distributed file system and replaces the NULL, and adds the interface of the local object service as the Subservice of RBF object service.

在一个或多个实施例中,本发明的一种分布式文件系统不停服务的扩容方法还包括:根据所要拓展的服务器节点编写所述RBF对象服务代码;将所述RBF对象服务代码保存在所述分布式文件系统中。In one or more embodiments, the present invention's method for expanding the capacity of a distributed file system with non-stop service also includes: writing the RBF object service code according to the server node to be expanded; and saving the RBF object service code in in the distributed file system.

在一个或多个实施例中,所述RBF对象服务代码包括:路径节点控制代码,用于管理多个命名空间和存储空间的映射关系,其中,所述存储空间包括一个或多个拓展服务器的存储空间;远程对象服务接口,用于基于所述映射关系访问所述一个或多个拓展服务器并以预设的调用方法处理数据。In one or more embodiments, the RBF object service code includes: path node control code, used to manage the mapping relationship between multiple namespaces and storage spaces, wherein the storage space includes one or more expansion servers. Storage space; remote object service interface, used to access the one or more expansion servers based on the mapping relationship and process data with a preset calling method.

在一个或多个实施例中,响应于启用RBF对象服务将本地对象服务的接口添加到所述RBF对象服务中,还包括:创建对应本地服务器的命名空间并保存与本地存储空间的映射关系;将所述命名空间及所述映射关系添加到所述路径节点控制代码中。In one or more embodiments, in response to enabling the RBF object service, adding the interface of the local object service to the RBF object service also includes: creating a namespace corresponding to the local server and saving the mapping relationship with the local storage space; Add the namespace and the mapping relationship to the path node control code.

在一个或多个实施例中,所述方法还包括在启用RBF对象服务后,通过以下步骤转发客户端请求:客户端请求发送至本地服务器端口并调取相应的对象类;将所述客户端请求发送给所述对象类下的RBF对象服务;根据所述客户端请求中的对象服务信息确定相应的对象服务接口;根据所述客户端请求中的命名空间基于所述映射关系确定相应的存储空间。In one or more embodiments, the method further includes, after enabling the RBF object service, forwarding the client request through the following steps: sending the client request to the local server port and calling the corresponding object class; The request is sent to the RBF object service under the object class; the corresponding object service interface is determined according to the object service information in the client request; the corresponding storage is determined based on the namespace in the client request and the mapping relationship space.

在一个或多个实施例中,本发明的一种分布式文件系统不停服务的扩容方法还包括:根据所述对象服务接口调取相应的方法调用对所述存储空间中的数据进行处理,并按原路径返回处理结果。In one or more embodiments, the present invention's method for expanding the capacity of a distributed file system with non-stop service also includes: invoking corresponding method calls according to the object service interface to process the data in the storage space, And return the processing results according to the original path.

在一个或多个实施例中,调取相应的方法调用对所述存储空间中的数据进行处理,包括:对所述存储空间中的数据进行增、删、改或查。In one or more embodiments, calling corresponding method calls to process the data in the storage space includes: adding, deleting, modifying, or querying the data in the storage space.

在一个或多个实施例中,本发明的一种分布式文件系统不停服务的扩容方法还包括:响应于启用本地对象服务,由所述对象切换功能将所述RBF对象服务重新赋值为NULL。In one or more embodiments, a method for expanding the capacity of a distributed file system with non-stop service of the present invention also includes: in response to enabling a local object service, reassigning the RBF object service to NULL by the object switching function .

在本发明的第二方面,提出了一种计算机设备,包括:至少一个处理器;以及存储器,所述存储器中存储有可执行的计算机程序,所述计算机程序被所述至少一个处理器执行时,用于实现以下步骤,包括:预先在本地的服务器端口的对象类中定义RBF对象服务,并将所述RBF对象服务初始赋值为NULL;预先在本地的服务器端口的对象类中添加对象切换功能,所述对象切换功能用于控制启用本地对象服务或者启用所述RBF对象服务;响应于启用RBF对象服务,由所述对象切换功能从本地分布式文件系统中获取预设的RBF对象服务代码并替换所述NULL,并将本地对象服务的接口添加为所述RBF对象服务的子服务。In a second aspect of the present invention, a computer device is proposed, including: at least one processor; and a memory, in which an executable computer program is stored. When the computer program is executed by the at least one processor, , used to implement the following steps, including: defining the RBF object service in the object class of the local server port in advance, and initially assigning the RBF object service to NULL; adding the object switching function in the object class of the local server port in advance , the object switching function is used to control enabling the local object service or enabling the RBF object service; in response to enabling the RBF object service, the object switching function obtains the preset RBF object service code from the local distributed file system and Replace the NULL and add the interface of the local object service as a subservice of the RBF object service.

在一个或多个实施例中,本发明的一种分布式文件系统不停服务的扩容方法还包括:根据所要拓展的服务器节点编写所述RBF对象服务代码;将所述RBF对象服务代码保存在所述分布式文件系统中。In one or more embodiments, the present invention's method for expanding the capacity of a distributed file system with non-stop service also includes: writing the RBF object service code according to the server node to be expanded; and saving the RBF object service code in in the distributed file system.

在一个或多个实施例中,所述RBF对象服务代码包括:路径节点控制代码,用于管理多个命名空间和存储空间的映射关系,其中,所述存储空间包括一个或多个拓展服务器的存储空间;远程对象服务接口,用于基于所述映射关系访问所述一个或多个拓展服务器并以预设的调用方法处理数据。In one or more embodiments, the RBF object service code includes: path node control code, used to manage the mapping relationship between multiple namespaces and storage spaces, wherein the storage space includes one or more expansion servers. Storage space; remote object service interface, used to access the one or more expansion servers based on the mapping relationship and process data with a preset calling method.

在一个或多个实施例中,响应于启用RBF对象服务将本地对象服务的接口添加到所述RBF对象服务中,还包括:创建对应本地服务器的命名空间并保存与本地存储空间的映射关系;将所述命名空间及所述映射关系添加到所述路径节点控制代码中。In one or more embodiments, in response to enabling the RBF object service, adding the interface of the local object service to the RBF object service also includes: creating a namespace corresponding to the local server and saving the mapping relationship with the local storage space; Add the namespace and the mapping relationship to the path node control code.

在一个或多个实施例中,所述方法还包括在启用RBF对象服务后,通过以下步骤转发客户端请求:客户端请求发送至本地服务器端口并调取相应的对象类;将所述客户端请求发送给所述对象类下的RBF对象服务;根据所述客户端请求中的对象服务信息确定相应的对象服务接口;根据所述客户端请求中的命名空间基于所述映射关系确定相应的存储空间。In one or more embodiments, the method further includes, after enabling the RBF object service, forwarding the client request through the following steps: sending the client request to the local server port and calling the corresponding object class; The request is sent to the RBF object service under the object class; the corresponding object service interface is determined according to the object service information in the client request; the corresponding storage is determined based on the namespace in the client request and the mapping relationship space.

在一个或多个实施例中,本发明的一种分布式文件系统不停服务的扩容方法还包括:根据所述对象服务接口调取相应的方法调用对所述存储空间中的数据进行处理,并按原路径返回处理结果。In one or more embodiments, the present invention's method for expanding the capacity of a distributed file system with non-stop service also includes: invoking corresponding method calls according to the object service interface to process the data in the storage space, And return the processing results according to the original path.

在一个或多个实施例中,调取相应的方法调用对所述存储空间中的数据进行处理,包括:对所述存储空间中的数据进行增、删、改或查。In one or more embodiments, calling corresponding method calls to process the data in the storage space includes: adding, deleting, modifying, or querying the data in the storage space.

在一个或多个实施例中,本发明的一种分布式文件系统不停服务的扩容方法还包括:响应于启用本地对象服务,由所述对象切换功能将所述RBF对象服务重新赋值为NULL。In one or more embodiments, a method for expanding the capacity of a distributed file system with non-stop service of the present invention also includes: in response to enabling a local object service, reassigning the RBF object service to NULL by the object switching function .

在本发明的第三方面,提出一种可读存储介质,包括:可执行的计算机程序,所述计算机程序被执行器执行时,用于实现以下步骤,包括:预先在本地的服务器端口的对象类中定义RBF对象服务,并将所述RBF对象服务初始赋值为NULL;预先在本地的服务器端口的对象类中添加对象切换功能,所述对象切换功能用于控制启用本地对象服务或者启用所述RBF对象服务;响应于启用RBF对象服务,由所述对象切换功能从本地分布式文件系统中获取预设的RBF对象服务代码并替换所述NULL,并将本地对象服务的接口添加为所述RBF对象服务的子服务。In a third aspect of the present invention, a readable storage medium is proposed, including: an executable computer program. When the computer program is executed by an executor, it is used to implement the following steps, including: pre-installing an object on a local server port. Define the RBF object service in the class, and assign the initial value of the RBF object service to NULL; add an object switching function to the object class of the local server port in advance, and the object switching function is used to control the activation of the local object service or enable the RBF object service; in response to enabling the RBF object service, the object switching function obtains the preset RBF object service code from the local distributed file system and replaces the NULL, and adds the interface of the local object service as the RBF A subservice of the object service.

在一个或多个实施例中,本发明的一种分布式文件系统不停服务的扩容方法还包括:根据所要拓展的服务器节点编写所述RBF对象服务代码;将所述RBF对象服务代码保存在所述分布式文件系统中。In one or more embodiments, the present invention's method for expanding the capacity of a distributed file system with non-stop service also includes: writing the RBF object service code according to the server node to be expanded; and saving the RBF object service code in in the distributed file system.

在一个或多个实施例中,所述RBF对象服务代码包括:路径节点控制代码,用于管理多个命名空间和存储空间的映射关系,其中,所述存储空间包括一个或多个拓展服务器的存储空间;远程对象服务接口,用于基于所述映射关系访问所述一个或多个拓展服务器并以预设的调用方法处理数据。In one or more embodiments, the RBF object service code includes: path node control code, used to manage the mapping relationship between multiple namespaces and storage spaces, wherein the storage space includes one or more expansion servers. Storage space; remote object service interface, used to access the one or more expansion servers based on the mapping relationship and process data with a preset calling method.

在一个或多个实施例中,响应于启用RBF对象服务将本地对象服务的接口添加到所述RBF对象服务中,还包括:创建对应本地服务器的命名空间并保存与本地存储空间的映射关系;将所述命名空间及所述映射关系添加到所述路径节点控制代码中。In one or more embodiments, in response to enabling the RBF object service, adding the interface of the local object service to the RBF object service also includes: creating a namespace corresponding to the local server and saving the mapping relationship with the local storage space; Add the namespace and the mapping relationship to the path node control code.

在一个或多个实施例中,所述方法还包括在启用RBF对象服务后,通过以下步骤转发客户端请求:客户端请求发送至本地服务器端口并调取相应的对象类;将所述客户端请求发送给所述对象类下的RBF对象服务;根据所述客户端请求中的对象服务信息确定相应的对象服务接口;根据所述客户端请求中的命名空间基于所述映射关系确定相应的存储空间。In one or more embodiments, the method further includes, after enabling the RBF object service, forwarding the client request through the following steps: sending the client request to the local server port and calling the corresponding object class; The request is sent to the RBF object service under the object class; the corresponding object service interface is determined according to the object service information in the client request; the corresponding storage is determined based on the namespace in the client request and the mapping relationship space.

在一个或多个实施例中,本发明的一种分布式文件系统不停服务的扩容方法还包括:根据所述对象服务接口调取相应的方法调用对所述存储空间中的数据进行处理,并按原路径返回处理结果。In one or more embodiments, the present invention's method for expanding the capacity of a distributed file system with non-stop service also includes: invoking corresponding method calls according to the object service interface to process the data in the storage space, And return the processing results according to the original path.

在一个或多个实施例中,调取相应的方法调用对所述存储空间中的数据进行处理,包括:对所述存储空间中的数据进行增、删、改或查。In one or more embodiments, calling corresponding method calls to process the data in the storage space includes: adding, deleting, modifying, or querying the data in the storage space.

在一个或多个实施例中,本发明的一种分布式文件系统不停服务的扩容方法还包括:响应于启用本地对象服务,由所述对象切换功能将所述RBF对象服务重新赋值为NULL。In one or more embodiments, a method for expanding the capacity of a distributed file system with non-stop service of the present invention also includes: in response to enabling a local object service, reassigning the RBF object service to NULL by the object switching function .

本发明的有益效果包括:通过在本地服务的对象类中定义空的RBF服务(在需要使用RBF服务时加载程序),使得RBF服务作为本地对象类中的子服务对象,并在该对象类中预设对象切换功能,从而能够在不改变IP和端口号的情况下,切换到RBF服务,并获取由RBF服务管理的服务端中的数据以达到扩容的目的。The beneficial effects of the present invention include: by defining an empty RBF service in the object class of the local service (loading the program when the RBF service needs to be used), the RBF service serves as a sub-service object in the local object class, and in the object class The preset object switching function allows you to switch to the RBF service without changing the IP and port number, and obtain the data in the server managed by the RBF service to achieve capacity expansion.

附图说明Description of the drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的实施例。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other embodiments can be obtained based on these drawings without exerting creative efforts.

图1为客户端任务运行在HDFS系统和RFB系统的结构对比图;Figure 1 is a structural comparison diagram of client tasks running in the HDFS system and the RFB system;

图2为本发明实施例的一种分布式文件系统不停服务的扩容方法的工作流程图;Figure 2 is a work flow chart of a method for expanding the capacity of a distributed file system with non-stop service according to an embodiment of the present invention;

图3为本发明实施例的在分布式文件系统分别实现本地调用和远程调用流程的对比图;Figure 3 is a comparison diagram of the local calling and remote calling processes in the distributed file system according to the embodiment of the present invention;

图4为基于本发明实施例的一种分布式文件系统不停服务的扩容方法的请求调用过程的节点流程图;Figure 4 is a node flow chart of the request calling process of a distributed file system non-stop service expansion method based on an embodiment of the present invention;

图5为本发明实施例的一种计算机设备的结构示意图;Figure 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention;

图6为本发明实施例的一种可读存储介质的示意图。Figure 6 is a schematic diagram of a readable storage medium according to an embodiment of the present invention.

具体实施方式Detailed ways

为使本发明的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本发明实施例进一步详细说明。In order to make the purpose, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to specific embodiments and the accompanying drawings.

需要说明的是,本发明实施例中所有使用“第一”和“第二”的表述均是为了区分两个相同名称非相同的实体或者非相同的参量,可见“第一”“第二”仅为了表述的方便,不应理解为对本发明实施例的限定,后续实施例对此不再一一说明。It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are to distinguish two entities or parameters with the same name but not the same, so it can be seen that "first" and "second" It is only for the convenience of description and should not be understood as a limitation on the embodiments of the present invention, and subsequent embodiments will not describe this one by one.

为了实现不中断服务的切换RBF功能,本发明提出了一种分布式文件系统不停服务的扩容方法,通过在本地服务的对象类中定义空的RBF服务(在需要使用RBF服务时加载程序),使得RBF服务作为本地对象类中的子服务对象,并在该对象类中预设对象切换功能,从而能够在不改变IP和端口号的情况下,切换到RBF服务,并获取由RBF服务管理的服务端中的数据以达到扩容的目的。以下将结合附图对本发明的具体实施方式进行详细阐述:In order to realize the switching RBF function without interrupting the service, the present invention proposes a method for expanding the capacity of the distributed file system without stopping the service by defining an empty RBF service in the object class of the local service (loading the program when the RBF service needs to be used) , so that the RBF service serves as a sub-service object in the local object class, and the object switching function is preset in the object class, so that it can switch to the RBF service without changing the IP and port number, and obtain management by the RBF service data in the server to achieve capacity expansion. The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings:

请参见图2,其示出了本发明实施例的一种分布式文件系统不停服务的扩容方法的工作流程,包括:步骤S1、预先在本地的服务器端口的对象类中定义RBF对象服务,并将RBF对象服务初始赋值为NULL;步骤S2、预先在本地的服务器端口的对象类中添加对象切换功能,对象切换功能用于控制启用本地对象服务或者启用RBF对象服务;步骤S3、响应于启用RBF对象服务,由对象切换功能从本地分布式文件系统中获取预设的RBF对象服务代码并替换NULL,并将本地对象服务的接口添加为RBF对象服务的子服务。Please refer to Figure 2, which shows the work flow of a method for expanding the capacity of a distributed file system with non-stop service according to an embodiment of the present invention, including: step S1, defining an RBF object service in the object class of the local server port in advance, And the initial value of the RBF object service is assigned to NULL; Step S2, add the object switching function to the object class of the local server port in advance, the object switching function is used to control the activation of the local object service or the activation of the RBF object service; Step S3, in response to the activation For RBF object service, the object switching function obtains the preset RBF object service code from the local distributed file system and replaces NULL, and adds the interface of the local object service as a sub-service of the RBF object service.

具体的,本发明的基本思路为:对开源的hdfs模块代码进行修改,将RBF的基本功能引入HDFS模块中,使得在hdfs服务正常运行的过程中,对配置项进行修改,通过命令行刷新的方式,启动对象切换功能,实现对各namespace(命名空间)的统一管理。如图3左侧示出的为hdfs模块中一次请求调用的过程,客户端的请求会发送到地址为IP端口号为port的服务端上,在ClientNamenodeProtocolServerSideTranslatorPB该对象类中,调用NameNodeRpcServer服务对象的具体方法操作,这些方法操作包括创建目录或文件夹等。当该方法操作的调用是在本地进行的,最后将调用的结果进行返回,即完成了一次完整的客户端请求。图3右侧为客户端请求到RB F服务的过程,由于HDFS和RBF两者来自同一父类,因此两者有着相同的函数接口,对RBF服务的调用过程的具体描述为客户端的请求会发送到地址为IP1端口号为port1的RBF服务上,并在ClientNamenodeProtocolServerSideTranslatorPB这一对象类中调用RouterRpcServer对象服务的具体操作方法,RouterRpcServer会根据配置的策略将请求发送到RBF服务纳管的集群中,该过程属于远程调用。如图3所示,左右两图中IP可相同,但端口号不能相同,表示在一台服务器中,启动了两个服务,端口号分别是9000本地调用和8888远程调用,其中,远程调用可理解为不同端口号服务之间的相互调用,本地调用则是在同一个服务之间的方法调用。然而,远程调用相比本地调用会消耗较多的计算机资源。因此,本发明所要实现的是在本地服务能够满足请求时,采用本地服务,在本地服务不能满足请求时,则由RFB服务提供远程服务调用,为了实现上述目的,本发明在图2示出的方案中将RBF服务与本地服务存放在同一个对象类下,使得二者均能针对一个对象类的请求调用到,并由切换功能决定启动本地服务还是RBF服务。Specifically, the basic idea of the present invention is to modify the open source HDFS module code and introduce the basic functions of RBF into the HDFS module, so that during the normal operation of the HDFS service, the configuration items can be modified and refreshed through the command line. method to enable the object switching function to achieve unified management of each namespace. As shown on the left side of Figure 3, it is a request call process in the hdfs module. The client's request will be sent to the server with the IP port number port. In the ClientNamenodeProtocolServerSideTranslatorPB object class, the specific method of calling the NameNodeRpcServer service object is Operations, these method operations include creating directories or folders, etc. When the method operation is called locally, the result of the call is finally returned, that is, a complete client request is completed. The right side of Figure 3 shows the process of the client requesting the RB F service. Since HDFS and RBF come from the same parent class, they have the same function interface. The specific description of the calling process of the RBF service is that the client's request will be sent Go to the RBF service with address IP1 and port number port1, and call the specific operation method of RouterRpcServer object service in the ClientNamenodeProtocolServerSideTranslatorPB object class. RouterRpcServer will send the request to the cluster managed by the RBF service according to the configured policy. This process It is a remote call. As shown in Figure 3, the IPs in the left and right pictures can be the same, but the port numbers cannot be the same, which means that in one server, two services are started. The port numbers are 9000 local call and 8888 remote call. Among them, the remote call can It is understood as mutual calls between services with different port numbers, and local calls are method calls between the same service. However, remote calls consume more computer resources than local calls. Therefore, what the present invention wants to achieve is to use the local service when the local service can satisfy the request. When the local service cannot satisfy the request, the RFB service provides remote service invocation. In order to achieve the above purpose, the present invention is shown in Figure 2 In the solution, the RBF service and the local service are stored under the same object class, so that both can be called for requests of an object class, and the switching function determines whether to start the local service or the RBF service.

在进一步的实施例中,本发明的一种分布式文件系统不停服务的扩容方法还包括:根据所要拓展的服务器节点编写RBF对象服务代码;将RBF对象服务代码保存在分布式文件系统中。In a further embodiment, the present invention's method for expanding the capacity of a distributed file system with non-stop service also includes: writing RBF object service code according to the server node to be expanded; and saving the RBF object service code in the distributed file system.

具体的,在设计之初本发明仅在相应的对象类中预设了RBF服务的空壳,并赋值为NULL。在用户决定需要拓展的服务器后需要根据所要拓展的服务器节点编写RBF对象服务代码以实现对远程对象服务的纳管;并将RBF对象服务代码保存在分布式文件系统中;如此,当需要切换为RBF远程调用时,只需从分布式文件系统中将对应的RBF对象服务代码加到对象类的RBF服务的空壳中,并替换NULL即可实现切换,且不需中断服务。Specifically, at the beginning of the design, the present invention only presets an empty shell of the RBF service in the corresponding object class, and assigns the value to NULL. After the user determines the server that needs to be expanded, the RBF object service code needs to be written according to the server node to be expanded to realize the management of the remote object service; and the RBF object service code is saved in the distributed file system; in this way, when it is necessary to switch to When calling RBF remotely, you only need to add the corresponding RBF object service code from the distributed file system to the empty shell of the RBF service of the object class, and replace NULL to achieve switching without interrupting the service.

在进一步的实施例中,本发明的RBF对象服务代码包括:路径节点控制代码,用于管理多个命名空间和存储空间的映射关系,其中,存储空间包括一个或多个拓展服务器的存储空间;远程对象服务接口,用于基于映射关系访问一个或多个拓展服务器并以预设的调用方法处理数据。In a further embodiment, the RBF object service code of the present invention includes: path node control code, used to manage the mapping relationship between multiple namespaces and storage spaces, where the storage space includes the storage space of one or more expansion servers; The remote object service interface is used to access one or more expansion servers based on mapping relationships and process data with preset calling methods.

在进一步的实施例中,本发明步骤S3中的响应于启用RBF对象服务将本地对象服务的接口添加到RBF对象服务中步骤,还包括:创建对应本地服务器的命名空间并保存与本地存储空间的映射关系;将命名空间及映射关系添加到路径节点控制代码中。In a further embodiment, the step of adding the interface of the local object service to the RBF object service in response to enabling the RBF object service in step S3 of the present invention also includes: creating a namespace corresponding to the local server and saving the namespace with the local storage space. Mapping relationship; add the namespace and mapping relationship to the path node control code.

在进一步的实施例中,本发明的方法还包括在启用RBF对象服务后,通过以下步骤转发客户端请求:客户端请求发送至本地服务器端口并调取相应的对象类;将客户端请求发送给对象类下的RBF对象服务;根据客户端请求中的对象服务信息确定相应的对象服务接口;根据客户端请求中的命名空间基于映射关系确定相应的存储空间。In a further embodiment, the method of the present invention also includes forwarding the client request through the following steps after enabling the RBF object service: sending the client request to the local server port and calling the corresponding object class; sending the client request to RBF object service under the object class; determine the corresponding object service interface according to the object service information in the client request; determine the corresponding storage space based on the mapping relationship according to the namespace in the client request.

在进一步的实施例中,本发明的方法还包括:根据对象服务接口调取相应的方法调用对存储空间中的数据进行处理,并按原路径返回处理结果。In a further embodiment, the method of the present invention also includes: calling corresponding method calls according to the object service interface to process the data in the storage space, and returning the processing results according to the original path.

在进一步的实施例中,调取相应的方法调用对存储空间中的数据进行处理,包括:对存储空间中的数据进行增、删、改或查。In a further embodiment, corresponding method calls are called to process the data in the storage space, including: adding, deleting, modifying or querying the data in the storage space.

在进一步的实施例中,本发明的方法还包括:响应于启用本地对象服务,由对象切换功能将RBF对象服务重新赋值为NULL。具体的,本实施例中将RBF对象服务重新赋值为NULL是为了下一次加载RBF服务代码做准备,使得每次启动的RBF服务时均是基于用户最新修改的RBF服务代码以便访问到用户最新拓展的服务节点。In a further embodiment, the method of the present invention further includes: in response to enabling the local object service, reassigning the RBF object service to NULL by the object switching function. Specifically, in this embodiment, the RBF object service is reassigned to NULL in order to prepare for the next loading of the RBF service code, so that each time the RBF service is started, it is based on the user's latest modified RBF service code to access the user's latest expansion. service node.

本发明完整的实现过程请参见图4。如图4所示:本发明的具体包含以下几个步骤,用以保证在不停止服务的前提下,实现对其他namespace的纳管,使其对外(客户端)提供一个统一的namespace(即RBF服务提供的namespace)。具体步骤包括:Please refer to Figure 4 for the complete implementation process of the present invention. As shown in Figure 4: the present invention specifically includes the following steps to ensure that other namespaces can be managed without stopping the service so that they can provide a unified namespace (i.e. RBF) to the outside world (clients). namespace provided by the service). Specific steps include:

(1)在RBF相关的对象在ClientNamenodeProtocolServerSideTranslato rPB中进行定义,并全部赋值为null,纳管开关初始状态为关闭。此时客户端的请求的处理方式与原有HDFS逻辑保持一致,如图4左侧所示。(1) RBF-related objects are defined in ClientNamenodeProtocolServerSideTranslato rPB, and all are assigned null values. The initial state of the management switch is closed. At this time, the client's request processing method is consistent with the original HDFS logic, as shown on the left side of Figure 4.

(2)增加命令行方式控制对象切换功能的开启和关闭,更新切换功能的状态,并对RBF相关对象进行初始化操作,并将NameNodeRpcServer对象服务传递进入RouterRpcServer中,在停用切换功能时,将RBF相关对象服务重新赋值为null,并刷新切换状态为停用。(2) Add the command line method to control the opening and closing of the object switching function, update the status of the switching function, initialize the RBF related objects, and pass the NameNodeRpcServer object service into the RouterRpcServer. When the switching function is deactivated, the RBF The related object service is reassigned to null, and the switching status is refreshed to disabled.

(3)启用切换功能后,当客户端将请求发送至原有的HDFS服务上,请求处理的流程图4所示,在ClientNamenodeProtocolServerSideTranslatorP B中将请求转发至RouterRpcServer上,其中,RouterRpcServer下纳管了N个集群,在RouterRpcServer服务中需要对N个被纳管的服务位置进行判断,若这N个集群包含当前节点的HDFS服务,则使用本地的NameNodeRpcS erver对象进行本地调用获取结果,使用其余N-1个集群则通过远程调用获取结果。(3) After the switching function is enabled, when the client sends the request to the original HDFS service, the request processing flow chart is shown in Figure 4. The request is forwarded to RouterRpcServer in ClientNamenodeProtocolServerSideTranslatorP B. Among them, RouterRpcServer manages N Clusters, in the RouterRpcServer service, it is necessary to determine the location of N managed services. If these N clusters contain the HDFS service of the current node, use the local NameNodeRpcServer object to make a local call to obtain the result, and use the remaining N-1 A cluster obtains the results through remote calls.

通过上述方式,能够在不切换IP和端口号的情况下实现本地调用或远程调用的切换,从而无需中断服务。并且,本本发明的RBF服务同时纳管了本地对象服务调用和远程服务对象调用,在请求仅需本地调用时,能够大大降低系统所需资源,并提供请求响应速度。Through the above method, switching between local calls or remote calls can be achieved without switching IP and port numbers, thereby eliminating the need to interrupt services. Moreover, the RBF service of the present invention manages both local object service calls and remote service object calls. When the request only requires local calls, it can greatly reduce the resources required by the system and improve the request response speed.

在本发明的第二方面,提出了一种计算机设备,请参见图5,包括:In a second aspect of the present invention, a computer device is proposed, see Figure 5, including:

至少一个处理器100;以及存储器200,该存储器200中存储有可执行的计算机程序,高计算机程序被至少一个处理器100执行时,用于实现如上述任一实施中的分布式文件系统不停服务的扩容方法的步骤,步骤包括:At least one processor 100; and a memory 200, which stores an executable computer program. When the computer program is executed by at least one processor 100, it is used to implement the distributed file system in any of the above implementations. The steps of the service expansion method include:

步骤S1、预先在本地的服务器端口的对象类中定义RBF对象服务,并将RBF对象服务初始赋值为NULL;步骤S2、预先在本地的服务器端口的对象类中添加对象切换功能,对象切换功能用于控制启用本地对象服务或者启用RBF对象服务;步骤S3、响应于启用RBF对象服务,由对象切换功能从本地分布式文件系统中获取预设的RBF对象服务代码并替换NULL,并将本地对象服务的接口添加为RBF对象服务的子服务。Step S1: Define the RBF object service in the object class of the local server port in advance, and initially assign the RBF object service to NULL; Step S2: Add the object switching function to the object class of the local server port in advance. The object switching function uses To control enabling the local object service or enabling the RBF object service; step S3, in response to enabling the RBF object service, the object switching function obtains the default RBF object service code from the local distributed file system and replaces NULL, and replaces the local object service with The interface adds a subservice that serves the RBF object.

在进一步的实施例中,本发明的一种分布式文件系统不停服务的扩容方法还包括:根据所要拓展的服务器节点编写RBF对象服务代码;将RBF对象服务代码保存在分布式文件系统中。In a further embodiment, the present invention's method for expanding the capacity of a distributed file system with non-stop service also includes: writing RBF object service code according to the server node to be expanded; and saving the RBF object service code in the distributed file system.

具体的,在设计之初本发明仅在相应的对象类中预设了RBF服务的空壳,并赋值为NULL。在用户决定需要拓展的服务器后需要根据所要拓展的服务器节点编写RBF对象服务代码以实现对远程对象服务的纳管;并将RBF对象服务代码保存在分布式文件系统中;如此,当需要切换为RBF远程调用时,只需从分布式文件系统中将对应的RBF对象服务代码加到对象类的RBF服务的空壳中,并替换NULL即可实现切换,且不需中断服务。Specifically, at the beginning of the design, the present invention only presets an empty shell of the RBF service in the corresponding object class, and assigns the value to NULL. After the user determines the server that needs to be expanded, the RBF object service code needs to be written according to the server node to be expanded to realize the management of the remote object service; and the RBF object service code is saved in the distributed file system; in this way, when it is necessary to switch to When calling RBF remotely, you only need to add the corresponding RBF object service code from the distributed file system to the empty shell of the RBF service of the object class, and replace NULL to achieve switching without interrupting the service.

在进一步的实施例中,本发明的RBF对象服务代码包括:路径节点控制代码,用于管理多个命名空间和存储空间的映射关系,其中,存储空间包括一个或多个拓展服务器的存储空间;远程对象服务接口,用于基于映射关系访问一个或多个拓展服务器并以预设的调用方法处理数据。In a further embodiment, the RBF object service code of the present invention includes: path node control code, used to manage the mapping relationship between multiple namespaces and storage spaces, where the storage space includes the storage space of one or more expansion servers; The remote object service interface is used to access one or more expansion servers based on mapping relationships and process data with preset calling methods.

在进一步的实施例中,本发明步骤S3中的响应于启用RBF对象服务将本地对象服务的接口添加到RBF对象服务中步骤,还包括:创建对应本地服务器的命名空间并保存与本地存储空间的映射关系;将命名空间及映射关系添加到路径节点控制代码中。In a further embodiment, the step of adding the interface of the local object service to the RBF object service in response to enabling the RBF object service in step S3 of the present invention also includes: creating a namespace corresponding to the local server and saving the namespace with the local storage space. Mapping relationship; add the namespace and mapping relationship to the path node control code.

在进一步的实施例中,本发明的方法还包括在启用RBF对象服务后,通过以下步骤转发客户端请求:客户端请求发送至本地服务器端口并调取相应的对象类;将客户端请求发送给对象类下的RBF对象服务;根据客户端请求中的对象服务信息确定相应的对象服务接口;根据客户端请求中的命名空间基于映射关系确定相应的存储空间。In a further embodiment, the method of the present invention also includes forwarding the client request through the following steps after enabling the RBF object service: sending the client request to the local server port and calling the corresponding object class; sending the client request to RBF object service under the object class; determine the corresponding object service interface according to the object service information in the client request; determine the corresponding storage space based on the mapping relationship according to the namespace in the client request.

在进一步的实施例中,本发明的方法还包括:根据对象服务接口调取相应的方法调用对存储空间中的数据进行处理,并按原路径返回处理结果。In a further embodiment, the method of the present invention also includes: calling corresponding method calls according to the object service interface to process the data in the storage space, and returning the processing results according to the original path.

在进一步的实施例中,调取相应的方法调用对存储空间中的数据进行处理,包括:对存储空间中的数据进行增、删、改或查。In a further embodiment, corresponding method calls are called to process the data in the storage space, including: adding, deleting, modifying or querying the data in the storage space.

在进一步的实施例中,本发明的方法还包括:响应于启用本地对象服务,由对象切换功能将RBF对象服务重新赋值为NULL。具体的,本实施例中将RBF对象服务重新赋值为NULL是为了下一次加载RBF服务代码做准备,使得每次启动的RBF服务时均是基于用户最新修改的RBF服务代码以便访问到用户最新拓展的服务节点。In a further embodiment, the method of the present invention further includes: in response to enabling the local object service, reassigning the RBF object service to NULL by the object switching function. Specifically, in this embodiment, the RBF object service is reassigned to NULL in order to prepare for the next loading of the RBF service code, so that each time the RBF service is started, it is based on the user's latest modified RBF service code to access the user's latest expansion. service node.

在本发明的第三方面,提出了一种可读存储介质300,请参见图6,包括:可执行的计算机程序301,该计算机程序301被执行器执行时,用于实现如上述任一实施中的分布式文件系统不停服务的扩容方法的步骤,步骤包括:步骤S1、预先在本地的服务器端口的对象类中定义RBF对象服务,并将RBF对象服务初始赋值为NULL;步骤S2、预先在本地的服务器端口的对象类中添加对象切换功能,对象切换功能用于控制启用本地对象服务或者启用RBF对象服务;步骤S3、响应于启用RBF对象服务,由对象切换功能从本地分布式文件系统中获取预设的RBF对象服务代码并替换NULL,并将本地对象服务的接口添加为RBF对象服务的子服务。In the third aspect of the present invention, a readable storage medium 300 is proposed, see FIG. 6 , including: an executable computer program 301. When the computer program 301 is executed by an executor, it is used to implement any of the above implementations. The steps of the expansion method for non-stop service of the distributed file system in Add an object switching function to the object class of the local server port. The object switching function is used to control enabling the local object service or enabling the RBF object service; Step S3. In response to enabling the RBF object service, the object switching function switches from the local distributed file system to Get the preset RBF object service code and replace NULL, and add the interface of the local object service as a sub-service of the RBF object service.

在进一步的实施例中,本发明的一种分布式文件系统不停服务的扩容方法还包括:根据所要拓展的服务器节点编写RBF对象服务代码;将RBF对象服务代码保存在分布式文件系统中。In a further embodiment, the present invention's method for expanding the capacity of a distributed file system with non-stop service also includes: writing RBF object service code according to the server node to be expanded; and saving the RBF object service code in the distributed file system.

具体的,在设计之初本发明仅在相应的对象类中预设了RBF服务的空壳,并赋值为NULL。在用户决定需要拓展的服务器后需要根据所要拓展的服务器节点编写RBF对象服务代码以实现对远程对象服务的纳管;并将RBF对象服务代码保存在分布式文件系统中;如此,当需要切换为RBF远程调用时,只需从分布式文件系统中将对应的RBF对象服务代码加到对象类的RBF服务的空壳中,并替换NULL即可实现切换,且不需中断服务。Specifically, at the beginning of the design, the present invention only presets an empty shell of the RBF service in the corresponding object class, and assigns the value to NULL. After the user determines the server that needs to be expanded, the RBF object service code needs to be written according to the server node to be expanded to realize the management of the remote object service; and the RBF object service code is saved in the distributed file system; in this way, when it is necessary to switch to When calling RBF remotely, you only need to add the corresponding RBF object service code from the distributed file system to the empty shell of the RBF service of the object class, and replace NULL to achieve switching without interrupting the service.

在进一步的实施例中,本发明的RBF对象服务代码包括:路径节点控制代码,用于管理多个命名空间和存储空间的映射关系,其中,存储空间包括一个或多个拓展服务器的存储空间;远程对象服务接口,用于基于映射关系访问一个或多个拓展服务器并以预设的调用方法处理数据。In a further embodiment, the RBF object service code of the present invention includes: path node control code, used to manage the mapping relationship between multiple namespaces and storage spaces, where the storage space includes the storage space of one or more expansion servers; The remote object service interface is used to access one or more expansion servers based on mapping relationships and process data with preset calling methods.

在进一步的实施例中,本发明步骤S3中的响应于启用RBF对象服务将本地对象服务的接口添加到RBF对象服务中步骤,还包括:创建对应本地服务器的命名空间并保存与本地存储空间的映射关系;将命名空间及映射关系添加到路径节点控制代码中。In a further embodiment, the step of adding the interface of the local object service to the RBF object service in response to enabling the RBF object service in step S3 of the present invention also includes: creating a namespace corresponding to the local server and saving the namespace with the local storage space. Mapping relationship; add the namespace and mapping relationship to the path node control code.

在进一步的实施例中,本发明的方法还包括在启用RBF对象服务后,通过以下步骤转发客户端请求:客户端请求发送至本地服务器端口并调取相应的对象类;将客户端请求发送给对象类下的RBF对象服务;根据客户端请求中的对象服务信息确定相应的对象服务接口;根据客户端请求中的命名空间基于映射关系确定相应的存储空间。In a further embodiment, the method of the present invention also includes forwarding the client request through the following steps after enabling the RBF object service: sending the client request to the local server port and calling the corresponding object class; sending the client request to RBF object service under the object class; determine the corresponding object service interface according to the object service information in the client request; determine the corresponding storage space based on the mapping relationship according to the namespace in the client request.

在进一步的实施例中,本发明的方法还包括:根据对象服务接口调取相应的方法调用对存储空间中的数据进行处理,并按原路径返回处理结果。In a further embodiment, the method of the present invention also includes: calling corresponding method calls according to the object service interface to process the data in the storage space, and returning the processing results according to the original path.

在进一步的实施例中,调取相应的方法调用对存储空间中的数据进行处理,包括:对存储空间中的数据进行增、删、改或查。In a further embodiment, corresponding method calls are called to process the data in the storage space, including: adding, deleting, modifying or querying the data in the storage space.

在进一步的实施例中,本发明的方法还包括:响应于启用本地对象服务,由对象切换功能将RBF对象服务重新赋值为NULL。具体的,本实施例中将RBF对象服务重新赋值为NULL是为了下一次加载RBF服务代码做准备,使得每次启动的RBF服务时均是基于用户最新修改的RBF服务代码以便访问到用户最新拓展的服务节点。In a further embodiment, the method of the present invention further includes: in response to enabling the local object service, reassigning the RBF object service to NULL by the object switching function. Specifically, in this embodiment, the RBF object service is reassigned to NULL in order to prepare for the next loading of the RBF service code, so that each time the RBF service is started, it is based on the user's latest modified RBF service code to access the user's latest expansion. service node.

以上是本发明公开的示例性实施例,但是应当注意,在不背离权利要求限定的本发明实施例公开的范围的前提下,可以进行多种改变和修改。根据这里描述的公开实施例的方法权利要求的功能、步骤和/或动作不需以任何特定顺序执行。此外,尽管本发明实施例公开的元素可以以个体形式描述或要求,但除非明确限制为单数,也可以理解为多个。The above are exemplary embodiments disclosed by the present invention, but it should be noted that various changes and modifications can be made without departing from the scope of the disclosed embodiments of the present invention defined by the claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or claimed in individual form, they may also be understood as plural unless expressly limited to the singular.

应当理解的是,在本文中使用的,除非上下文清楚地支持例外情况,单数形式“一个”旨在也包括复数形式。还应当理解的是,在本文中使用的“和/或”是指包括一个或者一个以上相关联地列出的项目的任意和所有可能组合。It will be understood that, as used herein, the singular form "a" and "an" are intended to include the plural form as well, unless the context clearly supports an exception. It will also be understood that as used herein, "and/or" is meant to include any and all possible combinations of one or more of the associated listed items.

上述本发明实施例公开实施例序号仅仅为了描述,不代表实施例的优劣。The embodiment numbers disclosed in the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

所属领域的普通技术人员应当理解:以上任何实施例的讨论仅为示例性的,并非旨在暗示本发明实施例公开的范围(包括权利要求)被限于这些例子;在本发明实施例的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,并存在如上的本发明实施例的不同方面的许多其它变化,为了简明它们没有在细节中提供。因此,凡在本发明实施例的精神和原则之内,所做的任何省略、修改、等同替换、改进等,均应包含在本发明实施例的保护范围之内。Those of ordinary skill in the art should understand that the above discussion of any embodiments is only illustrative, and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the thinking of the embodiments of the present invention , the above embodiments or technical features in different embodiments can also be combined, and there are many other changes in different aspects of the above embodiments of the present invention, which are not provided in details for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention shall be included in the protection scope of the embodiments of the present invention.

Claims (10)

Translated fromChinese
1.一种分布式文件系统不停服务的扩容方法,其特征在于,所述方法包括:1. A method for expanding the capacity of a distributed file system with non-stop service, characterized in that the method includes:预先在本地的服务器端口的对象类中定义RBF对象服务,并将所述RBF对象服务初始赋值为NULL;Define the RBF object service in the object class of the local server port in advance, and assign the initial value of the RBF object service to NULL;预先在本地的服务器端口的对象类中添加对象切换功能,所述对象切换功能用于控制启用本地对象服务或者启用所述RBF对象服务;Add an object switching function to the object class of the local server port in advance. The object switching function is used to control the activation of the local object service or the activation of the RBF object service;响应于启用RBF对象服务,由所述对象切换功能从本地分布式文件系统中获取预设的RBF对象服务代码并替换所述NULL,并将本地对象服务的接口添加为所述RBF对象服务的子服务。In response to enabling the RBF object service, the object switching function obtains the preset RBF object service code from the local distributed file system and replaces the NULL, and adds the interface of the local object service as a child of the RBF object service. Serve.2.根据权利要求1所述的一种分布式文件系统不停服务的扩容方法,其特征在于,所述方法还包括:2. A method for expanding the capacity of a distributed file system with non-stop service according to claim 1, characterized in that the method further includes:根据所要拓展的服务器节点编写所述RBF对象服务代码;Write the RBF object service code according to the server node to be expanded;将所述RBF对象服务代码保存在所述分布式文件系统中。The RBF object service code is saved in the distributed file system.3.根据权利要求2所述的一种分布式文件系统不停服务的扩容方法,其特征在于,所述RBF对象服务代码包括:3. A method for expanding the capacity of a distributed file system with non-stop service according to claim 2, characterized in that the RBF object service code includes:路径节点控制代码,用于管理多个命名空间和存储空间的映射关系,其中,所述存储空间包括一个或多个拓展服务器的存储空间;Path node control code, used to manage the mapping relationship between multiple namespaces and storage spaces, where the storage space includes the storage space of one or more expansion servers;远程对象服务接口,用于基于所述映射关系访问所述一个或多个拓展服务器并以预设的调用方法处理数据。A remote object service interface is used to access the one or more expansion servers based on the mapping relationship and process data with a preset calling method.4.根据权利要求3所述的一种分布式文件系统不停服务的扩容方法,其特征在于,响应于启用RBF对象服务将本地对象服务的接口添加到所述RBF对象服务中,还包括:4. A method for expanding the capacity of a distributed file system with non-stop service according to claim 3, characterized in that, in response to enabling the RBF object service, adding the interface of the local object service to the RBF object service also includes:创建对应本地服务器的命名空间并保存与本地存储空间的映射关系;Create a namespace corresponding to the local server and save the mapping relationship with the local storage space;将所述命名空间及所述映射关系添加到所述路径节点控制代码中。Add the namespace and the mapping relationship to the path node control code.5.根据权利要求4所述的一种分布式文件系统不停服务的扩容方法,其特征在于,所述方法还包括在启用RBF对象服务后,通过以下步骤转发客户端请求:5. A method for expanding the capacity of a distributed file system with non-stop service according to claim 4, characterized in that the method also includes forwarding the client request through the following steps after enabling the RBF object service:客户端请求发送至本地服务器端口并调取相应的对象类;The client request is sent to the local server port and the corresponding object class is called;将所述客户端请求发送给所述对象类下的RBF对象服务;Send the client request to the RBF object service under the object class;根据所述客户端请求中的对象服务信息确定相应的对象服务接口;Determine the corresponding object service interface according to the object service information in the client request;根据所述客户端请求中的命名空间基于所述映射关系确定相应的存储空间。The corresponding storage space is determined based on the mapping relationship according to the namespace in the client request.6.根据权利要求5所述的一种分布式文件系统不停服务的扩容方法,其特征在于,所述方法还包括:6. A method for expanding the capacity of a distributed file system with non-stop service according to claim 5, characterized in that the method further includes:根据所述对象服务接口调取相应的方法调用对所述存储空间中的数据进行处理,并按原路径返回处理结果。The corresponding method call is called according to the object service interface to process the data in the storage space, and the processing result is returned according to the original path.7.根据权利要求5所述的一种分布式文件系统不停服务的扩容方法,其特征在于,调取相应的方法调用对所述存储空间中的数据进行处理,包括:7. A method for expanding the capacity of a distributed file system with non-stop service according to claim 5, characterized in that calling corresponding method calls to process the data in the storage space includes:对所述存储空间中的数据进行增、删、改或查。Add, delete, modify or query data in the storage space.8.根据权利要求1所述的一种分布式文件系统不停服务的扩容方法,其特征在于,所述方法还包括:8. A method for expanding the capacity of a distributed file system with non-stop service according to claim 1, characterized in that the method further includes:响应于启用本地对象服务,由所述对象切换功能将所述RBF对象服务重新赋值为NULL。In response to enabling the local object service, the RBF object service is reassigned to NULL by the object switching function.9.一种计算机设备,其特征在于,包括:9. A computer device, characterized in that it includes:至少一个处理器;以及at least one processor; and存储器,所述存储器中存储有可执行的计算机程序,所述计算机程序被所述至少一个处理器执行时,用于实现如上述权利要求1-8任一项所述的种分布式文件系统不停服务的扩容方法的步骤。A memory, in which an executable computer program is stored. When the computer program is executed by the at least one processor, it is used to implement the distributed file system as described in any one of claims 1-8. Steps for scaling out the service.10.一种可读存储介质,其特征在于,包括:10. A readable storage medium, characterized by comprising:可执行的计算机程序,所述计算机程序被执行器执行时,用于实现如上述权利要求1-8任一项所述的种分布式文件系统不停服务的扩容方法的步骤。An executable computer program. When the computer program is executed by an executor, it is used to implement the steps of the method for expanding the capacity of a distributed file system with non-stop service as described in any one of claims 1 to 8.
CN202310954027.3A2023-07-312023-07-31Capacity expansion method, computer and storage medium for uninterrupted service of distributed file systemPendingCN116974988A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202310954027.3ACN116974988A (en)2023-07-312023-07-31Capacity expansion method, computer and storage medium for uninterrupted service of distributed file system

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202310954027.3ACN116974988A (en)2023-07-312023-07-31Capacity expansion method, computer and storage medium for uninterrupted service of distributed file system

Publications (1)

Publication NumberPublication Date
CN116974988Atrue CN116974988A (en)2023-10-31

Family

ID=88484576

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202310954027.3APendingCN116974988A (en)2023-07-312023-07-31Capacity expansion method, computer and storage medium for uninterrupted service of distributed file system

Country Status (1)

CountryLink
CN (1)CN116974988A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20010052008A1 (en)*2000-03-282001-12-13Jacobus Charles J.Distributed computing environment
US20020128995A1 (en)*2001-03-092002-09-12Muntz Daniel A.Namespace service in a distributed file system using a database management system
US20130124921A1 (en)*2010-07-282013-05-16Ecole Polytechnique Federale De Lausanne EpflMethod and device for predicting faults in an it system
CN109564568A (en)*2017-02-132019-04-02赛思研究所Distributed dataset indexing
CN113542373A (en)*2021-06-302021-10-22深圳市云网万店电子商务有限公司Routing service discovery device and method for PAAS platform
CN113590573A (en)*2021-06-252021-11-02济南浪潮数据技术有限公司Request routing method and device for distributed cluster
CN113746894A (en)*2021-07-232021-12-03济南浪潮数据技术有限公司Method and device for realizing load balancing based on HDFS RBF routing layer
CN113824812A (en)*2021-08-272021-12-21济南浪潮数据技术有限公司Method, device and storage medium for HDFS service to acquire service node IP
CN114003180A (en)*2021-11-112022-02-01中国建设银行股份有限公司 A data processing method and device based on cross-machine room Hadoop cluster
CN114020503A (en)*2021-10-192022-02-08济南浪潮数据技术有限公司Optimization method, system and device for transparent fault switching of distributed file system
CN114089917A (en)*2021-11-192022-02-25中国电信集团系统集成有限责任公司Distributed object storage cluster, capacity expansion method and device thereof, and electronic equipment

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20010052008A1 (en)*2000-03-282001-12-13Jacobus Charles J.Distributed computing environment
US20020128995A1 (en)*2001-03-092002-09-12Muntz Daniel A.Namespace service in a distributed file system using a database management system
US20130124921A1 (en)*2010-07-282013-05-16Ecole Polytechnique Federale De Lausanne EpflMethod and device for predicting faults in an it system
CN109564568A (en)*2017-02-132019-04-02赛思研究所Distributed dataset indexing
CN113590573A (en)*2021-06-252021-11-02济南浪潮数据技术有限公司Request routing method and device for distributed cluster
CN113542373A (en)*2021-06-302021-10-22深圳市云网万店电子商务有限公司Routing service discovery device and method for PAAS platform
CN113746894A (en)*2021-07-232021-12-03济南浪潮数据技术有限公司Method and device for realizing load balancing based on HDFS RBF routing layer
CN113824812A (en)*2021-08-272021-12-21济南浪潮数据技术有限公司Method, device and storage medium for HDFS service to acquire service node IP
CN114020503A (en)*2021-10-192022-02-08济南浪潮数据技术有限公司Optimization method, system and device for transparent fault switching of distributed file system
CN114003180A (en)*2021-11-112022-02-01中国建设银行股份有限公司 A data processing method and device based on cross-machine room Hadoop cluster
CN114089917A (en)*2021-11-192022-02-25中国电信集团系统集成有限责任公司Distributed object storage cluster, capacity expansion method and device thereof, and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
祖研;帅仁俊;陈平;: "基于分布式文件系统的图片存储服务的研究", 通信技术, no. 04, 10 April 2011 (2011-04-10)*

Similar Documents

PublicationPublication DateTitle
CN110198231B (en)Container network management method and system for multiple tenants and middleware
US11301154B2 (en)Distributed storage method and device
CN111857873A (en)Method for realizing cloud native container network
CN112214293A (en)Method for service deployment under server-free architecture and function management platform
JP2024512209A (en) Information processing method based on IoT devices, related devices and storage media
CN110543315B (en)Distributed operating system of kbroker, storage medium and electronic equipment
CN114900449B (en)Resource information management method, system and device
WO2021139431A1 (en)Data synchronization method and apparatus for microservice, electronic device and storage medium
CN114124948A (en)High-availability method, device, equipment and readable medium for cloud component
WO2023160083A1 (en)Method for executing transactions, blockchain, master node, and slave node
CN116954816A (en)Container cluster control method, device, equipment and computer storage medium
CN112910980B (en)Database access system and method
CN112052104B (en)Message queue management method based on multi-machine-room implementation and electronic equipment
WO2016144987A1 (en)Architecture for large data management in communication applications through multiple mailboxes
US12073263B1 (en)Dynamic processing of API requests
CN116760913B (en)Method and system for issuing k8s cluster protocol conversion platform configuration
WO2024251107A1 (en)Container orchestration method, data access method, and electronic device and storage medium
CN116974988A (en)Capacity expansion method, computer and storage medium for uninterrupted service of distributed file system
CN115037757B (en) A multi-cluster service management system
CN114490186B (en)Data backup rule distribution method, node, system and storage medium
CN111488324B (en)Distributed network file system based on message middleware and working method thereof
US10200301B1 (en)Logical control groups for distributed system resources
CN114615263A (en) Cluster online migration method, device, device and storage medium
US10148503B1 (en)Mechanism for dynamic delivery of network configuration states to protocol heads
EP3994575A1 (en)Distributed system that promotes task-machine affinity

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp