private Path writeInputFile(final Configuration c) throws IOException {
    SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss");
    Path jobdir = new Path(PERF_EVAL_DIR, formatter.format(new Date()));
    Path inputDir = new Path(jobdir, "inputs");

    FileSystem fs = FileSystem.get(c);
    fs.mkdirs(inputDir);
    Path inputFile = new Path(inputDir, "input.txt");
    // Make input random.
    try (PrintStream out = new PrintStream(fs.create(inputFile))) {
      Map<Integer, String> m = new TreeMap<>();
      Hash h = MurmurHash.getInstance();
      int perClientRows = (this.R / this.N);
      for (int i = 0; i < 10; i++) {
        for (int j = 0; j < N; j++) {
          StringBuilder s = new StringBuilder();
          s.append("tableName=").append(tableName);
          s.append(", startRow=").append((j * perClientRows) + (i * (perClientRows / 10)));
          s.append(", perClientRunRows=").append(perClientRows / 10);
          s.append(", totalRows=").append(R);
          s.append(", clients=").append(N);
          s.append(", flushCommits=").append(flushCommits);
          s.append(", writeToWAL=").append(writeToWAL);
          s.append(", useTags=").append(useTags);
          s.append(", noOfTags=").append(noOfTags);

          byte[] b = Bytes.toBytes(s.toString());
          int hash = h.hash(new ByteArrayHashKey(b, 0, b.length), -1);
          m.put(hash, s.toString());
        }
      }
      for (Map.Entry<Integer, String> e : m.entrySet()) {
        out.println(e.getValue());
      }
    }
    return inputDir;
  }
Write input file of offsets-per-client for the mapreduce job.
@param c Configuration
@return Directory that contains file written.
@throws IOException if creating the directory or the file fails
hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/PerformanceEvaluation.java