test_class.file: storm/storm-flowmix/src/test/java/org/calrissian/flowmix/core/support/UtilsTest.java
test_class.identifier: UtilsTest
test_case.body: @Test
    public void test_buildKeyIndexForEvent_groupByMultiField() {
      String hash = buildKeyIndexForEvent("one", buildTestEvent(), Arrays.asList(new String[]{"key1", "key2"}));
      assertEquals("onekey1val1val5|key2val2|", hash);
    }
test_case.class_method_signature: UtilsTest.test_buildKeyIndexForEvent_groupByMultiField()
test_case.full_signature: @Test public void test_buildKeyIndexForEvent_groupByMultiField()
test_case.identifier: test_buildKeyIndexForEvent_groupByMultiField
test_case.invocations: buildKeyIndexForEvent buildTestEvent asList assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void test_buildKeyIndexForEvent_groupByMultiField()
focal_class.declarator: registry = LEXI_TYPES
focal_class.modifier: private static final
focal_class.original_string: private static final TypeRegistry<String> registry = LEXI_TYPES;
focal_class.type: TypeRegistry<String>
focal_class.var_name: registry
focal_class.file: storm/storm-flowmix/src/main/java/org/calrissian/flowmix/core/support/Utils.java
focal_class.identifier: Utils
focal_class.class_method_signature: Utils.Utils()
focal_class.full_signature: private  Utils()
focal_class.identifier: Utils
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  Utils()
focal_class.class_method_signature: Utils.buildKeyIndexForEvent(Event event, List<String> groupBy)
focal_class.full_signature: public static String buildKeyIndexForEvent(Event event, List<String> groupBy)
focal_class.identifier: buildKeyIndexForEvent
focal_class.modifiers: public static
focal_class.parameters: (Event event, List<String> groupBy)
focal_class.return: String
focal_class.signature: String buildKeyIndexForEvent(Event event, List<String> groupBy)
focal_class.class_method_signature: Utils.buildKeyIndexForEvent(String flowId, Event event, List<String> groupBy)
focal_class.full_signature: public static String buildKeyIndexForEvent(String flowId, Event event, List<String> groupBy)
focal_class.identifier: buildKeyIndexForEvent
focal_class.modifiers: public static
focal_class.parameters: (String flowId, Event event, List<String> groupBy)
focal_class.return: String
focal_class.signature: String buildKeyIndexForEvent(String flowId, Event event, List<String> groupBy)
focal_class.class_method_signature: Utils.getNextStreamFromFlowInfo(Flow flow, String streamName, int idx)
focal_class.full_signature: public static String getNextStreamFromFlowInfo(Flow flow, String streamName, int idx)
focal_class.identifier: getNextStreamFromFlowInfo
focal_class.modifiers: public static
focal_class.parameters: (Flow flow, String streamName, int idx)
focal_class.return: String
focal_class.signature: String getNextStreamFromFlowInfo(Flow flow, String streamName, int idx)
focal_class.class_method_signature: Utils.hasNextOutput(Flow flow, String streamName, String nextStream)
focal_class.full_signature: public static boolean hasNextOutput(Flow flow, String streamName, String nextStream)
focal_class.identifier: hasNextOutput
focal_class.modifiers: public static
focal_class.parameters: (Flow flow, String streamName, String nextStream)
focal_class.return: boolean
focal_class.signature: boolean hasNextOutput(Flow flow, String streamName, String nextStream)
focal_class.class_method_signature: Utils.exportsToOtherStreams(Flow flow, String streamName, String nextStream)
focal_class.full_signature: public static boolean exportsToOtherStreams(Flow flow, String streamName, String nextStream)
focal_class.identifier: exportsToOtherStreams
focal_class.modifiers: public static
focal_class.parameters: (Flow flow, String streamName, String nextStream)
focal_class.return: boolean
focal_class.signature: boolean exportsToOtherStreams(Flow flow, String streamName, String nextStream)
focal_class.class_method_signature: Utils.getFlowOpFromStream(Flow flow, String stream, int idx)
focal_class.full_signature: public static T getFlowOpFromStream(Flow flow, String stream, int idx)
focal_class.identifier: getFlowOpFromStream
focal_class.modifiers: public static
focal_class.parameters: (Flow flow, String stream, int idx)
focal_class.return: T
focal_class.signature: T getFlowOpFromStream(Flow flow, String stream, int idx)
focal_class.class_method_signature: Utils.getFlowOpFromStream(Map<String, Flow> flows, String flowId, String stream, int idx)
focal_class.full_signature: public static T getFlowOpFromStream(Map<String, Flow> flows, String flowId, String stream, int idx)
focal_class.identifier: getFlowOpFromStream
focal_class.modifiers: public static
focal_class.parameters: (Map<String, Flow> flows, String flowId, String stream, int idx)
focal_class.return: T
focal_class.signature: T getFlowOpFromStream(Map<String, Flow> flows, String flowId, String stream, int idx)
focal_class.class_method_signature: Utils.flowsMap(backtype.storm.tuple.Tuple tuple, Map<String,Flow> flows)
focal_class.full_signature: public static void flowsMap(backtype.storm.tuple.Tuple tuple, Map<String,Flow> flows)
focal_class.identifier: flowsMap
focal_class.modifiers: public static
focal_class.parameters: (backtype.storm.tuple.Tuple tuple, Map<String,Flow> flows)
focal_class.return: void
focal_class.signature: void flowsMap(backtype.storm.tuple.Tuple tuple, Map<String,Flow> flows)
focal_method.body: public static String buildKeyIndexForEvent(Event event, List<String> groupBy) {
          StringBuffer stringBuffer = new StringBuffer();
          if (groupBy == null || groupBy.size() == 0)
              return stringBuffer.toString();  // default partition when no groupBy fields are specified.
  
          //groupBy可以定义多个字段.
          for (String groupField : groupBy) {
              //一条事件Event可以有多个Tuples.
              Collection<Tuple> tuples = event.getAll(groupField);
              SortedSet<String> values = new TreeSet<String>();
  
              if (tuples == null) {
                  values.add("");
              } else {
                  for (Tuple tuple : tuples)
                      values.add(registry.encode(tuple.getValue()));
              }
              stringBuffer.append(groupField + join(values, "") + "|");
          }
          try {
              return stringBuffer.toString();
          } catch (Exception e) {
              return null;
          }
      }
focal_method.class_method_signature: Utils.buildKeyIndexForEvent(Event event, List<String> groupBy)
focal_method.full_signature: public static String buildKeyIndexForEvent(Event event, List<String> groupBy)
focal_method.identifier: buildKeyIndexForEvent
focal_method.invocations: size toString getAll add add encode getValue append join toString
focal_method.modifiers: public static
focal_method.parameters: (Event event, List<String> groupBy)
focal_method.return: String
focal_method.signature: String buildKeyIndexForEvent(Event event, List<String> groupBy)