@@ -0,0 +1,1982 @@
+// Pre-requisite before executing this Java class that createsafiles ann writes bytes to them%0A// export CLASSPATH=%22%60hadoop classpath%60:.%22%0A%0Aimport org.apache.hadoop.fs.*;%0Aimport org.apache.hadoop.fs.permission.FsPermission;%0Aimport org.apache.hadoop.conf.*;%0Aimport java.net.URI;%0Aimport java.io.*;%0Aimport java.util.Random;%0Aimport org.apache.hadoop.fs.Path;%0A%0Apublic class FileCreate %7B%0A%0A  static int entriesPerDir = 400;%0A  static int numThreads = 8;%0A  static String srcDir = %22/vol1/a1%22;%0A%0A  static class CreateThread extends Thread %7B%0A    FileSystem fs;%0A    int myid;%0A%0A    CreateThread(int id, FileSystem mfs) %7B%0A      this.myid = id;%0A      this.fs = mfs;%0A    %7D%0A%0A    // Create files %0A    public void doCreates() %7B%0A      try %7B%0A        byte%5B%5D data = new byte%5B1024 * 1024%5D;%0A        for(int i = 0; i%3E=0; i++)%7B%0A                String mySrcDir = srcDir + %22/%22 + i + %22/%22 + myid;%0A                fs.mkdirs(new Path(mySrcDir));%0A                for (int j = 0; j %3C entriesPerDir; ++j) %7B%0A                        String fname = mySrcDir + %22/file%22 + j;%0A                        FSDataOutputStream fin = fs.create(new Path(fname));%0A                        fin.write(data, 0, data.length);%0A                        fin.close();%0A                %7D%0A        %7D%0A      %7D catch (Exception e) %7B%0A        System.err.println(e);%0A      %7D%0A    %7D%0A%0A    public void run() %7B%0A        doCreates();%0A    %7D%0A  %7D%0A%0Apublic static void main(String args%5B%5D) throws Exception %7B%0A    String uri = %22maprfs:///%22;%0A    Configuration conf = new Configuration();%0A    conf.set(%22fs.default.name%22, uri);%0A    conf.set(%22fs.maprfs.impl%22, %22com.mapr.fs.MapRFileSystem%22);%0A%0A    FileSystem fs = FileSystem.get(URI.create(uri), conf);%0A    fs.mkdirs(new Path(srcDir));%0A%0A    System.out.println(%22Creating files and writing bytes to them.%22);%0A    Thread%5B%5D tid = new Thread%5BnumThreads%5D;%0A    for (int i = 0; i %3C numThreads; ++i) %7B%0A      tid%5Bi%5D = new CreateThread(i, fs);%0A      tid%5Bi%5D.start();%0A    %7D%0A    for (int i = 0; i %3C numThreads; ++i)%0A      tid%5Bi%5D.join();%0A%0A  %7D%0A%7D%0A

Create FileCreate.java