1
2 package org.galagosearch.tupleflow.execution;
3
4 /***
5 * <p>This specifies how input data should be assigned to outputs
6 * in a TupleFlow connection.</p>
7 *
8 * <p>If a connection output has the "Combined" assignment, that means
9 * that each stage instance reading that output will recieve all of the
10 * input data. This is the right kind of assignment to use when writing
11 * out a single index file, for instance, where you want all the data
12 * that was genereated by lots of parsing stage instances.</p>
13 *
14 * <p>The "Each" mode means that every output stage instance gets
15 * exactly one of the output streams. Notice that a connection can be
16 * hashed, so this doesn't necessarily imply a 1-to-1 mapping between
17 * inputs and outputs. This is what you want to use when you're
18 * trying to distribute data broadly across a cluster of machines.</p>
19 *
20 * <p>The "One" mode is not yet supported. The "One" mode, when implemented,
21 * will allow each different named output to recieve exactly one share of the
22 * input data. The main use case for this is to support building document-distributed
23 * indexes.</p>
24 *
25 * @see org.galagosearch.tupleflow.execution.Connection
26 * @see org.galagosearch.tupleflow.execution.Job
27 * @author trevor
28 */
29 public enum ConnectionAssignmentType {
30 Each {
31 @Override
32 public String toString() {
33 return "each";
34 }
35 },
36 One {
37 @Override
38 public String toString() {
39 return "one";
40 }
41 },
42 Combined {
43 @Override
44 public String toString() {
45 return "combined";
46 }
47 }
48 };