public static void main(String args[]) { if (args.length <= 3) { System.err.println("LFC_Host Port TestDirPath num|clean (debug)"); return; } String host = args[0]; String port = args[1]; String path = args[2]; String num = null; if (args.length >= 4) { num = args[3]; } String debug = null; if (args.length >= 5) { debug = args[4]; } LFCServer lfcServer; try { if (debug != null) { LFCServer.getLogger().printLog = true; LFCServer.getLogger().printIOLog = true; } lfcServer = new LFCServer(new URI("lfn://" + host + ":" + port + "/")); } catch (URISyntaxException e) { e.printStackTrace(); return; } if (num != null && num.equals("clean")) { clearAll(lfcServer, path); } else if (num != null) { int n = Integer.parseInt(num); try { // NOTE: mkdir() cannot work. // lfcServer.mkdir(path); for (int i = 0; i < n; i++) { // String dirName = randomString(); // lfcServer.mkdir(path + "/" + dirName); // test(lfcServer, path + "/" + dirName + "/" + randomString()); test(lfcServer, path + "/" + randomString()); } } catch (LFCException e) { e.printStackTrace(); } catch (URISyntaxException e) { e.printStackTrace(); } } }