@Override
      protected void setup(Context context) throws IOException, InterruptedException {
        id = Bytes.toBytes("Job: " + context.getJobID() + " Task: " + context.getTaskAttemptID());
        this.connection = ConnectionFactory.createConnection(context.getConfiguration());
        instantiateHTable();
        this.width = context.getConfiguration().getInt(GENERATOR_WIDTH_KEY, WIDTH_DEFAULT);
        current = new byte[this.width][];
        int wrapMultiplier = context.getConfiguration().getInt(GENERATOR_WRAP_KEY, WRAP_DEFAULT);
        this.wrap = (long) wrapMultiplier * width;
        this.numNodes = context.getConfiguration().getLong(GENERATOR_NUM_ROWS_PER_MAP_KEY,
          (long) WIDTH_DEFAULT * WRAP_DEFAULT);
        if (this.numNodes < this.wrap) {
          this.wrap = this.numNodes;
        }
        this.multipleUnevenColumnFamilies = isMultiUnevenColumnFamilies(context.getConfiguration());
        this.numWalkers =
          context.getConfiguration().getInt(CONCURRENT_WALKER_KEY, CONCURRENT_WALKER_DEFAULT);
        this.walkersStop = false;
        this.conf = context.getConfiguration();

        if (multipleUnevenColumnFamilies) {
          int n = context.getConfiguration().getInt(BIG_FAMILY_VALUE_SIZE_KEY, 256);
          int limit =
            context.getConfiguration().getInt(ConnectionConfiguration.MAX_KEYVALUE_SIZE_KEY,
              ConnectionConfiguration.MAX_KEYVALUE_SIZE_DEFAULT);

          Preconditions.checkArgument(n <= limit, "%s(%s) > %s(%s)", BIG_FAMILY_VALUE_SIZE_KEY, n,
            ConnectionConfiguration.MAX_KEYVALUE_SIZE_KEY, limit);

          bigValue = new byte[n];
          rand.nextBytes(bigValue);
          LOG.info("Create a bigValue with " + n + " bytes.");
        }

        Preconditions.checkArgument(numNodes > 0, "numNodes(%s) <= 0", numNodes);
        Preconditions.checkArgument(numNodes % width == 0, "numNodes(%s) mod width(%s) != 0",
          numNodes, width);
        Preconditions.checkArgument(numNodes % wrap == 0, "numNodes(%s) mod wrap(%s) != 0",
          numNodes, wrap);
      }
Some ASCII art time:
<p>
[ . . . ] represents one batch of random longs of length WIDTH

<pre>
               _________________________
              |                  ______ |
              |                 |      ||
            .-+-----------------+-----.||
            | |                 |     |||
first   = [ . . . . . . . . . . . ]   |||
            ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^     |||
            | | | | | | | | | | |     |||
prev    = [ . . . . . . . . . . . ]   |||
            ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^     |||
            | | | | | | | | | | |     |||
current = [ . . . . . . . . . . . ]   |||
                                      |||
...                                   |||
                                      |||
last    = [ . . . . . . . . . . . ]   |||
            ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^_____|||
            |                 |________||
            |___________________________|
</pre>
hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java