org.apache.storm.grouping

## Class PartialKeyGrouping.RandomTwoTaskAssignmentCreator

- java.lang.Object
- - org.apache.storm.grouping.PartialKeyGrouping.RandomTwoTaskAssignmentCreator

- All Implemented Interfaces:
    Serializable, PartialKeyGrouping.AssignmentCreator
  Enclosing class:
    PartialKeyGrouping

      public static class PartialKeyGrouping.RandomTwoTaskAssignmentCreator
      extends Object
      implements PartialKeyGrouping.AssignmentCreator

  This implementation of AssignmentCreator chooses two arbitrary tasks.

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RandomTwoTaskAssignmentCreator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int[]` | `createAssignment(List<Integer> tasks, byte[] key)` Creates a two task assignment by selecting random tasks.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RandomTwoTaskAssignmentCreator

          public RandomTwoTaskAssignmentCreator()

  - ### Method Detail

    - #### createAssignment

          public int[] createAssignment(List<Integer> tasks,
                                        byte[] key)

      Creates a two task assignment by selecting random tasks.

      Specified by:
        `createAssignment` in interface `PartialKeyGrouping.AssignmentCreator`

Copyright © 2021 The Apache Software Foundation. All rights reserved.