Class IndexHashGrouping

    • Constructor Detail

      • IndexHashGrouping

        public IndexHashGrouping​(int index)
    • Method Detail

      • objectToIndex

        public static int objectToIndex​(Object val,
                                        int numPartitions)
      • chooseTasks

        public List<Integer> chooseTasks​(int fromTask,
                                         List<Object> values)
        Description copied from interface: CustomStreamGrouping
        This function implements a custom stream grouping. It takes in as input the number of tasks in the target bolt in prepare and returns the tasks to send the tuples to.
        Specified by:
        chooseTasks in interface CustomStreamGrouping
        values - the values to group on