Multi-pass distributed data shuffle
By dividing shuffle operations into multiple passes and employing sink partitioning and butterfly shuffles, the method addresses inefficiencies in traditional shuffle operations, enhancing efficiency and reducing resource usage for large data distributions.
Patent Information
- Application Number
- JP2024160942
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2019-11-04
- Filing Date
- 2024-09-18
- Publication Date
- 2025-01-23
AI Technical Summary
Traditional shuffle operations face inefficiencies as they require each source to append data to a common log, making it difficult to adjust to additional sources, leading to linearly increasing operations, while sinks with multiple mappings result in quadratic operation increases, and the need to expand the number of sinks as data volume grows.
The method involves dividing the shuffle operation into multiple passes, reducing the number of sources read by each sink, using techniques like sink partitioning and butterfly shuffles to minimize overhead, allowing for efficient distribution of data across a larger number of sinks.
This approach significantly reduces shuffle operation overhead and improves efficiency by minimizing the number of mappings and metadata storage, enabling faster processing of large data volumes with fewer resources and reduced time.
Smart Images

Figure 2025011096000001_ABST
Abstract
Description
[Technical field]
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application is a continuation of U.S. Patent Application No. 16 / 672,939, filed November 4, 2019, the disclosure of which is incorporated herein by reference. [Background technology]
[0002] background The technology of this disclosure generally relates to a system for improving the efficiency of shuffle operations that require many sinks. In a "shuffle," blocks of data from multiple sources are redistributed among multiple sinks using a distribution scheme that distributes blocks of data at each source to multiple sinks. After the shuffle, each sink may contain blocks from two or more sources.
[0003] Traditionally, shuffled data is organized by its source and mapped to its corresponding source for each sink. Figure 1 is a functional block diagram illustrating an example of a shuffle operation, where a block of data stored in source 10 is shuffled to sink 30. In the example of Figure 1, there are 14 sources and 16 sinks. Each sink is mapped to and receives data from four different sources. For example, sinks 31 and 32 are each mapped to receive shuffled data from sources 11, 12, 13, and 14. In yet another example, sinks 33 and 34 are each mapped to and receive shuffled data mapped from sources 11 and 12 to source 13, from source 13 to source 15, and from source 15 to sinks 33 and 34. There are a total of 64 mappings between sinks and sources in the shuffle of Figure 1, with four sources for each of the 16 sinks. Summary of the Invention [Problem to be solved by the invention]
[0004] Traditionally, a shuffle operation may require each source to append its data to a common log. Thus, the shuffle operation can be easily scaled to accommodate additional sources, and the number of operations to complete the shuffle may increase linearly as the number of sources increases. However, since sinks receive data from multiple sources and are therefore mapped to several different sources, each sink must scan all of the sources from which it receives data. Thus, the shuffle operation is not easily scaled to accommodate additional sinks, because the number of operations to complete the shuffle may increase quadratically as the number of sinks increases. As the amount of data processed in the shuffle operation increases, the data will no longer fit into a limited number of sinks, and it will become necessary to increase the number of sinks to which the data is repartitioned. [Means for solving the problem]
[0005] Quick Overview One aspect of the disclosure is directed to a method of repartitioning data in a distributed network, the method may include one or more processors performing 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, the method further comprising the one or more processors performing a first pass of a data set from a plurality of second sources. performing a second pass of the data set to a plurality of second sinks, each of the plurality of first sinks corresponding to one of the plurality of second sources, each second sink collecting data from one or more of the second sources. Performing the first and second passes may cause one or more second sinks to repartition the data set such that they collect data originating from two or more of the first sources.
[0006] In some examples, the quantity of the plurality of first sinks will be greater than the quantity of the plurality of first sources.
[0007] In some examples, each primary sink may collect data from two or more of the primary sources.
[0008] In some examples, the quantity of the plurality of secondary sinks will be greater than the quantity of the plurality of secondary sources.
[0009] In some examples, the method may further include performing N passes, where N is a number having a value greater than 2. For each given pass, a plurality of sinks may collect data from one or more of the plurality of sources, each source corresponding to a sink of a previous pass. Performing the N passes may cause the data set to be repartitioned such that one or more of the Nth sinks collect data originating from two or more of the first sources of the first sources.
[0010] In some examples, for at least one of the N paths, each sink of the path may collect data from two or more of the sources of the path, and each of the two or more sources of the path may include data originating from another source of a immediately preceding path.
[0011] In some examples, for at least another of the N paths, each sink of the path may collect data from two or more of the sources of the path, and each of the two or more sources of the path may include data originating from another source of a immediately preceding path.
[0012] In some examples, the at least one path and the at least another path may be consecutive paths of the N paths.
[0013] 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 the first pass is complete.
[0014] 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 designating each of the plurality of first sinks and the plurality of second sinks prior to the first pass, where designating the plurality of second sinks prevents data from the plurality of first sources from being collected at the plurality of second sinks during the first pass, and the method may further include designating one or more second sinks to collect from the at least one first sink when at least one first sink has completed collection from one or more first sources of the first sources and prior to completion of the first pass. It may include a
[0015] In some examples, the data set may be passed from the multiple first sources to the multiple first sinks using a first hash function and from the multiple second sources to the multiple second sinks using a second hash function that may be correlated to the first hash function.
[0016] In some examples, the identities of the multiple second sinks may be continuous, and for each second sink, the method may include calculating a range of identities of the second sources from which the second sink collects based on the identities of the second sink.
[0017] In some examples, the method may further include one or more processors flushing a shuffle log of the first pass and performing the second pass on segments of the data set flushed from the shuffle log of the first pass prior to completion of the flushing step.
[0018] In some examples, performing the second pass may include performing a plurality of shuffle operations. A first portion of the second source may be included in a first data log and a second portion of the second source may be included in the second data log.
[0019] In some examples, each of the multiple shuffles may be performed in parallel by the one or more processors, and data contained in both the first data log and the second data log may be flushed from the first and second portions of the second source in parallel.
[0020] Another aspect of the disclosure is directed to a system for repartitioning data in a distributed network, comprising 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 include instructions configured to cause the one or more processors to perform 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 first sources of the first sources, and the instructions further configured to cause the one or more processors to perform a second pass of the data set from a plurality of second sources to a plurality of second sinks, each of the plurality of first sinks corresponding to one of the plurality of second sources, each second sink collecting data from one or more second sources of the second sources. The first and second passes may cause the one or more second sinks to repartition the data set such that they collect data originating from two or more first sources of the first sources.
[0021] In some examples, each first sink may collect data from two or more of the first sources, and the amount of the plurality of second sinks will be greater than the amount of the plurality of second sources.
[0022] In some examples, the instructions may be configured to cause the one or more processors to perform N passes, where N is 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. Performing the N passes may include repartitioning the data set such that one or more Nth sinks collect data originating from two or more of the first sources of the first sources. This can cause the device to be partitioned.
[0023] In some examples, for at least one path of the N paths, each sink of the path may collect data from two or more of the sources of the path, each of the two or more sources of the path including data originating from another source of a immediately preceding path. For at least one other path of the N paths, each sink of the path may collect data from two or more of the sources of the other path, each of the two or more sources of the other path including data originating from another source of a immediately preceding path. The at least one path and the at least one other path may be consecutive paths of the N paths. [Brief description of the drawings]
[0024] [Figure 1] FIG. 1 is a block diagram illustrating an example prior data distribution scheme. [Figure 2A] FIG. 1 is a block diagram of an example system in a distributed data store according to an aspect of the present disclosure. [Figure 2B] 1 is a block diagram of an example system and computing device according to aspects of the present disclosure. [Diagram 3] FIG. 11 is a flow diagram illustrating an example multi-pass shuffle in accordance with an aspect of the present disclosure. [Figure 4] FIG. 2 is a block diagram illustrating an exemplary data distribution scheme according to an aspect of the present disclosure. [Diagram 5] FIG. 2 is a block diagram illustrating an exemplary data distribution scheme according to an aspect of the present disclosure. [Figure 6] FIG. 2 is a block diagram illustrating an exemplary data distribution scheme according to an aspect of the present disclosure. [Figure 7] FIG. 2 is a block diagram illustrating an exemplary data distribution scheme according to an aspect of the present disclosure. [Figure 8] FIG. 2 is a block diagram illustrating an example workflow according to an aspect of the present disclosure. [Figure 9] FIG. 2 is a block diagram illustrating an example workflow according to an aspect of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0025] Detailed Description overview To scale the shuffle operation as the number of sinks increases, the present disclosure splits the shuffle operation into multiple passes. In this way, it reduces the number of sources read by each sink, thereby reducing the amount of shuffle operation overhead for each sink. A multi-pass shuffle operation can be implemented in a variety of ways, and each implementation can improve efficiency in different ways.
[0026] In some implementations, at least one pass of a multi-pass shuffle may be "sink splitting." In sink splitting, data from each given source is distributed among multiple sinks, but each sink reads data from only one source. Performing sink splitting in one pass of a multi-pass shuffle may allow other passes of the multi-pass shuffle to be performed using fewer sinks.
[0027] For example, if it is desired to distribute data from 100,000 sources to 100,000 sinks, first the data may be passed to 1,000 sinks, and then the data for each of the 1,000 sinks may be split separately among the 100 sinks, resulting in a total of 100,000 sinks after splitting. ,each of the 1,000 sinks may read data from a fixed 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 subsequent splits, each sink reads from only one source, requiring significantly less overhead. As a result, the number of sources read by the sinks is reduced in both passes.
[0028] Additionally or alternatively, the splitting may be performed as the first pass of a multi-pass shuffle. If the shuffle involves data from multiple sources, it may be preferable to split the data early. For example, if there are 1,000,000 sources to be distributed to 2,000,000 sinks, the data from the 1,000,000 sources may first be split into two sinks each. The resulting 2,000,000 sinks may then be split into 2,000 groups, each group taking data from 1,000 different sources and shuffling this data into 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 fully distributed. This form of grouping and reshuffling is referred to herein as a "butterfly shuffle." As with the previous example, the overhead in each pass is significantly reduced. The overhead of the first pass of the butterfly shuffle is reduced because it is partitioned so the sink only reads from one source. The overhead in 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. In other words, the total number of shuffles performed in each pass increases linearly, but the processing of each shuffle decreases quadratically compared to a single 1,000,000 to 1,000,000 shuffle.
[0029] In the above example of a butterfly shuffle, the number of independent shuffles performed from one pass to the next pass remains constant. In other examples of a multi-pass shuffle, the number of shuffles performed from one pass to the next pass may increase. For example, a first pass shuffling data from 10,000 sources to 20,000 sinks may be followed by a second pass with two independent shuffles from 10,000 sources to 20,000 sinks. The result of the second pass would distribute the data among 40,000 sinks. Each of the independent shuffles of the second pass may have its own log of metadata for the blocks of data being shuffled. This may be preferable to increasing the number of sinks processed by the entire shuffle operation, because each log contains metadata only for the sinks that read the blocks of the individual shuffle, rather than all the blocks of the entire pass.
[0030] The use of a multi-pass shuffle can improve the efficiency of flush operations when metadata needs to be flushed from the log during a shuffle, because the second pass of the multi-pass shuffle can be controlled to distribute only data that has already been flushed from the first shuffle. Furthermore, in some cases, the need to flush metadata from the log can be completely eliminated by completing the shuffle using multiple passes, because reducing the total number of sink destinations for a given segment also reduces the total amount of metadata stored for this segment.
[0031] In some cases, a multi-pass shuffle can be implemented as a single shuffle by postponing the partitioning of the sinks of subsequent passes until later. For example, in an example where data is shuffled from 100,000 sources to 100,000 sinks using 1,000 of the sinks in a first pass, the partitioning of the remaining 99,000 sinks may be postponed. This prevents the 100,000 sources from writing directly to those 99,000 sinks. In one example, the 99,000 sinks may be blocked until the entire first pass is complete. In another example, the next pass may start before the first pass finishes, but the partitioning scheme of the sinks in the next pass may be changed so that the sources cannot write directly to them.
[0032] The above implementation can improve shuffle performance, especially when scaled to more than tens of thousands of sinks. For example, test results show that the speed of shuffling approximately 2 TiB (tebibytes) 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 split pass to 100,000 sinks. This results in a significant reduction in the resources, cost and time required to perform the shuffle.
[0033] Exemplary System 2A illustrates an exemplary system including a distributed computing environment. Multiple data centers 160, 170, 180 may be communicatively coupled, for example, via a network 150. The data centers 160, 170, 180 may further communicate with one or more client devices (such as client 110) via the network 150. Thus, for example, client 110 may perform computations in the "cloud." In some examples, the data centers 160, 170, 180 may further communicate with a controller 190.
[0034] Each client 110 may be a personal computer or mobile device intended for use by a person, having all the internal components typically found in a personal computer, such as a central processing unit (CPU), a CD-ROM, a hard drive, a display device (e.g., 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 may be operable to display information processed by the processor 120), speakers, a modem and / or a network interface device, user input (mouse, keyboard, touch screen or microphone), and all the components used to connect these elements to each other. Additionally, computers according to the systems and methods described herein may include devices capable of processing instructions and transmitting data between humans and other computers, including general purpose computers, PDAs, tablets, mobile phones, smart watches, network computers without local storage capabilities, set-top boxes for televisions, and other network-connected devices.
[0035] The client 110 may include a processor 120, a memory 130, and other components typically found in a general-purpose computer. The memory 130 may store information accessible by the processor 120, including instructions 132 that may be executed by the processor 120. The memory may also include data 134 that may be retrieved, manipulated, or stored by the processor 120. The memory 130 may be any 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 cards, ROM, RAM, DVD, CD-ROM, writable and read-only memory, etc.). The processor 120 may be a well-known processor or other lesser known types of processor. Alternatively, the processor 120 may be a dedicated controller (such as an ASIC).
[0036] The instructions 132 may be a set of instructions that are executed directly by the processor 120 (such as machine code) or indirectly by the processor 120 (such as a script). In this regard, the terms "instructions," "steps," and "program" may be used interchangeably herein. The instructions 132 may be stored in object code format for direct processing by the processor 120, or in other types of computer languages (including scripts or collections of independent source code modules that are interpreted on demand or precompiled).
[0037] The data 134 may be retrieved, stored, or modified by the processor 120 according to the instructions 132. For example, the system and method are not limited by a particular data structure, but the data 134 may be stored in a computer register, a data store as a structure having multiple different fields and records or documents, or may be stored in a buffer. The data 134 may also be formatted in a computer readable format, such as, but not limited to, binary values, ASCII, or Unicode. Additionally, the data 134 may include sufficient information to identify related information, such as numbers, descriptive text, proprietary codes, pointers, references to data stored in other memory, including other network locations, or information used by a function to calculate the related data.
[0038] 2A functionally depicts processor 120 and memory 130 as being in the same block, processor 120 and memory 130 may actually include multiple processors and memories that may or may not be stored in the same physical housing. For example, some of instructions 132 and data 134 may be stored on a removable CD-ROM, in a read-only computer chip, or the like. Some or all of the instructions and data may be stored physically remote from processor 120 but still accessible by processor 120. Similarly, processor 120 may actually include a collection of processors that may or may not operate in parallel.
[0039] The data centers 160-180 may be located far apart from one another. For example, the data centers may be located in different countries around the world. Each data center 160, 170, 180 may include one or more computing devices (processors, servers, shards, etc.). For example, as shown in FIG. 2A, the data center 160 includes computing devices 162, 164, the data center 170 includes computing device 172, and the data center 180 includes computing devices 181-186. According to some examples, the computing devices may include one or more virtual machines operating on a host machine. For example, the computing device 162 may be a host machine supporting multiple virtual machines 166, 167 that run an operating system and applications. Although only a few virtual machines 166, 167 are shown in FIG. 2A, it should be understood that any number of virtual machines may be supported by any number of host computing devices. Additionally, it should be understood that the configuration shown in FIG. 2A is merely an example, and that the computing devices in each of the example data centers 160-180 may have a variety of structures and components that may be identical to or different from one another.
[0040] For example, some operations may be performed by one or more computing devices in a first data center and other operations may be performed by one or more computing devices in a second data center. Programs may be executed across multiple data centers. In some examples, the computing devices in the various data centers may have different capacities. For example, different computing devices may have different processing speeds, workloads, etc. Although only a portion of these computing devices are shown, it should be understood that each data center 160, 170, 180 may include any number of computing devices, and the number of computing devices in a first data center may be different than the number of computing devices in a second data center. Additionally, it should be understood that the number of computing devices in each data center 160-180 may vary over time (e.g., as hardware is removed, replaced, upgraded, or expanded).
[0041] In some examples, each data center 160-180 may also include several storage devices (not shown), such as hard drives, random access memory, disks, disk arrays, tape drives, or other types of storage devices. The data centers 160-180 may implement any of several architectures and technologies, including, but not limited to, direct attached storage (DAS), network attached storage (NAS), storage area networks (SAN), Fibre Channel (FC), Fibre Channel over Ethernet (FCoE), mixed architecture networks, and the like. These data centers may include several other devices (cabling, routers, and the like) in addition to the storage devices. Additionally, in some examples, the data centers 160-180 may be virtualized environments. Additionally, although only a few data centers 160-180 are shown, multiple data centers may be coupled via the network 150 and / or further networks.
[0042] In some examples, the controller 190 may communicate with the computing devices in the data centers 160-180 to 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 a memory 192 that includes data 194 and instructions 196, similar to the client 110 described above. The controller 190 may be configured to redistribute or repartition stored data among the computing devices in the data centers 160-180.
[0043] The clients 110, data centers 160-180, and controller 190 may be able to communicate directly and indirectly, such as through the network 150. For example, using Internet sockets, the clients 110 may connect to services running on remote servers via the Internet Protocol Suite. The servers may set up listening sockets that may accept initiating connections to send and receive information. The network 150 and intervening nodes may include a variety of configurations and protocols, including the Internet, the World Wide Web, intranets, virtual private networks, wide area networks, local networks, private networks using one or more company-proprietary communications protocols, Ethernet, WiFi (e.g., 702.71, 702.71b, g, n, or other such standards), RPC, HTTP, and various combinations of the above. Such communications may be facilitated by devices capable of transmitting data to and from other computers, such as modems (e.g., dial-up, cable, or fiber optic) and wireless interfaces.
[0044] Client 110 may request access to data stored in computing devices of data centers 160-180. Such requests may be processed by controller 190 and / or one or more of the computing devices in data centers 160-180. In some examples, a response to a request may include or require manipulation of the data, such as using operations described in more detail herein.
[0045] FIG. 2B is a block diagram illustrating an example system having one or more computing devices 200 for performing a shuffle operation, according to the present disclosure. Computing device 200 may be included in a distributed data processing system, such as a computing device or controller 190 of one of data centers 160-180 as shown in FIG. 2A. Computing device 200 may be configured to perform complex queries (such as "JOIN" and "GROUP BY" operations) on large amounts of data by repartitioning the data. Such operations may be performed in response to queries. In some examples, these queries may be received by a client computing device. In some examples, these queries may be required to execute other instructions or queries received from a client computing device.
[0046] Data in a distributed data processing system may be stored temporarily (such as in a distributed in-memory file system or on disk, or any combination of the two). Data may come from several data sources A1-A N Some data sinks from B1 to B N These 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 a virtual machine (such as virtual machines 166-167 hosted by data centers 160-180 in FIG. 2A).
[0047] Computing device 200 may include one or more processors 210, servers, shards, cells, etc. It should be understood that each computing device may include any number of processors or computing devices, and the number of such devices in a computing device may change over time (e.g., as hardware is removed, replaced, upgraded, or expanded).
[0048] Computing device 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 other types of storage devices). Computing device 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 network (SAN), Fibre Channel (FC), Fibre Channel over Ethernet (FCoE), mixed architecture networks, etc. In addition to storage devices, computing device 200 may include a number of other devices, such as communication device 250 (cabling, routers, etc.) to enable input and output between computing devices.
[0049] The memory 220 of each computing device can store information accessible by the one or more processors 210, such as data 230 received at or generated by the computing device 200 and instructions 240 executable by the one or more processors 210. Includes 40.
[0050] Data 230 is the source A1 to A N and Sync B1~B N The shuffle log 232 may include a shuffle log that tracks shuffle operations between the data segments 234, 236 that are shuffled in the shuffle operation. The shuffle log 232 may include details of the data segments 234, 236 that are shuffled in the shuffle operation, such as metadata for the individual data segments 238, including information about the segment length and commit status for each segment. Conceptually, the shuffle data may be a representation as a mapping between sources and their respective destination sinks.
[0051] As described in further detail below, a shuffle operation may be divided into multiple passes, from a first pass through an Nth pass. Thus, the data segment details are shown stored separately in the example shuffle log 232 of FIG. 2B. Tracking details separately for each pass may help manage storage of the data segment details 234, 236 and metadata 238. For example, once a first pass is completed and the data is stored in its destination sink's log file, the first pass details 234 may be flushed from memory 220 even if a subsequent pass is in progress. In other examples, there may be overlap between the shuffle log 232 and the sink's data log.
[0052] The instructions 240 may include a shuffle control program 242 configured to control the operation of the data shuffle. The instructions 240 may further include a shuffle log flush program 244 configured to manage storage of data segment details 234, 236 and metadata 238 in the shuffle log 232. The above examples of stored data and programs are described in further detail below.
[0053] Exemplary Methods 3 is a flow diagram 300 illustrating an example multi-pass shuffle that shuffles data from several sources to several sinks. The operations in this flow diagram are performed by determining the storage locations of the shuffled data (sources A1 to A2). N and Sync B1~B N 2B ) in communication with a processor (e.g., one or more processors 210 in FIG. 2B ) of the computing device 200 .
[0054] A first pass of the data may be performed at block 310. The first pass may include moving data from a first set of sources to a first set of sinks. Then, a second pass of the data may be performed at block 320. The second pass may include moving data from a second set of sources to a second set of sinks, which may correspond to the first set of sinks.
[0055] For example, Figure 4 illustrates an example of a data distribution scheme and setup where data is shuffled using a shuffle operation in a series of two passes. The shuffle operation is split into two separate passes, a first pass from a first source 400 to a first sink 410, and a second pass from a second source 420 corresponding to the first sink 410 to a second sink 430. In the first pass, each of the first sinks 410 receives a segment of data from three different first sources 400 of the first sources 400. For example, sink 411 receives data from each of sources 401, 402, and 403. In another example, sink 418 receives data from each of sources 401, 402, and 406. Each of the sinks is mapped to the source from which it receives data, so there are a total of 24 mappings between first sinks and first sources in the first pass of the shuffle in Figure 4, i.e., three mappings for each of the eight sinks. In the second path, each of the second sinks 430 receives data from one of the second sources 420, which may correspond to the second sink 410. For example, sinks 431 and 43 2 receives data from source 421. For example, sinks 445 and 446 each receive data from source 418. Because each of the sinks maps only to the source from which it receives data, there are only 16 total mappings between the second sink and the second source in the second pass of the shuffle of Figure 4, i.e., one mapping for each of the 16 sinks. In total, the total number of mappings tracked during the two-pass shuffle is 40, i.e., 24 mappings in the first pass and 16 mappings in the second pass, which is fewer than the total of 64 mappings of the same shuffle if performed as a single pass.
[0056] As the number of sources and sinks involved in a shuffle operation increases, the benefit 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 must read data from a large number of sources (e.g., 10,000 sources). This would require a total of 10,000 x 100,000 = 1 billion mappings between sources and sinks. Even if each sink reads from 1,000 sources, it would still need to keep track of 100 million mappings. Introducing a second pass allows data to be passed from the sources to a small initial subset of sinks (such as 1,000 sinks) first, and then the data of each of the 1,000 sinks can be divided among the 100 sinks separately. In the first pass, if each of the 1,000 sinks reads data from 10,000 or 1,000 of the 100,000 sources, the total number of mappings would be 10 million or 1 million, respectively. In the second pass, each of the 100,000 sinks would map to a single source for a total of 100,000 mappings. Thus, the total number of mappings tracked in a two-pass shuffle would be 10.1 million mappings when using 10,000 intermediate sinks, or 1.1 million mappings when using 1,000 intermediate sinks. This number of mappings is significantly less than the 1 billion or 100 million mappings in the single-pass scenario. Experiments suggest that a shuffle operation using 1,000 intermediate sinks to shuffle about 2 TiB of data can be at least twice as fast as the same operation performed without intermediate sinks.
[0057] The above example in FIG. 4 illustrates one such two-pass shuffle, where the second pass is referred to as “sink splitting.” In sink splitting, 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 a multi-pass shuffle may enable the use of fewer sinks to perform other previous passes of the multi-pass shuffle. As can be seen from the above example scenario, the introduction of sink splitting as a subsequent pass of the shuffle operation can significantly reduce the overhead in the previous passes, since there are much fewer intermediate sinks that need to be mapped to and read data from multiple sources. The introduction of sink splitting can also significantly reduce the overhead in the final pass, since each of the final sinks is mapped to and reads data from only one source.
[0058] In the above example, the sink of one path is said to "correspond" to the source of the next path. This correspondence can be such that the sink of one path is the same as the source of the next path, meaning that their addresses are the same. Alternatively, the address of the sink can be different from the address of the source of the next path, but all of the sink's data can be moved to the address of the corresponding source of the next path.
[0059] A multi-pass shuffle may include further operations (a third pass, a fourth pass, etc.) In the example multi-pass shuffle of FIG. 3, passes are shown to be performed up to an Nth pass. In particular, at block 330, an N-1th pass of the data may be performed. The N-1th pass may include moving data from an N-1th set of sources, which may correspond to an N-2th set of sinks, to an N-1th set of sinks. Additionally, at block 340, an Nth final pass of the data may be performed. The Nth pass may include moving data from an Nth set of sources, which may correspond to an N-1th set of sinks, to an Nth set of sinks.
[0060] The value of N may vary depending on the amount of data to be shuffled, the purpose of the shuffle operation, and the particular type of shuffle operation being performed. For example, for the sink split shown in the example of Figure 4, it may be sufficient to have a relatively small number of passes (such as two passes). For other types of shuffle operations, it may be beneficial to split the operation into three or more passes.
[0061] 5 illustrates an example of a "butterfly" shuffle distribution scheme. In a butterfly, a limited number of sources are paired with a limited number of sinks, and then data from these sources is shuffled between the paired sinks. Thus, in each pass, all data is shuffled, but in separate chunks. By introducing multiple butterfly passes through the operation, it becomes possible to pair shuffled data from each separate chunk with data from other separately shuffled chunks.
[0062] In the example of Figure 5, the shuffle operation includes a first pass from a first source 500 to a first sink 510, a second pass from a second source 520 (corresponding to the first sink 510) to a second sink 530, and a third pass from a third source 540 (corresponding to the second sink 530) to a third sink 550. In the first pass, each of the first sinks 510 receives a segment of data from one of the first sources 500. For example, sink 511 receives data from source 501, sink 513 receives data from source 502, sink 515 receives data from source 503, and sink 517 receives data from source 504. In each subsequent pass, each sink in the pass receives segments of data from two sources that received segments from another source in the previous pass. For example, in the second path, the second sink 531 receives data segments from each of the second source 521, which received data from the first source 501 in the previous first path, and the second source 522, which received data from the first source 502 in the previous first path. The sink 535 receives data segments from each of the second source 525, which received data from the first source 503 in the previous first path, and the second source 526, which received data from the first source 504 in the previous first path. In yet another example, in the third path, each of the third sinks 551 and 552 receives data segments from each of the third source 541, which received data from the second sources 521 and 522 in the previous second path, and the third source 542, which received data from the second sources 552 and 526 in the previous second path.
[0063] Although the example of Figure 5 shows only the first, second and third passes, one skilled in the art will readily appreciate that the operation may continue as passes are added. In the example of Figure 5, each pass is shown as having only eight sources and eight sinks, which is enough for each final sink 550 to contain a data segment from each of the first sources 501, 502, 503 and 504. As the number of sources and sinks increases, it may be necessary to add more passes to the butterfly shuffle or increase the complexity of each shuffle operation.
[0064] The use of the "butterfly" shuffle is particularly beneficial when data is distributed from many sources. For example, to distribute data from 1,000,000 sources to 2,000,000 sinks in a single pass, each sink must read data from many sources. For example, if each sink reads from 10,000 sources, the shuffle would require a total of 10,000 x 2,000,000 = 20 billion mappings between sources and sinks. Even if each sink reads from 1,000 sources, it would still need to keep track of 2 billion mappings. Even if each sink reads from 8 sources, as in the example of Figure 5, this configuration would still have to keep track of 16 million mappings (8 mappings for each of the 2 million sinks). By introducing the initial split as the first pass within the multi-pass butterfly shuffle operation, it is possible to initially pass the data to 2,000,000 sinks, and the number of mappings between sources and sinks will be minimal, i.e., 2,000,000 mappings or one source for each sink. Then, in each subsequent pass, each sink can be mapped to two sources, resulting in a total of 4,000,000 mappings in the second pass, another 4,000,000 mappings in the third pass, and so on for each subsequent pass. In total, for the three passes shown in FIG. 5, the total number of mappings between sources and sinks that must be tracked is 10 million mappings, significantly less than the 10 billion or 1 billion mappings, respectively, and even less than the 16 million mappings required in the exemplary single-pass scenario above. Thus, the overhead in each pass of the shuffle operation can be significantly reduced. The overhead in the first pass is reduced because it is a split, and the overhead in subsequent passes is reduced because each pass requires quadratically less overhead than a single-pass shuffle between 1,000,000 sources and 1,000,000 sinks.In other words, the total number of shuffles performed in each pass grows linearly, but the total amount of processing for the shuffles collectively decreases quadratically.
[0065] In the above example of sync splitting shown in Figure 4, each pass is shown to include a single operation instead of operations performed independently. In other examples, the number of operations performed in a single given pass of a multi-pass shuffle operation may be more than one. For example, one skilled in the art will recognize that the individual butterfly shuffles shown in Figure 5 may be performed independently of each other, resulting in multiple operations in each of the second and third passes.
[0066] Furthermore, in the butterfly shuffle example in Figure 5, the number of independent shuffles remains constant from one pass to the next. In other examples, the number of independent operations performed in each pass may vary from pass to pass.
[0067] FIG. 6 illustrates an example of a “shuffle-split” distribution scheme involving multiple sink splitting, where the number of splitting operations performed in each pass increases from one pass to the next. In particular, in the example of FIG. 6, in a first pass from a first source 600 to a first sink 610, data of two sources 601 and 602 are shuffled among four sinks 611, 612, 613, and 614. In a second pass from a second source 620 corresponding to the first sink 610 to a second sink 630, each source is split into two sinks. For example, data of source 621 is split between sinks 631 and 632, data of source 622 is split between sinks 633 and 634, data of source 623 is split between sinks 635 and 636, and data of source 624 is split between sinks 637 and 638. In the third path from the third source 640 corresponding to the second sink 630 to the third sink 650, each source again has two sinks. For example, data of source 641 is split between sinks 651 and 652, data of source 642 is split between sinks 653 and 654, data of source 643 is split between sinks 655 and 656, and data of source 644 is split between sinks 657 and 658.
[0068] Additionally, the shuffle operation of the second pass is bisected or split into two independently performed operations, such that the splitting of the data at sources 621 and 622 is managed in a first operation 682, and the splitting of the data at sources 623 and 624 is managed in a second separate operation 684. Similarly, the sink of each given independent operation of the second pass is bisected into two separate operations of the third pass. For example, the splitting of the data at sources 641 and 642 is managed in a first operation 692, and the splitting of the data at sources 643 and 644 is managed in a second separate operation 694. Similarly, the data split in operation 684 of the second pass is then bisected into two separate split operations 696, 698 in the third pass.
[0069] In the example of Figure 6, the number of division operations increases by a factor of 2 from one pass to the next. Thus, the "division factor" of this shuffle division is said to be 2. In other examples, the number of independent operations may increase by a factor greater than 2 (e.g., 3x, 4x, 5x, 8x, 10x, etc.).
[0070] Although the total number of mappings between sources and sinks cannot be reduced by treating a path as multiple separate operations, the use of separate operations allows the use of multiple shuffle logs for the same path. This allows the overall size of each shuffle log to be kept small. As the number of sources and sinks increases and the amount of metadata tracked during a shuffle operation increases, it may be beneficial to split the metadata into separate shuffle logs. For example, with further reference to FIG. 6, a processor (such as one or more processors 210 shown in the example of FIG. 2B) controlling the operation of the second path from the second source 620 to the second sink 630 may control operations 682 and 684, which are processed sequentially or simultaneously, thus improving control over the bandwidth and timing of the shuffle operations.
[0071] For example, a first pass shuffling data from 10,000 sources to 20,000 sinks could be followed by a second pass with two independent shuffles from 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 could be bisected into two separate shuffle logs. This would be particularly useful if the shuffle operation includes a much larger number of sinks than the number of sources, because the data could be fully shuffled in an earlier pass of the operation before the number of sinks is increased, and then split into several sinks according to the independent operations managed by separate shuffle logs. In this way, each shuffle log would only contain metadata for sinks that read blocks of its own operation and not blocks of other independent operations of the pass.
[0072] Additionally, if operations are processed in parallel or simultaneously, and if one operation completes before the other, the metadata from the shuffle log of a completed operation may be flushed without waiting for other separate operations to also complete. To illustrate, if the shuffle log of a single "sink split" operation involving 100,000 uniformly distributed sinks contains 50 GiB (gibibytes), the flusher will flush, on average, about 0.5 MiB (mebibytes) of data per completed sink. However, if the same shuffle log data is flushed over the course of 100 separate "sink split" operations (each involving 1,000 sinks), the shuffle log will be flushed over 100 GiB (gibibytes) of data per completed sink. If divided by , the flusher will flush about 50MiB of data on average per completed sink.
[0073] Figure 7 illustrates an exemplary data distribution scheme that combines concepts from both the butterfly shuffle from Figure 5 and the shuffle split from Figure 6. In the example of Figure 7, a first pass is shown in which data from a first source 700 is written to a first sink 710, a second pass is shown in which data from a second source 720 corresponding to the first sink 710 is written to a second sink 730, and a third pass is shown in which data from a third source 740 corresponding to the second sink 730 is written to a third sink 750.
[0074] In each pass, each sink may receive data from two sources. Additionally, in each pass, the sinks may be divided into groups, whereby each group of sinks receives data from the same two sources. In this manner, the shuffle operation for each group of sinks and their corresponding two sources may be treated as an independent operation with its own shuffle log that is limited to the metadata of the data written to a 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 shuffles between sources 723 and 724 and sinks 735, 736, 737, and 738 may be managed independently in their own shuffle logs that contain only the metadata of the data written to sinks 735, 736, 737, and 738.
[0075] In the example of Figure 7, the number of independent operations performed from each pass to the next increases by a factor of two: the first pass might include two operations, the second pass might include four operations, and the third pass might include eight operations (all not shown).
[0076] It can also be seen from the example of FIG. 7 that each third sink 750 may receive data from each of the first sources 700. For example, each third sink 751 may include data of a third source 741, which in turn corresponds to a second sink 735. The second sink 735 may include data from each of the corresponding second sources 723 and 724, which correspond to the first sinks 712 and 716, respectively. The first sink 712 may include data from each of the first sources 701 and 702, and the first sink 716 may include data from each of the first sources 703 and 704. Thus, the data at the third sinks 751 and 752 may be traced back to each of the first sources 700.
[0077] In other words, the example of Figure 7 can be thought of like a partition shuffle in that the number of independent operations can increase from one pass to the next, and like a butterfly shuffle in that sink data from separate sources in previous passes can be combined in a single operation in a subsequent pass, allowing yet another layer of complexity and robustness to be added to the shuffle operation to improve the results of queries applied to the collected data.
[0078] The above examples in Figures 4, 5, 6 and 7 illustrate various types of passes and shuffle operations that may be performed to reduce allocation amounts as the amount of data, source, sink, shuffle, or any combination thereof increases. One or more processors (such as processor 210 in Figure 2B) may be programmed to track the progress of the shuffle operations and dynamically determine the type of pass to perform based on the tracked progress. Auto operators or plan adapters associated with various operations, such as "join" or "group shuffle," may dynamically determine whether to initiate a multi-pass shuffle and, if so, what type of operation to apply. For example, the autojoin plan adapter may decide between initiating a "shuffle split" if the data is not yet consistently distributed on both sides of the join, and initiating a "sink split" if the data is already consistently distributed.
[0079] In some examples, shuffle splitting may be initiated by one or more processors (such as processor 210 of FIG. 2B) in response to the processor determining that a monitored value exceeds a predetermined threshold. This monitored value may be the number of sinks utilized in a given pass, whereby sinks are split into separate operations until the number of sinks in each operation is below the threshold. Alternatively or additionally, this monitored value may be the number of mappings between sources and sinks in a given pass, whereby sinks are split into separate operations until the number of mappings between sources and sinks in each separate operation is below the threshold.
[0080] The above example illustrates an example of a multi-pass shuffle where each pass is treated as a separate operation. Other examples may combine passes into a single shuffle operation while maintaining the benefits of reduced overhead and smaller metadata logs. Additionally, the above example treats the sinks of each pass as separate from one another. In other examples, there may be overlap between the sinks of each pass. For example, in an example shuffle operation where 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, which may be a subset of the sinks of the subsequent pass, and so on.
[0081] 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, then the 1,000 sinks in the first pass may be 1,000 of the 100,000 sinks used in a second pass. In such a case, a partitioning scheme may be utilized to prevent the first source from writing to any of the remaining 99,000 sinks that are not the first sink. One effect of such a partitioning scheme is that it transforms the multiple shuffle operations of the above example into essentially a single shuffle operation from one set of pre-specified sources to one set of pre-specified sinks.
[0082] Figures 8 and 9 show example partitioning schemes that may be used to partition the passes of such a single shuffle operation. Although the examples in Figures 8 and 9 are limited to the first and second passes, it should be understood that the schemes described herein can be repeated in shuffle operations having more than two passes.
[0083] The example of FIG. 8 illustrates a “deferred partitioning” scheme in which a first pass 810 is completed before a second pass 820 begins. The first pass 810 may include one or more processors (such as one or more processors 210 of FIG. 2B ) designating a first set of sources (812), designating a first set of sinks (814), and blocking a second set of sinks (816). While data is being written from the first set of sources to the first set of sinks according to instructions from the one or more processors (818), the second set of sinks may remain blocked from receiving any of the shuffled data. This may ensure that all shuffled data in the first pass is written only to the first sink and not to the second sink. Once the first pass 810 is fully completed, the one or more processors may begin operation of the second pass 820, thereby unblocking the second set of sinks (822). Data from the second sources (which may correspond to the first sinks) may then be written to the first set of sinks (823). The data may then be written to a second set of sinks 824. Once all of the data has been written to the second set of sinks, the second pass is complete.
[0084] An alternative example of FIG. 9 illustrates a “pipelined deferred partitioning” scheme in which a second pass 920 may begin before a preceding first pass 910 is completed. The first pass 910 may include one or more processors specifying a set of first sources (812), specifying a set of first sinks (814), and specifying a set of second sinks using a pipelined approach (816). The pipelined approach may use a partitioning scheme whereby none of the first sources write to a sink that the first sink with the deferred partitioning writes to. Once writing to any one of the first sinks is completed, the second pass 920 may begin even if writing to the other first sinks is not yet completed. In the second pass 920, the second source corresponding to the completed first sink may write data to the second sink according to the partitioning scheme (922). Upon completion of a write operation to each primary sink, a write operation for another corresponding secondary source may begin, which may continue until the entire second pass 920 is completed.
[0085] In some examples, the start of a second pass of a multi-pass shuffle may be conditional on data already being flushed from the shuffle log of the first shuffle. Such conditioning may ensure that the shuffle log of a multi-pass shuffle does not take up unnecessary space, and may improve the efficiency of the flush operation. In other examples, completing a shuffle operation using multiple passes may, in itself, eliminate the need to flush metadata from the entire shuffle log, because reducing the total number of sink destinations for any given segment (as achieved with a multi-pass shuffle) also reduces the total amount of metadata that needs to be stored for each segment.
[0086] In some examples, the passes of a multi-pass shuffle operation may be pipelined. This may increase the quota usage of one or more processors, but has the advantage of improving performance. In such examples, to avoid backlogs in the pipeline, shuffles that are performed in passes that are earlier in time may be given higher priority (e.g., given ample quota). The one or more processors may receive instructions from a scheduler program to distribute the quota appropriately among the pipelined shuffles and passes.
[0087] In some examples, a partitioning scheme of a multi-pass shuffle operation may repartition data to all available sinks in one pass, and then compress this data to a subset of available sinks in a subsequent pass. Such a partitioning scheme can optimize the reading of the sinks in subsequent passes. In particular, if the sink addresses used are contiguous, and if the shuffle log maps a subset of available sinks to non-overlapping address ranges, the lookup operation for the sinks in subsequent passes will be as simple as a given address range. As a result, the mapping between sources and sinks does not take up space, because the sources that a sink is designated to read from can be determined based on the address of the sink itself, and there is no need to store a separate mapping between sink and source addresses.
[0088] In the above example, each path may use a hash partitioning function to direct data from the source to their respective destination sink. The hash partitioning function used in each path may be correlated to the hash function of the previous path. Similarly, In the case of a "shuffle split," in which separate shuffle operations are performed separately in a single pass and split off 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.
[0089] The above example solves a problem that typically arises when attempting to execute complex queries on amounts of data larger than about 10 TiB (e.g., tens of TiB of data). Such amounts of data typically require the use of 10,000 or more sinks, thus creating scaling issues for conventional single-pass shuffle operations. Those skilled in the art will recognize that an advantage of the multi-pass shuffle operations described herein is that they can be applied to smaller amounts of data. That is, even if the conventional single-pass shuffle operations can be used to process those smaller amounts of data, the multi-pass shuffle operations described herein can improve efficiency and reduce the overall cost and overhead of the operations. Indeed, some experiments have suggested that the overall speedup for input data amounts as small as 1 TiB is greater than the speedup for input data amounts as large as 10 TiB.
[0090] 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 technology. It is thus to be understood that numerous modifications may be made to these exemplary embodiments and other configurations may be devised without departing from the spirit and scope of the technology as defined by the appended claims.
[0091] Most of the above alternatives are not mutually exclusive and can be implemented in various combinations to realize unique advantages. Since these and other variations and combinations of the above features can be utilized without departing from the subject matter defined by the claims, the above description of the embodiments should be construed as illustrative rather than limiting the subject matter defined by the claims. As an example, the above operations need not be performed in the exact order described above. Rather, various steps may be processed in different orders, such as reversed, or simultaneously. Also, steps may be omitted unless otherwise indicated. Also, the provision of examples and clauses such as "including", "including", etc. described herein should not be construed as limiting the subject matter of the claims to specific examples, but rather, these examples are intended to illustrate only one of many possible embodiments. Moreover, the same reference numbers in different drawings may identify the same or similar elements.
Claims
1. 1. A method for repartitioning data in a distributed network, comprising: The method further comprises: one or more processors performing 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; the one or more processors performing a second pass of the data set from a plurality of second sources to a plurality of second sinks, each of the plurality of first sinks corresponding to one of the plurality of second sources, each second sink collecting data from one or more of the second sources; performing the first and second passes causes one or more second sinks to repartition the data set such that the one or more second sinks collect data originating from two or more of the first sources.
2. The method of claim 1 , wherein a quantity of the plurality of first sinks is greater than a quantity of the plurality of first sources.
3. The method of claim 2 , wherein each primary sink collects data from two or more of the primary sources.
4. The method of claim 3 , wherein a quantity of the plurality of second sinks is greater than a quantity of the plurality of second sources.
5. 2. The method of claim 1, further comprising: performing N passes, N being a number having a value greater than two, for each given pass, a plurality of sinks collecting data from one or more of a plurality of sources, each source corresponding to a sink of a previous pass, and performing the N passes causes the data set to be repartitioned such that one or more of the Nth sinks collect data originating from two or more of the first sources of the first sources.
6. 6. The method of claim 5, wherein, for at least one of the N paths, each sink of the at least one path collects data from two or more of the sources of the at least one path, each of the two or more sources of the at least one path including data originating from another source of a immediately preceding path.
7. 7. The method of claim 6, wherein for at least one other path of the N paths, each sink of the at least one other path collects data from two or more of the sources of the at least one other path, each of the two or more sources of the other path including data originating from another source of a immediately preceding path.
8. The method of claim 7 , wherein the at least one path and the at least one other path are consecutive paths of the N paths.
9. Each of the plurality of first sinks is a corresponding one of the plurality of second sources, and the method further comprises: determining completion of the first pass; and commencing the second pass upon determining that the first pass is complete.
10. Each of the plurality of first sinks is a corresponding one of the plurality of second sources. and the method further comprises: and designating each of the plurality of first sinks and the plurality of second sinks prior to the first pass, the designating the plurality of second sinks causing data from the plurality of first sources not to be collected at the plurality of second sinks during the first pass, the method further comprising:
2. The method of claim 1, comprising designating one or more second sinks to collect from the at least one first sink when the at least one first sink has completed collection from one or more of the first sources and prior to completion of the first pass.
11. 2. The method of claim 1, wherein the data set is 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 is correlated to the first hash function.
12. 2. The method of claim 1, wherein the identities of the plurality of second sinks are consecutive, and for each second sink, the method comprises calculating a range of identities of the second sources from which the second sink collects based on the identities of the second sink.
13. 2. The method of claim 1, further comprising one or more processors flushing a shuffle log of the first pass.
14. 14. The method of claim 13, further comprising performing the second pass on segments of the data set that were flushed from the shuffle log in the first pass prior to completing the flushing step.
15. 15. The method of claim 14, wherein each of the multiple shuffles is performed in parallel by the one or more processors, and data contained in both the first data log and the second data log is flushed from the first and second portions of the second source in parallel.
16. 2. The method of claim 1 , wherein performing the second pass comprises performing a plurality of shuffle operations, a first portion of the second source being included in a first data log and a second portion of the second source being included in the second data log.
17. 1. A system for repartitioning data in a distributed network, comprising: one or more processors; one or more storage devices in communication with the one or more processors, the one or more storage devices containing instructions that cause the one or more processors to: and configured to cause the one or more processors to perform 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, the instructions further comprising: configured to perform a second pass of the data set from a plurality of second sources to a plurality of second sinks, each of the plurality of first sinks corresponding to one of the plurality of second sources, each second sink collecting data from one or more of the second sources; The first and second paths are configured to transfer the data such that one or more second sinks collect data originating from two or more of the first sources. This causes the system to repartition the data set.
18. 20. The system of claim 17, wherein each primary sink collects data from two or more of the primary sources, and a quantity of the plurality of secondary sinks is greater than a quantity of the plurality of secondary sources.
19. 20. The system of claim 17, wherein the instructions are configured to cause the one or more processors to perform N passes, N being a number having a value greater than two, and for each given pass, a plurality of sinks collect data from one or more sources of a plurality of sources, each source corresponding to a sink of a previous pass, and wherein performing the N passes causes the one or more Nth sinks to repartition the data set such that one or more Nth sinks collect data originating from two or more first sources of the first sources.
20. For at least one path among the N paths, each sink of the at least one path collects data from two or more of the sources of the at least one path; each of the two or more sources of the at least one pass includes data originating from another source of a immediately preceding pass; For at least one other path of the N paths, each sink of the at least one other path collects data from two or more of the sources of the at least one other path; each of the two or more sources of the at least one other path includes data originating from another source of a immediately preceding path; 20. The system of claim 19, wherein the at least one path and the at least one other path are consecutive paths of the N paths.