public static String getRandString(Random r, int length, boolean isUnicodeOk) {
    return
        !isUnicodeOk || r.nextBoolean() ?
            RandomTypeUtil.getRandString(r, "abcdefghijklmnopqrstuvwxyz", length) :
            RandomTypeUtil.getRandUnicodeString(r, length);
  }
Generate object inspector and random row object[].
ql/src/test/org/apache/hadoop/hive/ql/exec/vector/VectorRandomRowSource.java