The present disclosure relates to managing multiple clusters of distributed file systems in a centralized manner.
A cluster of distributed file systems is a client/server based application that allows users (via clients) to access and process data from multiple hosts sharing via a computer network.
As file systems increase in size and different needs arise across an organization, multiple clusters of distributed file systems end up being created and managed independently from one another. This creates certain challenges, such as those associated with having data generated in one cluster that is needed in a different cluster, application load balancing across multiple clusters, and data replication needs for disaster recovery purposes.
Certain tools exist to address these issues, but they are complex and are directed to individual needs, such as data replication or synchronizing name spaces. There is therefore a need for a holistic approach to managing multiple clusters of distributed file systems.
The present disclosure is drawn to methods and systems for managing clusters of distributed file systems having cluster files stored thereon. An intermediate layer is provided between user devices having applications running thereon and clusters of distributed file systems for managing and coordinating operation across multiple clusters using metadata about the cluster files.
In accordance with a first broad aspect, there is provided a system for managing a plurality of clusters of distributed file systems, the plurality of clusters having cluster files. The system comprises at least one processing unit and a non-transitory memory communicatively coupled to the at least one processing unit and comprising computer-readable program instructions. The program instructions are executable by the at least one processing unit for receiving a request to create a new cluster file from an application on a user device, creating a cluster management file corresponding to the new cluster file, assigning a logical file name and a physical file name to the new cluster file, assigning a physical file location for the new cluster file in the plurality of clusters, storing metadata in the cluster management file mapping the cluster management file to the new cluster file, the metadata comprising the physical file name and the physical file location, transmitting the request to create the new cluster file, using the physical file name, to one of the clusters corresponding to the physical file location, and acknowledging creation of the cluster file to the application using the logical file name.
In any one of the previous embodiments, the distributed file systems are Hadoop Distributed File Systems or Hadoop Compatible File Systems.
In any one of the previous embodiments, the program instructions are executable for implementing at least one client component for communicating with the application and the clusters, and at least one manager component for generating and storing the metadata.
In any one of the previous embodiments, the at least one client component comprises a plurality of client components each configured to interface with a different user application.
In any one of the previous embodiments, the at least one manager component comprises a plurality of manager components each configured to interface with a different grouping of the plurality of clusters.
In any one of the previous embodiments, the program instructions are executable for implementing the system as a virtual machine.
In accordance with another broad aspect, there is provided a method for managing a plurality of clusters of distributed file systems, the plurality of clusters having cluster files. A request to create a new cluster file is received from an application on a user device. A cluster management file corresponding to the new cluster file is created. A logical file name and a physical file name are assigned to the new cluster file. A physical file location for the new cluster file is assigned from the plurality of clusters. Metadata is stored in the cluster management file, thus mapping the cluster management file to the new cluster file, the metadata comprising the physical file name and the physical file location. The request to create the new cluster file is transmitted, using the physical file name, to one of the clusters corresponding to the physical file location. Creation of the cluster file is acknowledged to the application using the logical file name.
In any one of the previous embodiments, the method further comprises translating the request to create a new cluster file from a first format to a second format, wherein the application supports the first format and the clusters support the second format.
In any one of the previous embodiments, assigning a physical file location for the new cluster file comprises selecting a nearest one of the clusters with respect to the application requesting the new cluster file.
In any one of the previous embodiments, assigning a physical file location for the new cluster file comprises selecting from the clusters a cluster having a greatest amount of available space compared to the other clusters.
In any one of the previous embodiments, the method further comprises receiving a request to access the new cluster file, the request comprising the logical file name, retrieving the metadata corresponding to the new cluster file using the logical file name, determining a location of the physical file from the metadata, and sending the request to access the new cluster file, using the physical file name, to at least one of the clusters.
In any one of the previous embodiments, sending the request to access the new cluster file comprises selecting the at least one cluster by considering at least one of system performance, system consistency, local data availability, and load balancing across the clusters.
In accordance with another broad aspect, there is provided a computer readable medium having stored thereon program instructions executable by a processor for managing a plurality of clusters of distributed file systems, the plurality of clusters having cluster files. The program instructions are configured for performing any one of the methods described herein.
In accordance with yet another broad aspect, there is provided a system for managing a plurality of clusters of distributed file systems, the plurality of clusters having cluster files. The system comprises at least one processing unit and a non-transitory memory communicatively coupled to the at least one processing unit and comprising computer-readable program instructions. The program instructions are executable by the at least one processing unit for receiving a request to access a cluster file in at least one of the clusters, the request comprising a logical file name, the request received from an application on a user device, retrieving metadata using the logical file name, the metadata mapping a logical file to a physical file corresponding to the cluster file, determining a location of the physical file from the metadata, and sending the request to access the cluster file, using the physical file name, to one of the clusters corresponding to the location of the physical file.
In any one of the previous embodiments, the distributed file systems are Hadoop Distributed File Systems or Hadoop Compatible File Systems.
In any one of the previous embodiments, the program instructions are executable for implementing at least one client component for communicating with the application and the clusters, and at least one manager component for generating and storing the metadata.
In any one of the previous embodiments, the at least one client component comprises a plurality of client components each configured to interface with a different user application.
In any one of the previous embodiments, the at least one manager component comprises a plurality of manager components each configured to interface with a different grouping of the plurality of clusters.
In any one of the previous embodiments, the program instructions are executable for implementing the system as a virtual machine.
In accordance with another broad aspect, there is provided a method for managing a plurality of clusters of distributed file systems, the plurality of clusters having cluster files. A request is received to access a cluster file in at least one of the clusters, the request comprising a logical file name, the request received from an application on a user device. Metadata is retrieved using the logical file name, the metadata mapping a logical file to a physical file corresponding to the cluster file. A location of the physical file is determined from the metadata, and the request to access the cluster file is sent, using the physical file name, to at least one of the clusters.
In any one of the previous embodiments, the method further comprises translating the request to access a new cluster file from a first format to a second format, wherein the application supports the first format and the clusters support the second format.
In any one of the previous embodiments, sending the request to access the new cluster file comprises sending the request to the at least one of the clusters corresponding to the location of the physical file from the metadata.
In any one of the previous embodiments, sending the request to access the new cluster file comprises selecting the at least one of the clusters by considering at least one of system performance, system consistency, local data availability, and load balancing across the clusters.
In any one of the previous embodiments, the method further comprises receiving a request to modify the new cluster file, the request comprising the logical file name, retrieving the metadata corresponding to the new cluster file using the logical file name, generating new metadata in accordance with the request to modify the new cluster file, determining a location of the physical file from the metadata, sending the request to modify the new cluster file, using the physical file name, to at least one of the clusters, and storing the new metadata in association with the new cluster file.
In any one of the previous embodiments, sending the request to modify the new cluster file comprises sending the request to the at least one of the clusters corresponding to the location of the physical file from the metadata.
Further features and advantages of the present invention will become apparent from the following detailed description, taken in combination with the appended drawings, in which:
It will be noted that throughout the appended drawings, like features are identified by like reference numerals.
In accordance with the present embodiments, an intermediate layer is provided between applications on user devices and clusters of one or more distributed file systems. The intermediate layer is referred to herein as a cluster management system. It receives requests for files stored in the distributed file systems from the applications on the user devices. The cluster management system creates cluster management files, which are logical files stored at the intermediate layer, to manage cluster files, which are the physical files stored in the distributed file systems. Metadata is stored in the cluster management files in order to map the logical files to the physical files. The metadata thus comprises the mapping information as well as other information, such as the name and location of the physical files in the distributed file systems.
Referring to
In some embodiments, the DFS 108 are Hadoop Distributed File Systems (HDFS) and/or Hadoop Compatible File Systems (HCFS), such as Amazon S3, Azure Blob Storage, Google Cloud Storage Connector, and the like. Each one of the clusters 104 can comprise a single type of DFS 108, such as HDFS, or one or more types of distributed file systems 108 that are compatible, such as one HDFS and two HCFS. Other types of distributed file systems 108 may also be used.
The DFS 108 of a given cluster, such as cluster 1041, are in a same or different location. For example, DFS 1081 is located on the premises of an organization and DFS 1082 is located in the cloud. In another example, DFS 1081 is located at a first branch of an organization and DFS 1082 is located at a second branch of the same organization, the first and second branches being in different geographical locations, such as different cities, different countries, different continents, and the like. In yet another example, DFS 1081 and DFS 1082 are both located in a same geographical location but correspond to different departments or are located on different floors of the organization. Clusters 104 may also be provided in same or different locations. For example cluster 1041 is in multiple cities in China, cluster 1042 is spread across Europe, and cluster 1043 is in Miami, Fla.
A cluster management system 106 is provided as an intermediate layer between the clusters 104 and the user devices 102. The cluster management system 106 is an entity that manages and coordinates operation of the clusters 104. The cluster management system 106 interfaces with the applications 104 from the user devices 102 to receive requests regarding the cluster files 110. The requests regarding the cluster files 110 may including various operation on the cluster files 110, such as creating a cluster file, modifying a cluster file, accessing a cluster file, and displacing a cluster file, etc. The cluster management system 106 generates or updates respectively and then stores the generated or updated metadata for the cluster files 110 when a received request requires a file to be created or modified, such as a request to create a file, a request to change a file name, a request to displace a file, and the like. The file will ultimately be created in one of the clusters 104, and more specifically in a DCS 108 as a cluster file 110. Metadata about the cluster file includes file name and its location in the clusters 104. When a received request requires access to a file without modification thereto, the cluster management system 106 uses the metadata about the cluster file to locate the file and provide access accordingly.
When the request concerns the creation or the update of a file, the manager component 202 creates and/or updates metadata for the cluster files 110 based on the requests.
At step 304, a cluster management file is created for the new cluster file. The cluster management file may also be referred to as a logical file that is created and managed in the global file namespace. Each logical file may have one or more corresponding physical file (i.e. cluster files 110). In this example, the file name for the cluster management file is “LOGICAL_FILE1”.
At step 306, a file name for the physical file is generated. In this example, the file name for the physical file is called “PHYSICAL_FILE1”. The filename of the physical file is metadata regarding the new file to be created.
At step 308, a location for the physical file “PHYSICAL_FILE1” is selected among the various clusters 104 managed by the cluster management system 106. When the location is not part of the information provided with the request, the location may be selected as a function of various factors, as will be explained in more detail below. The location for the physical file also forms part of the metadata about the cluster file.
The cluster management system 106 speaks with the applications 114 using the logical file names, i.e. “LOGICAL_FILE1” in this case. For example, a request to open this file, received from the applications 114 will take the form of “open LOGICAL_FILE1”. The cluster management system 106 speaks with the clusters 104 using the physical file names, i.e. “PHYSICAL_FILE1” in this case. For example, the request to open “LOGICAL_FILE1”, sent to the appropriate one of the clusters 104, will take the form of “open PHYSICAL_FILE1”. The cluster management system 106 therefore stores a mapping of “LOGICAL_FILE1” to “PHYSICAL_FILE1” in “RECORD1”, as per step 310. This mapping includes the metadata previously generated by the manager component 202 in response to the request to create a new file, and is stored in the cluster management file. The metadata therefore includes the name of the physical file and its location in the clusters 104.
At step 312, the file creation request is transmitted to the appropriate cluster, namely “CLUSTER1” with the physical file name “PHYSICAL_FILE1”. The cluster will then create a cluster file 110 accordingly.
Using the example architecture of
The metadata is stored in the cluster management files in one or more storage devices, such as storage device 204, which may be local or remote to the cluster management system 106.
At step 404, the manager component 202 retrieves the metadata that maps “LOGICAL_FILE1” to “PHYSICAL_FILE1” in order to determine the location of “PHYSICAL_FILE1” in the clusters 104 at step 406. The metadata is stored in the cluster management file, in storage device 204. At step 408, the request to open the physical file is sent to the appropriate cluster. The request may take the form of “open PHYSICAL_FILE1” and be sent to “CLUSTER1”.
In some embodiments, the client component 200 sends the request to open “LOGICAL_FILE1” to the manager component 202. The manager component 202 retrieves the mapping of “LOGICAL_FILE1” to “PHYSICAL_FILE1” from “RECORD1” and retrieves “CLUSTER1” as the location of “PHYSICALFILE1”. The manager component 202 then returns “CLUSTER1” to the client component 200 and the client component 200 sends the request to open “PHYSICAL_FILE1” to “CLUSTER1”.
Referring back to
Load balancing is used by the data management system 106 to improve distribution of workload across the clusters 104. Load balancing aims to optimize resource use, maximize throughput, minimize response time, and avoid overload of any single resource. In some embodiments, the cluster management system 106, for example the manager component 202, is configured to optimize the performance of the clusters 104 by selecting a cluster among the clusters 104 to perform a given task as a function of a received request. Tasks can therefore be spread across the clusters 104 more evenly, and/or concentrated with specific ones of the clusters 104 for various reasons. Some of the selection criteria used to select a cluster when a new request is received are the availability of data in a given cluster, capacity, speed, availability of the cluster, and the type of request. Because data may be replicated from one cluster to another, availability of the data in a given cluster is only one criteria that is weighed against the other criteria for an optimized performance of the computing environment 100.
In some embodiments, the cluster management system 106, for example the client component 200, comprises a translator 208. The translator 208 is used to receive requests from an application based on a DFS type that differs from one or more of the DFS types found in the clusters 104. For example, if application 1141 is HCFS based, and the cluster management system 106 elects to send the request to cluster 1043 where the DFS 1085, 1086, 1087 are HDFS, then the translator 208 will translate the request from HCFS to HDFS. The request received from application 1141 is in an HCFS format and the request transmitted to cluster 1043 by the cluster management system 106 is in an HDFS format. The translator 208 can be configured to perform translations other than HDFS-HCFS and HCFS-HDFS.
As illustrated in
As per
The consensus engines 6081, . . . , 608m are used to ensure agreement among the manager components 6001, . . . , 600m on how to handle operations that involve clusters 104 managed by different manager components 6001, . . . , 600m. Examples of operations requiring consensus are data replication, data sharing, and redistribution of loads among clusters 104. Consensus may also be used with other operations. In some embodiments, one or more consensus protocol is defined to coordinate operations on cluster files 110. Some examples of consensus protocols are Paxos, Chubby, Phase King, proof of work, Lockstep, MSR-type, and hashgraph. Other consensus protocols may be used.
In some embodiments, creating, updating, and/or deleting metadata from one or more cluster management file is performed via consensus protocol by the consensus engines. For example, application 1141 sends out a request to delete cluster file 1105. The request is received by the client component 5001 and transmitted to the manager component 6001. Consensus engine 6081 sends out a consensus request for the modification (i.e. to delete metadata related to cluster file 1105) to consensus engines 6082 to 608m of manager components 6002 to 600m. Each consensus engine 6082 to 608m votes for the modification based on its current status independently of the other consensus engines. If a majority of consensus engines agree to the modification request, consensus engine 6081 sends out a modification confirmation to consensus engine 6082 to 608m. Each manager component 6001 to 600m then applies the modification to its local cluster management file in its local storage device 6041 to 604m. If a majority of consensus engines disagree to the modification request, the modification is rejected and not applied by any of the manager components 6001 to 600m.
Each manager component 6001, . . . , 600m is associated with one or more client components 5001, . . . , 500n to form a sub-unit, and all of the sub-units are connected together to form the cluster management system 106. An example is illustrated in
As illustrated in
Communication in the computing environment 100, across the sub-units 7001, 7002, 7003, between the cluster management system 106 and the user devices 102, and/or between the cluster management system 106 and the clusters 104, occurs in various ways, including directly and indirectly over one or more networks. The networks can involve wired connections, wireless connections, or a combination thereof. The networks may involve different network communication technologies, standards and protocols, for example Global System for Mobile Communications (GSM), Code division multiple access (CDMA), wireless local loop, WiMAX, Wi-Fi, Bluetooth, Long Term Evolution (LTE) and so on. The networks may involve different physical media, for example coaxial cable, fiber optics, transceiver stations and so on. Example network types include the Internet, Ethernet, plain old telephone service (POTS) line, public switched telephone network (PSTN), integrated services digital network (ISDN), digital subscriber line (DSL), and others, including any combination of these. The networks can include a local area network and/or a wide area network.
The memory 914 may comprise any suitable known or other machine-readable storage medium. The memory 914 may comprise non-transitory computer readable storage medium, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. The memory 914 may include a suitable combination of any type of computer memory that is located either internally or externally to device, for example random-access memory (RAM), read-only memory (ROM), compact disc read-only memory (CDROM), electro-optical memory, magneto-optical memory, erasable programmable read-only memory (EPROM), and electrically-erasable programmable read-only memory (EEPROM), Ferroelectric RAM (FRAM) or the like. Memory 914 may comprise any storage means (e.g., devices) suitable for retrievably storing machine-readable instructions 916 executable by processing unit 912.
In some embodiments, the computing device 910 is a physical server on which one or more virtual machines is implemented, an example of which is shown in
Generating metadata for individual files and/or directories provides flexibility in responding to requests from applications 114. The request may be directed, by the cluster management system 106, to a given cluster where the original data is stored, or it may be redirected to another cluster, such as a cluster that is geographically closer to the user device 102 on which the application 114 sending out the request is running. Redirecting the request may improve system performance in wide area network (WAN) environments with large network latencies. Note that redirection of requests is available for certain types of requests, such as read operations, where the data is not modified. Requests involving modification of the data, such as write operations, are directed to the cluster with the original file.
Indeed, the cluster management system 106 supports flexible policies that are configurable for creating, accessing, and replicating data across clusters.
Replication of data between clusters 104, whether it be individual files and/or directories, may occur using various mechanisms. In some embodiments, replication is triggered based on a request received by an application 114. In some embodiments, replication is planned according to a regular schedule. In some embodiments, replication is triggered according to one or more policies. A combination of any of these embodiments can also be implemented.
The cluster management system 106 therefore provides a single management system for all DFS 108 forming part of different clusters. The cluster files and general function of the clusters 104 remain unchanged by the addition the cluster management system 106.
In some embodiments, the clusters 104 are HDFS/HCFS clusters. The client component 200 is an HCFS compatible library to interface with the applications 114. The applications 114 can dynamically load the client component 200 based on an HDFS/HCFS protocol. In other words, the client component 200 may be loaded as needed by the applications 114. In addition, the client component 200 may load different drivers for different clusters 104. For example, a first driver is loaded by the client component 200 for cluster 1041 and a second driver is loaded by the client component for cluster 1042. The first driver is for HDFS version 1 while the second driver is for HCFS version x. A third driver may be loaded for cluster 1043, suitable for HDFS version 2.
The applications 114 can use a Uniform Resource Identifier (URI) to represent a data file to be accessed. An example URI format is “scheme://authority/path”. For an HDFS-based application, an HDFS scheme is used. For an HCFS-based application, various scheme types and file system plug-ins may be used, such as “s3” for an Amazon S3-based HCFS system. The client component 200 is configured to provide both HDFS-based URI and/or HCFS-based URI to the applications 114. Examples using the embodiments described above are “Pylon://user/LOGICAL_FILE1” for an HCFS scheme, or “hdfs://temp/LOGICAL_FILE1” for an HDFS scheme.
In some embodiments, the client component is configured to operate under two or more modes, each mode setting a given behavior for the application 114 as a function of the corresponding scheme in use. TABLE 1 illustrates an example with two modes, and two schemes.
The manager component 202 provides a global name space for multiple HDFS/HCFS based clusters 114 using the metadata stored in storage medium 204. The manager component oversees multiple clusters 114 and schedules data flow among the clusters 114 via the replicator 206. The replicator 206 is configured to track changes to files and plan replication tasks across clusters 114.
Metadata is created and stored in the storage medium 204 or elsewhere in order to manage the cluster files 110. In some embodiments, each cluster file 110 has a corresponding cluster management file. The cluster management file contains the mapping of the logical file to the physical file and any other information required for managing the cluster files 110. The mapping of the logical file to the physical file and any other information required for managing the cluster files 110 is the metadata. Operations on the cluster files are coordinated via consensus protocol when a plurality of manager components 400 are present.
In some embodiments, the cluster files 110 are organized according to a directory cataloging structure, and the cluster management files are used to store information (i.e. metadata) about cluster directories and relationships among the directories. Each cluster directory may comprise one or more cluster files 110 and, in some cases, references to subdirectories. Instead of merely replicating cluster files from one cluster to another cluster, directories comprising cluster files and the relationships between the directories can be replicated between clusters.
In some embodiments, directories are used as a logical concept at the metadata management layer and therefore, do not require a one-to-one mapping in the physical cluster layer. In this case, some directory-related operations do not need to access the underlying clusters. For example, an application 114 sends a request to create a directory. The request is received by the client component 200 of the cluster management system 106. The client component 200 transfers the request to the manager component 202, which creates metadata regarding the request. The metadata may be stored in a new cluster management file or in an existing cluster management file. In some embodiments, when a new directory is created, a new cluster management file is created for the directory. Metadata stored in the new cluster management file includes a directory name, such as “DIRECTORY1” and metadata mapping the new cluster management file to “DIRECTORY1” is created and stored, for example in “RECORD2”. The metadata may also include any file that forms part of the directory. The directory name is returned to the application 114 by the client component 200. There is no need to access the clusters for this operation as the creation of the directory does not affect the structure of the cluster files in any manner.
The applications 114 may interact with the cluster management system 106 using the directory names, for example by requesting to list the contents of “DIRECTORY1”. The request is received by the client component 200 and transferred to the manager component 202. The manager component 202 accesses the cluster management files and retrieves the metadata regarding “DIRECTORY1”. This information is returned to the application 114 by the client component 200. Again, there is no need to access the clusters for this operation as the listing of directory files does not affect the structure of the cluster files in any manner.
Similarly, renaming a directory only involves metadata management and does not require access to the underlying physical cluster files. When a request to rename a directory is received from an application 114, the cluster management system 106 updates the cluster management file for the directory as well as all of the cluster management files of each file in the directory. This may be a time consuming operation if there are a large number of files in the directory, but renaming can take place concurrently with other ongoing write operations.
Other requests, such as deleting a directory, will involve access to the cluster files as the underlying structure of the cluster files is modified. The first part of the directory deleting operation is the same as a directory creating operation. The request to delete a directory is received by the client component 200 and sent to the manager component 202. All cluster management files are updated accordingly, by deleting the entry of the directory itself (name, contents, status) as well as entries of files under the directory (name, status). Confirmation of the deletion is sent to the application 114 by the client component 200. In addition, the cluster management system 106 also sends notifications to the clusters 104 to delete the directories.
Each computer program described herein may be implemented in a high level procedural or object oriented programming or scripting language, or a combination thereof, to communicate with a computer system. Alternatively, the programs may be implemented in assembly or machine language. The language may be a compiled or interpreted language. Each such computer program may be stored on a storage media or a device, for example a ROM, a magnetic disk, an optical disc, a flash drive, or any other suitable storage media or device.
Embodiments of the cluster management system 106 may also be considered to be implemented by way of a non-transitory computer-readable storage medium having a computer program stored thereon.
Computer-executable instructions may be in many forms, including program modules, executed by one or more computers or other devices. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types. Typically the functionality of the program modules may be combined or distributed as desired in various embodiments.
Various aspects of the present computing environment 100 may be used alone, in combination, or in a variety of arrangements not specifically discussed in the embodiments described in the foregoing and is therefore not limited in its application to the details and arrangement of components set forth in the foregoing description or illustrated in the drawings. For example, aspects described in one embodiment may be combined in any manner with aspects described in other embodiments. Although particular embodiments have been shown and described, it will be obvious to those skilled in the art that changes and modifications may be made without departing from this invention in its broader aspects. The appended claims are to encompass within their scope all such changes and modifications.
The present application claims the benefit of U.S. Provisional Patent Application No. 62/422,751 filed on Nov. 16, 2016, the contents of which are hereby incorporated by reference in their entirety.
Number | Date | Country | |
---|---|---|---|
62422751 | Nov 2016 | US |