MANAGEMENT OF MULTIPLE CLUSTERS OF DISTRIBUTED FILE SYSTEMS

Information

  • Patent Application
  • 20180139103
  • Publication Number
    20180139103
  • Date Filed
    May 03, 2017
    7 years ago
  • Date Published
    May 17, 2018
    6 years ago
Abstract
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.
Description
TECHNICAL FIELD

The present disclosure relates to managing multiple clusters of distributed file systems in a centralized manner.


BACKGROUND OF THE ART

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.


SUMMARY

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.





BRIEF DESCRIPTION OF THE DRAWINGS

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:



FIG. 1 is a block diagram of an example computing environment;



FIG. 2 is a block diagram of an example cluster management system;



FIG. 3 is a flowchart illustrating an example embodiment for a File Creation request;



FIG. 4 is a flowchart illustrating an example embodiment for a File Open request;



FIG. 5 is a block diagram of an example cluster management system with multiple client components;



FIG. 6 is a block diagram of an example cluster management system with multiple manager components;



FIG. 7 is a block diagram of an example cluster management system with multiple sub-units connected together;



FIG. 8 is a block diagram of an example computing environment with multiple sub-units in the cluster management system;



FIG. 9A is a block diagram of an example computing device for implementing the cluster management system;



FIG. 9B is a block diagram of an example virtual machine implemented by the computing device of FIG. 9B;



FIG. 10A illustrate various scenarios for file creation;



FIG. 10B illustrates various scenarios for file access;



FIG. 10C illustrates various scenarios for file replication;



FIG. 11A illustrates an example of the cluster management system operating in a first mode; and



FIG. 11B illustrates an example of the cluster management system operating in a second mode.





It will be noted that throughout the appended drawings, like features are identified by like reference numerals.


DETAILED DESCRIPTION

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 FIG. 1, there is illustrated a computing environment 100. At least one user device 1021, 1022 (collectively referred to as user devices 102) has at least one application 1141, 1142 (collectively referred to as applications 114) running thereon. The computing environment 100 comprises a plurality of clusters 1041, 1042, 1043 (collectively referred to as clusters 104). Each one of the clusters 104 comprises one or more distributed file systems 1081, 1082, 1083, 1084, 1085, 1086, 1087 (collectively referred to as DFS 108). Each one of the DFS 108 stores one or more files 1101, 1102, 1103, 1104, 1105 (collectively referred to as cluster files 110), accessible by applications 114 on user devices 102. The cluster files 110 correspond to data and/or directories stored in various formats on the DFS 108, and may be accessed and processed by the applications 114 as if they were on the user devices 102. The cluster files 110 may also be referred to as physical files, as they are created in the real underlying file systems of the clusters 104.


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.



FIG. 2 illustrates an example embodiment of the cluster management system 106. As an example embodiment, the cluster management system 106 includes a client component 200 and a manager component 202 cooperating to manage the clusters 104 in a global namespace. The cluster files thus exist in multiple physical locations in the clusters 104 but are managed under a unified structure of the global namespace. Requests regarding the cluster files 110 are received by the client component 200 from the applications 114. The client component 200 sends instructions regarding the request to the manager component 202.


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.



FIG. 3 illustrates an example embodiment for creation of a new cluster file 110 in accordance with a method 300. At step 302, a request to create a new file is received. The request is received from any one of the applications 114 on any one of the user devices 102 by the client component 200 of the cluster management system 106. In some embodiments, the only information provided in the file creation request is the request itself, i.e. a command line to create a file. In some embodiments, the request also comprises a file name and/or a file destination. The file destination refers to a given location in any of the clusters 104, or in any of the DFS 108 in a given one of the clusters 104. If the new file has any relation with an existing file already present in any one of the clusters 104, this information may also be provided in the request.


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 FIG. 2 for the cluster management system 106, the request is received from the application by the client component 200, the metadata is generated and stored by the manager component 202 in the cluster management file, and the request is sent to the appropriate cluster by the client component 200. Other architectures for the cluster management system 106 may also be used to implement the method 300.


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.



FIG. 4 is a method 400 illustrating an example embodiment for processing a request to open a file that has already been created. The applications 114 are aware of the existence of the logical files, not the physical files. Therefore, any request to open a file received from the applications 114 will include the name of the logical file, as per step 402. The request is received from any one of the applications 114 on any one of the user devices 102 by the client component 200 of the cluster management system 106. The request includes the name of the file to be opened, namely “LOGICAL_FILE1”, and is sent to the manager component 202 from the client component 200.


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 FIG. 2, a replicator 206 is provided in the manager component 202 in order to share information between clusters 104 and to ensure consistency across the clusters 104. The replicator 206 may replicate data from one cluster, such as cluster 1041, to another cluster, such as cluster 1042, when needed. This allows, for example, DFS 1084 to locally store data previously only available in DFS 1082, which allows cluster 1042 to perform operations that could previously only be performed by cluster 1041. This can be used, for example, for the purposes of load balancing across clusters 104 or for a join operation using data from both cluster 1041 and cluster 1042. In some embodiments, data replication is performed selectively, or as needed, based on the requests received from the applications 114. In some embodiments, data replication is performed according to a defined schedule, to ensure that data is always available across all clusters 104. In some embodiments, data replication is performed selectively and periodically. The replication of data is transparent to the applications 114 and to the user devices 102.


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 FIG. 1, there may be a proxy 112 provided between any one of the clusters 104 and the cluster management system 106. In some embodiments, the proxy 112 is embedded inside the cluster management system 106. In other embodiments, the proxy 112 is provided externally to the cluster management system 106. The proxy is used to provide the applications 114 access to the clusters 104. Although only one proxy 112 is illustrated, one or more proxies 112 may also be present in the computing environment 100.


As per FIG. 5, in some embodiments, the cluster management system 106 comprises a plurality of client components 5001, 500n. Each one of the client components 5001, . . . , 500n is operatively connected to the manager component 202 and is configured to interface with one or more applications 114 for the user devices 102. In some embodiments, the cluster management system 106 comprises one client component 500n per application 114 from which a request can be received. Each client component 500n comprises a translator 3081, . . . , 308n for translating requests from a first format to a second format. Alternatively, one or more translators 208 are shared by the client components 5001, . . . , 500n inside the cluster management system 106.



FIG. 6 illustrates an embodiment comprising n client components 5001, . . . , 500n and m manager components 6001, . . . , 600m. The manager components 6001, . . . , 600m each comprises a storage medium 6041, . . . , 604m for storing metadata for a set of cluster files, and a replicator 6061, . . . , 606m for replicating data across the clusters 104. Alternatively, one or more storage media 604i (where i=1 to m) and/or one or more replicators 606i are shared by the manager components 6001, . . . , 600m inside the cluster management system 106. The manager components 6001, . . . , 600m are operatively connected together and can coordinate information exchanges and/or data operations via respective consensus engines 6081, . . . , 608m.


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 FIG. 7 with three sub-units 7001, 7002, 7003. For m=3, there are three manager components 6001, 6002, 6003 and three sub-units 7001, 7002, 7003 in the cluster management system 106. Each manager component 6001, 6002, 6003 forms a sub-unit 7001, 7002, 7003 with one or more client component 5001, . . . , 500n.


As illustrated in FIG. 8, each sub-unit 7001, 7002, 7003 interfaces with a separate set of clusters 8001, 8002, 8003 and a separate set of user devices 8021, 8022, 8023. In some embodiments, users devices 102 are shared among the sub units 7001, 7002, 7003 and/or clusters 104 are shared among the sub-units 7001, 7002, 7003.


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.



FIG. 9A is an example embodiment of a computing device 910 for implementing the cluster management system 106. The computing device 910 comprises a processing unit 912 and a memory 914 which has stored therein computer-executable instructions 916. The processing unit 912 may comprise any suitable devices configured to cause a series of steps to be performed such that instructions 916, when executed by the computing device 910 or other programmable apparatus, may cause the functions/acts/steps specified in the methods described herein to be executed. The processing unit 912 may comprise, for example, any type of general-purpose microprocessor or microcontroller, a digital signal processing (DSP) processor, a central processing unit (CPU), an integrated circuit, a field programmable gate array (FPGA), a reconfigurable processor, other suitably programmed or programmable logic circuits, or any combination thereof.


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 FIG. 9B. The virtual machine 950 is an emulation of a computer system and comprises applications 952 that run on an operating system 954 using a set of virtual hardware 956. The virtual hardware 956 includes, for example, a CPU, memory, network interfaces, a disk, and the like. Each virtual machine 950 appears as a real machine from the outside world, and is self-contained and protected from other virtual machines on a same physical server. In some embodiments, the cluster management system 106 is implemented using one or more virtual machine 950.


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. FIG. 10A illustrates examples for various data creation scenarios. The cluster management system 106 may be configured to create a file on a nearest cluster in order to optimize performance. This example is illustrated by path 1002, where application 1142 creates a file on cluster 1041. The system 106 may be configured to create a file on a cluster with the most available space, for a more even distribution of data across the clusters. This example is illustrated by path 1004, where application 1143 creates a file on cluster 1042. The system 106 may be configured to create a file on a specified cluster, illustrated by path 1006 where application 1146 creates a file on cluster 1043. Other configurations and combinations may also be used.



FIG. 10B illustrates various data accessing scenarios. The cluster management system 106 may be configured to access a file from a nearest cluster for best performance. For example, when requested by application 1141, a file is accessed in cluster 1041 via path 1008. The same file is accessed in cluster 1043 via path 1010 when requested by application 1146. In some embodiments, the system 106 is configured to access a file from the cluster with the latest updated data, to ensure strong consistency. For example, when either one of applications 1143 and 1144 request a file, it is accessed in cluster 1042 via paths 1012 and 1014, respectively, even though application 1143 could have accessed the file locally in cluster 1041. In some embodiments, the system 106 is configured to access a file from a remote cluster if a local cluster does not have an available copy. For example, application 1145 requests a file and it is accessed in cluster 1041 via path 1016. In some embodiments, the system 106 is configured to access a requested file from a cluster with the lightest workload, for load balancing purposes. For example, when application 1142 requests access to a file, it is provided via path 1018 in cluster 1043 even though it is also available on cluster 1041. Other configurations and combinations may also be used.



FIG. 10C illustrates various data replication scenarios. The system may be configured to replicate selected files or all files. The files may be replicated only to selected clusters or to all clusters. For example, file 1024 is replicated only in two clusters while file 1026 is replicated in three clusters. The files may be replicated using pipeline paths, as illustrated with paths 1020A, 1020B. The files may also be replicated from a centric cluster, for example using paths 1022A, 1022B. In some embodiments, the cluster management system 106 is configured to replicate data using a streaming mode for best availability, by periodic batch for better performance, or a combination thereof. Other configurations and combinations may also be used.


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.












TABLE 1







HDFS SCHEME
HCFS SCHEME


















MODE 1
Client component not
Client component loaded



loaded by application.
by application to handle




request, client component




coordinates with manager




component for data access.









MODE 2
Client component loaded by application to handle




request, client component coordinates with manager



component for data access.










FIG. 11A illustrates an example for Mode 1. As shown, a request sent by application 1141 that is based on an HDFS scheme is sent directly to the cluster 1041. A request sent by application 1141 that is based on an HCFS scheme goes to the client component 200 before being redirected to the cluster 1041. FIG. 11B illustrates an example for Mode 2. As shown, both HDFS and HCFS based requests are sent to the client component 200 before being redirected to the cluster 1041. If the client component 200 is HCFS-based, the translator 208 will translate HDFS-based requests into an HCFS scheme.


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.

Claims
  • 1. A system for managing a plurality of clusters of distributed file systems, the plurality of clusters having cluster files, the system comprising: at least one processing unit; anda non-transitory memory communicatively coupled to the at least one processing unit and comprising computer-readable program instructions 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 to the cluster management file 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; andacknowledging creation of the cluster file to the application using the logical file name.
  • 2. The system of claim 1, wherein the distributed file systems are Hadoop Distributed File Systems or Hadoop Compatible File Systems.
  • 3. The system of claim 1, wherein 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.
  • 4. The system of claim 3, wherein the at least one client component comprises a plurality of client components each configured to interface with a different user application.
  • 5. The system of claim 3, wherein 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.
  • 6. The system of claim 1, wherein the program instructions are executable for implementing the system as a virtual machine.
  • 7. A method for managing a plurality of clusters of distributed file systems, the plurality of clusters having cluster files, the method comprising: 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 to the cluster management file and a physical file name to the new cluster file;assigning a physical file location for the new cluster file from 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; andacknowledging creation of the cluster file to the application using the logical file name.
  • 8. The method of claim 7, further comprising 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.
  • 9. The method of claim 7, wherein 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.
  • 10. The method of claim 7, wherein 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.
  • 11. The method of claim 7, further comprising: 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; andsending the request to access the new cluster file, using the physical file name, to at least one of the clusters.
  • 12. The method of claim 11, wherein 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.
  • 13. 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 configured 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 to the cluster management file 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; andacknowledging creation of the cluster file to the application using the logical file name.
  • 14. A system for managing a plurality of clusters of distributed file systems, the plurality of clusters having cluster files, the system comprising: at least one processing unit; anda non-transitory memory communicatively coupled to the at least one processing unit and comprising computer-readable program instructions 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; andsending 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.
  • 15. The system of claim 14, wherein the distributed file systems are Hadoop Distributed File Systems or Hadoop Compatible File Systems.
  • 16. The system of claim 14, wherein 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.
  • 17. The system of claim 16, wherein the at least one client component comprises a plurality of client components each configured to interface with a different user application.
  • 18. The system of claim 16, wherein 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.
  • 19. The system of claim 14, wherein the program instructions are executable for implementing the system as a virtual machine.
  • 20. A method for managing a plurality of clusters of distributed file systems, the plurality of clusters having cluster files, the method comprising: 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; andsending the request to access the cluster file, using the physical file name, to at least one of the clusters.
  • 21. The method of claim 20, further comprising 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.
  • 22. The method of claim 20, wherein 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.
  • 23. The method of claim 20, wherein 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.
  • 24. The method of claim 20, further comprising: 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; andstoring the new metadata in association with the new cluster file.
  • 25. The method of claim 24, wherein 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.
  • 26. 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 configured 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; andsending the request to access the cluster file, using the physical file name, to at least one of the clusters.
CROSS-REFERENCE TO RELATED APPLICATIONS

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.

Provisional Applications (1)
Number Date Country
62422751 Nov 2016 US