public static byte[] getRandBinary(Random r, int len){
    final byte[] bytes = new byte[len];
    for (int j = 0; j < len; j++){
      bytes[j] = Byte.valueOf((byte) r.nextInt());
    }
    return bytes;
  }
Generate object inspector and random row object[].
ql/src/test/org/apache/hadoop/hive/ql/exec/vector/VectorRandomRowSource.java