The technology of the present disclosure relates generally to a system for improving the efficiency of shuffle operations involving many sinks. In a “shuffle,” blocks of data from multiple sources are redistributed among multiple sinks using a distribution scheme that causes blocks of data in each source to be distributed to multiple sinks. At the end of a shuffle each sink may include blocks from more than one source.
Shuffle data is conventionally organized by its source and mapped to its corresponding source for each sink.
Conventionally, shuffle operations may require each source to append its data to a common log. Therefore, shuffle operations can easily scale to accommodate additional sources, and the number of operations to complete a shuffle may increase linearly as the number of sources increases. However, since the sinks receive data from multiple sources and thus are mapped to several different sources, each sink must scan all of the sources from which it may receive data. Thus shuffle operations do not scale as easily to accommodate additional sinks, as the number of operations to complete a shuffle may increase quadratically as the number of sinks increases. As the amount of data handled in the shuffle operation increases, the data may no longer fit in a limited number of sinks, so it becomes necessary to increase the number of sinks to which the data is repartitioned.
One aspect of the present disclosure is directed to a method of repartitioning data in a distributed network. The method may include executing, by one or more processors, a first pass of a data set from a plurality of first sources to a plurality of first sinks, each first sink collecting data from one or more of the first sources, and executing, by the one or more processors, a second pass of the data set from a plurality of second sources to a plurality of second sinks, each one of the plurality of first sinks corresponding to one of the plurality of second sources, and each second sink collecting data from one or more of the second sources. Executing the first and second passes may cause the data set to be repartitioned such that one or more second sinks collect data that originated from two or more of the first sources.
In some examples, a quantity of the plurality of first sinks may be greater than a quantity of the plurality of first sources.
In some examples, each first sink may collect data from two or more of the first sources.
In some examples, a quantity of the plurality of second sinks may be greater than a quantity of the plurality of second sources.
In some examples, the method may further include executing N passes, N being a number having a value greater than two. For each given pass, a plurality of sinks may collect data from one or more of a plurality of sources, each source corresponding to a sink of a previous pass. Executing the N passes may cause the data set to be repartitioned such that one or more Nth sinks collect data that originated from two or more of the first sources.
In some examples, for at least one pass of the N passes, each sink of the pass may collect data from two or more of the sources of the pass, and each of the two or more sources of the pass may include data that originated from different sources of an immediately preceding pass.
In some examples, for at least another pass of the N passes, each sink of the pass may collect data from two or more of the sources of the pass, and each of the two or more sources of the pass may include data that originated from different sources of an immediately preceding pass.
In some examples, the at least one pass and the at least another pass may be consecutive passes of the N passes.
In some examples, each of the plurality of first sinks may be a corresponding one of the plurality of second sources. The method may further include determining completion of the first pass and initiating the second pass upon determining that first pass is completed.
In some examples, each of the plurality of first sinks may be a corresponding one of the plurality of second sources, and the method may further include, prior to the first pass, designating each of the plurality of first sinks and the plurality of second sinks, whereby designation of the plurality of second sinks avoids data from the plurality of first sources being collected at the plurality of second sinks during the first pass, and upon at least one first sink completing collection from one or more of the first sources, and before completion of the first pass, designating one or more second sinks to collect from the at least one first sink.
In some examples, the data set may be passed from the plurality of first sources to the plurality of first sinks using a first hash function, and from the plurality of second sources to the plurality of second sinks using a second hash function that may be correlated to the first hash function
In some examples, identifications of the plurality of second sinks may be contiguous, and for each second sink, the method may include calculating a range of identifications of the second sources from which the second sink collects based on the identification of the second sink.
In some examples, the method may further include flushing, by one or more processors, a shuffle log of the first pass, and before completion of the flushing, executing the second pass for segments of the data set that have been flushed from the shuffle log of the first pass.
In some examples, executing the second pass may include executing a plurality of shuffle operations. A first portion of the second sources may be included in a first data log, and a second portion of the second sources may be included in the second data log.
In some examples, each of the plurality of shuffles may be executed in parallel by the one or more processors, and data included in both the first and second data logs may be flushed from the first and second portions of the second sources in parallel.
Another aspect of the present disclosure is directed to a system for repartitioning data in a distributed network, including one or more processors and one or more storage devices in communication with the one or more processors. The one or more storage devices may contain instructions configured to cause the one or more processors to execute a first pass of a data set from a plurality of first sources to a plurality of first sinks, each first sink collecting data from one or more of the first sources, and to execute a second pass of the data set from a plurality of second sources to a plurality of second sinks, each one of the plurality of first sinks corresponding to one of the plurality of second sources, and each second sink collecting data from one or more of the second sources. The first and second passes may cause the data set to be repartitioned such that one or more second sinks collect data that originated from two or more of the first sources.
In some examples, each first sink may collect data from two or more of the first sources, and a quantity of the plurality of second sinks may be greater than a quantity of the plurality of second sources.
In some examples, the instructions may be configured to cause the one or more processors to execute N passes, N being a number having a value greater than two. For each given pass, a plurality of sinks may collect data from one or more of a plurality of sources, each source corresponding to a sink of a previous pass. Executing the N passes may cause the data set to be repartitioned such that one or more Nth sinks collect data that originated from two or more of the first sources.
In some examples, for at least one pass of the N passes, each sink of the pass may collect data from two or more of the sources of the pass, and each of the two or more sources of the pass includes data that originated from different sources of an immediately preceding pass. For at least one other pass of the N passes, each sink of the pass may collect data from two or more of the sources of the other pass, and each of the two or more sources of the other pass may include data that originated from different sources of an immediately preceding pass. The at least one pass and the at least one other pass may be consecutive passes of the N passes.
In order to scale the shuffle operations with the increasing number of sinks, the present disclosure divides the shuffle operations into multiple passes. In this manner, the number of sources that are read by each sink is reduced, thus alleviating the amount of overhead of the shuffle operations for each sink. Multi-pass shuffle operations can be implemented in different ways and each implementation may improve efficiency in a different manner.
In some implementations, at least one pass of a multi-pass shuffle may be a “sink split.” In a sink split data from each given source is distributed among multiple sinks, but each sink reads data from only one source. Sink splitting in one pass of the multi-pass shuffle may allow the other passes of the multi-pass shuffle to be executed using fewer sinks.
For example, if it is desired to distribute data from 100,000 sources to 100,000 sinks, the data may first be passed to 1,000 sinks, and then the data of each of the 1,000 sinks may be separately split among 100 sinks, resulting in a total of 100,000 sinks after the split. In the first pass, each of the 1,000 sinks may read data from a certain number of sources. Since this pass is a shuffle and each sink reads data from multiple sources, reducing the number of sinks in this pass by a factor of 100 significantly reduces the overhead of the pass. In the subsequent split, each sink reads from only a single source, which also requires significantly less overhead. As a result, the number of sources read by the sinks is reduced in both passes.
Additionally or alternatively, a split may be performed as the first pass of the multi-pass shuffle. Splitting data early may be preferable if the shuffle includes data from a lot of sources. For instance, if there are 1,000,000 sources to be distributed to 2,000,000 sinks, then data from the 1,000,000 sources may first be split into 2 sinks each. Then the resulting 2,000,000 sinks may be separated into 2,000 groups, each group taking data from 1,000 different sources and shuffling the data to 1,000 sinks. The sinks of the first shuffle may be regrouped and then shuffled in a similar manner, resulting in each original source being relatively thoroughly distributed. This form of grouping and reshuffling is referred to herein as a “butterfly shuffle.” As with the prior example, the overhead in each pass is significantly reduced. The overhead of the first pass of the butterfly shuffle is reduced because it is a split, whereby sinks read from only one source. Overhead in the subsequent passes is reduced because each individual shuffle between 1,000 sources and 1,000 sinks requires quadratically less overhead than a shuffle between 1,000,000 sources and 1,000,000 sinks. Stated another way, although the total number of shuffles performed in each pass increases linearly, the processing for each shuffle compared to a single 1,000,000-to-1,000,000 shuffle decreases quadratically.
In the above example of the butterfly shuffle, the number of independent shuffles executed from one pass to the next remains constant. In other example multi-pass shuffles, the number of shuffles executed from one pass to the next can multiply. For example, an initial pass that shuffles data from 10,000 sources to 20,000 sinks may be followed a second pass having two independent shuffles of 10,000 sources to 20,000 sinks. The result of the second pass would distribute the data among 40,000 sinks. Each independent shuffle of the second pass may have its own log of metadata for the blocks of data that are shuffled. This may be preferable for increasing the number of sinks handled by the overall shuffle operation since each log contains metadata for only those sinks that read the blocks of the individual shuffle, and not all of the blocks of the entire pass.
The use of a multi-pass shuffle may improve efficiency of the flushing operations if there is a need to flush metadata from longs during a shuffle. This is because the second pass of the multi-pass shuffle can be controlled to distribute only the data that has already been flushed from the first shuffle. Furthermore, in some cases, the use of multiple passes to complete a shuffle may altogether avoid the need for flushing metadata from the logs, since reducing the total number of sink destinations for a given segment also reduces the total amount of metadata stored for the segment.
In some cases, a multi-pass shuffle may be implemented as a single shuffle by deferring partitioning of the sinks of the subsequent passes until a later time. For instance, in the example of shuffling data from 100,000 sources to 100,000 sinks by using 1,000 of the sinks in a first pass, the partitioning of the remaining 99,000 sinks may be deferred. This prevents the 100,000 sources from writing directly to those 99,000 sinks. In one case, the 99,000 sinks may be blocked until the entire first pass is completed. In another case, the next pass may begin before the first pass ends, but the partitioning scheme of the sinks of the next pass may be changed to prevent the sources from writing directly to them.
The above implementations can improve shuffle performance, and particularly when scaled beyond tens of thousands of sinks. For example, test results have shown that the speed of shuffling approximately 2TiB of data from 100,000 sources to 100,000 sinks can be more than doubled by performing a first pass to 1,000 sinks and a second splitting pass to the 100,000 sinks. This results in a significant reduction in resources, cost and time required to perform the shuffle.
Each client 110 may be a personal computer or a mobile device, intended for use by a person having all the internal components normally found in a personal computer such as a central processing unit (CPU), CD-ROM, hard drive, and a display device, for example, a monitor having a screen, a projector, a touch-screen, a small LCD screen, a television, or another device such as an electrical device that can be operable to display information processed by processor 120, speakers, a modem and/or network interface device, user input, such as a mouse, keyboard, touch screen or microphone, and all of the components used for connecting these elements to one another. Moreover, computers in accordance with the systems and methods described herein may include devices capable of processing instructions and transmitting data to and from humans and other computers including general purpose computers, PDAs, tablets, mobile phones, smartwatches, network computers lacking local storage capability, set top boxes for televisions, and other networked devices.
The client 110 may contain a processor 120, memory 130, and other components typically present in general purpose computers. The memory 130 can store information accessible by the processor 120, including instructions 132 that can be executed by the processor 120. Memory can also include data 134 that can be retrieved, manipulated or stored by the processor 120. The memory 130 may be a type of non-transitory computer readable medium capable of storing information accessible by the processor 120, such as a hard-drive, solid state drive, tape drive, optical storage, memory card, ROM, RAM, DVD, CD-ROM, write-capable, and read-only memories. The processor 120 can be a well-known processor or other lesser-known types of processors. Alternatively, the processor 120 can be a dedicated controller such as an ASIC.
The instructions 132 can be a set of instructions executed directly, such as machine code, or indirectly, such as scripts, by the processor 120. In this regard, the terms “instructions,” “steps” and “programs” can be used interchangeably herein. The instructions 132 can be stored in object code format for direct processing by the processor 120, or other types of computer language including scripts or collections of independent source code modules that are interpreted on demand or compiled in advance.
The data 134 can be retrieved, stored or modified by the processor 120 in accordance with the instructions 132. For instance, although the system and method is not limited by a particular data structure, the data 134 can be stored in computer registers, in a data store as a structure having a plurality of different fields and records, or documents, or buffers. The data 134 can also be formatted in a computer-readable format such as, but not limited to, binary values, ASCII or Unicode. Moreover, the data 134 can include information sufficient to identify relevant information, such as numbers, descriptive text, proprietary codes, pointers, references to data stored in other memories, including other network locations, or information that is used by a function to calculate relevant data.
Although
The datacenters 160-180 may be positioned a considerable distance from one another. For example, the datacenters may be positioned in various countries around the world. Each datacenter 160, 170, 180 may include one or more computing devices, such as processors, servers, shards, or the like. For example, as shown in
Programs may be executed across these computing devices, for example, such that some operations are executed by one or more computing devices of a first datacenter while other operations are performed by one or more computing devices of a second datacenter. In some examples, the computing devices in the various datacenters may have different capacities. For example, the different computing devices may have different processing speeds, workloads, etc. While only a few of these computing devices are shown, it should be understood that each datacenter 160, 170, 180 may include any number of computing devices, and that the number of computing devices in a first datacenter may differ from a number of computing devices in a second datacenter. Moreover, it should be understood that the number of computing devices in each datacenter 160-180 may vary over time, for example, as hardware is removed, replaced, upgraded, or expanded.
In some examples, each datacenter 160-180 may also include a number of storage devices (not shown), such as hard drives, random access memory, disks, disk arrays, tape drives, or any other types of storage devices. The datacenters 160-180 may implement any of a number of architectures and technologies, including, but not limited to, direct attached storage (DAS), network attached storage (NAS), storage area networks (SANs), fibre channel (FC), fibre channel over Ethernet (FCOE), mixed architecture networks, or the like. The datacenters may include a number of other devices in addition to the storage devices, such as cabling, routers, etc. Further, in some examples the datacenters 160-180 may be virtualized environments. Further, while only a few datacenters 160-180 are shown, numerous datacenters may be coupled over the network 150 and/or additional networks.
In some examples, the controller 190 may communicate with the computing devices in the datacenters 160-180, and may facilitate the execution of programs. For example, the controller 190 may track the capacity, status, workload, or other information of each computing device, and use such information to assign tasks. The controller 190 may include a processor 198 and memory 192, including data 194 and instructions 196, similar to the client 110 described above. The controller 190 may be configured to redistribute or repartition data stored among the computing devices in the datacenters 160-180.
Client 110, datacenters 160-180, and controller 190 can be capable of direct and indirect communication such as over network 150. For example, using an Internet socket, a client 110 can connect to a service operating on remote servers through an Internet protocol suite. Servers can set up listening sockets that may accept an initiating connection for sending and receiving information. The network 150, and intervening nodes, may include various configurations and protocols including the Internet, World Wide Web, intranets, virtual private networks, wide area networks, local networks, private networks using communication protocols proprietary to one or more companies, Ethernet, WiFi (e.g., 702.71, 702.71b, g, n, or other such standards), and RPC, HTTP, and various combinations of the foregoing. Such communication may be facilitated by a device capable of transmitting data to and from other computers, such as modems (e.g., dial-up, cable or fiber optic) and wireless interfaces.
Client 110 may request access to data stored in the computing devices of the data centers 160-180. Such request may be handled by the controller 190 and/or one or more of the computing devices in datacenters 160-180. In some examples, a response to a request may involve or otherwise require manipulation of the data, such as using the operations described in greater detail herein.
Data in the distributed data processing system may be stored transiently, such as in a distributed in-memory file system, or disk, or by any combination of the two. Data may be shuffled from a number of data sources A1-AN to a number of data sinks B1-BN. The sources and sinks may be assigned virtual addresses for purposes of tracking the data during repartitioning. In some examples, the data may be stored in virtual machines, such as the virtual machines 166-167 hosted by the data centers 160-180 of
The computing devices 200 may include one or more processors 210, servers, shards, cells, or the like. It should be understood that each computing device may include any number of processors or computing devices, that the number of such devices in the computing devices may vary over time, for example, as hardware is removed, replaced, upgraded, or expanded.
The computing devices 200 may also include a number of storage devices or memory 220, such as hard drives, random access memory, disks, disk arrays, tape drives, or any other types of storage devices. The computing devices 200 may implement any of a number of architectures and technologies, including, but not limited to, direct attached storage (DAS), network attached storage (NAS), storage area networks (SANs), fibre channel (FC), fibre channel over Ethernet (FCOE), mixed architecture networks, or the like. The computing device 200 may include a number of other devices in addition to the storage devices, such as communication devices 250 to enable input and output between the computing devices, such as cabling, routers, etc.
Memory 220 of each of the computing devices can store information accessible by the one or more processors 210, including data 230 that is received at or generated by the computing devices 200, and instructions 240 that can be executed by the one or more processors 210.
The data 230 may include a shuffle log 232 tracking shuffle operations between the sources A1-AN and sinks B1-BN of the system. The shuffle log 232 may include details of the data segments 234, 236 being shuffled in the shuffle operations, such as metadata of the individual data segments 238. Conceptually, the shuffle data may be representation as mappings between sources and their respective destination sinks.
As discussed in greater detail below, the shuffle operations may be divided into multiple passes, from a first pass to an Nth pass. As such, the data segment details are shown in the example shuffle log 232 of
The instructions 240 may include a shuffle control program 242 configured to control operations of a data shuffle. The instructions 240 may further include a shuffle log flushing program 244 configured to manage storage of the data segment details 234, 236 and metadata 238 of the shuffle log 232. The above examples of stored data and programs are discussed in greater detail below.
At block 310, a first pass of data may be executed. The first pass may involve moving data from a set of first sources to a set of first sinks. Then, at block 320, a second pass of data may be executed. The second pass may involve moving data from a set of second sources, which may correspond to the set of first sinks, to a set of second sinks.
For example,
As the number of sources and sinks involved in the shuffle operations increases, the benefits of performing multiple passes also increases. For example, to distribute data from 100,000 sources to 100,000 sinks in a single pass, each sink could be required to read data from numerous sources, for example, 10,000 sources. This would require a total of 10,000*100,000=1 billion mappings between sources and sinks. Even if each sink were to read from only 1,000 sources, 100 million mappings would still need to be tracked. Introducing a second pass would allow the data to first be passed to a small initial subset of sink, such as 1,000 sinks from the sources, and then the data of each of the 1,000 sinks may be separately split among 100 sinks. In the first pass, if each of the 1,000 sinks reads data from either 10,000 or 1,000 of the 100,000 sources, the total number of mappings would amount to 10 million or 1 million, respectively. In the second pass, each of the 100,000 sinks would be mapped to a single source, adding up to a total of 100,000 mappings. Thus, the total number of mappings tracked in the two-pass shuffle would amount to 10.1 million mappings when using 10,000 intermediate sinks, or 1.1 million when using 1,000 intermediate sinks. This number of mappings is significantly less than the 1 billion or 100 million mappings of the single-pass scenario. Experiments suggest that a shuffle operation using 1,000 intermediate sinks to shuffle about 2 TiB of data may be at least twice as fast as the same operation performed without any intermediate sinks.
The above example of
In the above example, sinks of one pass are described as “corresponding” to sources of a next pass. The correspondence may be that the sinks of the one pass are the same as the sources of the next pass, meaning that their addresses are the same. Alternatively, the address of the sink may be different than the address of the source of the next pass, but all data of the sink may be moved to the address of the corresponding source of the next pass.
A multi-pass shuffle may include further operations, such as a third pass, fourth pass, and so on. In the example multi-pass shuffle of
The value of N may vary depending on the amount of data to be shuffled, the purpose of the shuffle operation, and the particular types of shuffle operations being executed. For example, in the case of the sink split shown in the example of
In the example of
Although the example of
The use of a “butterfly” shuffle is particularly beneficial when data is distributed from a large number of sources. For example, to distribute data from 1,000,000 sources to 2,000,000 sinks in a single pass, each sink could be required to read data from numerous sources. For instance, if each sink were to read from 10,000 sources, the shuffle would require a total of 10,000*2,000,000=20 billion mappings between sources and sinks. Even if each sink were to read from only 1,000 sources, 2 billion mappings would still need to be tracked. Even if each sink were to read from only 8 sources, as in the example of
In the above example of a sink split shown in
Additionally, in the example of the butterfly shuffle in
Furthermore, the shuffle operations of the second pass are split or divided between two independently performed operations, such that the split of data in sources 621 and 622 is managed in a first operation 682, and the split of data in sources 623 and 624 is managed in a second separate operation 684. In a similar vein, the sinks of each given independent operation of the second pass are split between two separate operations of the third pass. For instance, the split of data in sources 641 and 642 is managed in a first operation 692, and the split of data in sources 643 and 644 is managed in a second separate operation 694. Similarly, the data that is split in operation 684 of the second pass in then divided between two separate split operations 696, 698 in the third pass.
In the example of
Although the total number of mappings between sources and sinks may not be reduced by handling passes as multiple, separate operations, the use of separate operations does permit for the use of multiple shuffle logs for the same pass. This allows an overall size of each shuffle log to be maintained at a reduced size. As the number of sources and sinks increases and the amount of metadata to be tracked during shuffle operations increases, dividing the metadata into separate shuffle logs may be beneficial. For instance, and with further reference to
For example, an initial pass that shuffles data from 10,000 sources to 20,000 sinks may be followed a second pass having two independent shuffles of 10,000 sources to 20,000 sinks. The result of the second pass would distribute the data among 40,000 sinks, but the metadata of the data blocks moved in the second pass may be split between two separate shuffle logs. This may be especially helpful when a shuffle operation involves a number of sinks much greater than the number of sources, since data could be sufficiently shuffled in early passes of the operation before the number of sinks increases, and then split into a number of sinks according to independent operations managed by separate shuffle logs. In this manner, each shuffle log would contain metadata for only those sinks that read the blocks of its own operations, and not the blocks of the other, independent operations of the pass.
Additionally, if the operations are handled in parallel or at the same time, and if one operation is completed before the other operation, metadata from the shuffle log of the completed operation may be flushed without having to wait for the other, separate operation to also be completed. To illustrate if a shuffle log of a single “sink split” operation including 100,000 uniformly distributed sinks were to contain 50 GiB, then the flusher would flush on average about 0.5 MiB of data per sink completed. However, if the same shuffle log data were split among 100 separate “sink split” operations, each operation including 1,000 sinks, then the flusher would flush on average about 50 MiB of data per sink completed.
In each pass, each sink may receive data from two sources. Furthermore, in each pass, the sinks may be broken into groups, whereby each group of sinks receives data from the same two sources. In this manner, shuffle operations for each group of sinks and their corresponding two sources may be handled as an independent operation having its own shuffle log limited to the metadata of the data written to the given group of sinks. For example, in the second pass, second sinks 735, 736, 737 and 738 may all receive data from second sources 723 and 724. The shuffle between sources 723 and 724 and sinks 735, 736, 737 and 738 may be managed independently in its own shuffle log containing metadata of only the data written to sinks 735, 736, 737 and 738.
In the example of
In can also be seen from the example of
Stated another way, the example of
The above examples of
In some examples, shuffle splitting may be initiated by one or more processors, such as processors 210 of
The above examples demonstrate examples of multi-pass shuffle in which each pass is treated as a separate operation. In other examples, passes may be combined as a single shuffle operation while at the same time maintaining the benefits of reduced overhead and smaller metadata logs. Furthermore, the above examples treat the sinks of each pass as separate from one another. In other examples, there may be overlap between the sinks of each pass. For instance, in an example shuffle operation in which each pass writes to more sinks than the previous pass, the sinks of one pass may be a subset of the sinks of the next pass, and the sinks of the next pass may be a subset of the sinks of the subsequent pass, and so on.
For example, if data is shuffled from 100,000 sources to 100,000 sinks, and if 1,000 sinks are used in a first pass, the 1,000 sinks of the first pass may be 1,000 of the 100,000 sinks to be used in the second pass. In such a case, a partitioning scheme may be utilized to prevent the first sources from writing to any of the remaining 99,000 sinks that are not first sinks. One effect of such a partitioning scheme is that it transformed the multiple shuffle operations of the previous examples into essentially a single shuffle operation from one set of predesignated sources to one set of predesignated sinks.
The example of
The alternative example of
In some examples, initiation of a second pass of a multi-pass shuffle can be conditioned on the data having already been flushed from the shuffle log of the first shuffle. Such conditioning may ensure that the shuffle logs of the multi-pass shuffle do not take up unnecessary space, and may improve efficiency of the flushing operations. In other examples, the use of multiple passes to complete a shuffle operation may itself avoid the need for flushing metadata from the shuffle logs altogether, since reducing the total number of sink destinations for any given segment (as is accomplished in the multi-pass shuffle) would also reduce the total amount of metadata that needs to be stored for each segment.
In some examples, passes of the multi-pass shuffle operation may be pipelined. This may increase quota usage for the one or more processors, but with the advantage of improved performance. In such an example, shuffles occurring in earlier passes may be given higher priority, such as being given sufficient quota, so as to avoid a backlog in the pipelining. The one or more processors may receive instructions from a scheduler program in order to distribute quota among the pipelined shuffles and passes appropriately.
In some examples, a partitioning scheme of the multi-pass shuffle operations may repartition data to all available sinks in one pass, and then condense the data to a subset of the available sinks in a subsequent pass. Such a partitioning scheme may optimize reading of the sinks in the subsequent pass. In particular, if the sink addresses used are continuous, and if the shuffle log maps the subsets of available sinks to non-overlapping ranges of addresses, then lookup operations for the sinks of the subsequent pass may be as simple as a given range of addresses. As a result the mapping between sources and sinks may not take up any space, since sources that a sink is designated to read could be determined based on the sink's own address, without having to store a separate mapping between the sink and the sources addresses.
In the above described examples, each pass may use a hash partitioning function in order to direct data from the sources to their respective destination sinks. The hash partitioning function used in each pass may be correlated to the hash function of the previous pass. Similarly, in the case of “shuffle splitting,” whereby separate shuffle operations are separately conducted in a single pass and split from a common shuffle operation of a previous pass, each of the separate shuffle operations may use a respective hash function that is correlated to the hash function of the previous pass.
The above described examples generally solve problems that arise when trying to run complex queries on volumes of data larger than about 10 TiB, such as tens of TiB of data. Such a volume of data generally requires the use of more than 10,000 sinks, which creates scaling difficulties for conventional single-pass shuffle operations. Those skilled in the art will recognize that the advantages of the multi-pass shuffle operations described herein are also application to smaller volumes of data. That is, even if those smaller volumes could be processed using conventional single-pass shuffle operations, the multi-pass shuffle operations described herein may be improve efficiency and reduce overall cost and overhead of the operations. In fact, some experimentation has suggested that the overall speedup for smaller input data volumes on the order of 1 TiB may be greater than the speedup for larger input data volumes on the order to 10 TiB.
Although the technology herein has been described with reference to particular embodiments, it is to be understood that these embodiments are merely illustrative of the principles and applications of the present technology. It is therefore to be understood that numerous modifications may be made to the illustrative embodiments and that other arrangements may be devised without departing from the spirit and scope of the present technology as defined by the appended claims.
Most of the foregoing alternative examples are not mutually exclusive, but may be implemented in various combinations to achieve unique advantages. As these and other variations and combinations of the features discussed above can be utilized without departing from the subject matter defined by the claims, the foregoing description of the embodiments should be taken by way of illustration rather than by way of limitation of the subject matter defined by the claims. As an example, the preceding operations do not have to be performed in the precise order described above. Rather, various steps can be handled in a different order, such as reversed, or simultaneously. Steps can also be omitted unless otherwise stated. In addition, the provision of the examples described herein, as well as clauses phrased as “such as,” “including” and the like, should not be interpreted as limiting the subject matter of the claims to the specific examples; rather, the examples are intended to illustrate only one of many possible embodiments. Further, the same reference numbers in different drawings can identify the same or similar elements.
The present application is a continuation of U.S. patent application Ser. No. 18/198,356, filed May 17, 2023, which is a continuation of U.S. patent application Ser. No. 17/969,296, filed Oct. 19, 2022, now issued as U.S. Pat. No. 11,675,517, which is a continuation of U.S. patent application Ser. No. 17/359,810, filed Jun. 28, 2021, now issued as U.S. Pat. No. 11,513,710, which is a continuation of U.S. patent application Ser. No. 16/672,939, filed on Nov. 4, 2019, now issued as U.S. Pat. No. 11,061,596, the disclosures of which are hereby incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
Parent | 18198356 | May 2023 | US |
Child | 18660831 | US | |
Parent | 17969296 | Oct 2022 | US |
Child | 18198356 | US | |
Parent | 17359810 | Jun 2021 | US |
Child | 17969296 | US | |
Parent | 16672939 | Nov 2019 | US |
Child | 17359810 | US |