Package tachyon.client

Examples of tachyon.client.TachyonFS.createFile()


    }

    for (int k = 0; k < 10; k ++) {
      TachyonURI path =
          new TachyonURI(folderName + TachyonURI.SEPARATOR + folderName.toString().substring(1) + k);
      answer.add(new Pair<Integer, TachyonURI>(tfs.createFile(path), path));
    }
  }

  /**
   * Tells if the results can match the answer
View Full Code Here


  public void getClientsTest() throws IOException {
    int clients = 10;
    mTfs.createFile(new TachyonURI("/0"), 1024);
    for (int k = 1; k < clients; k ++) {
      TachyonFS tfs = mLocalTachyonClusterMultiMaster.getClient();
      tfs.createFile(new TachyonURI(TachyonURI.SEPARATOR + k), 1024);
    }
    List<String> files = TestUtils.listFiles(mTfs, TachyonURI.SEPARATOR);
    Assert.assertEquals(clients, files.size());
    for (int k = 0; k < clients; k ++) {
      Assert.assertEquals(TachyonURI.SEPARATOR + k, files.get(k));
View Full Code Here

      System.out.println("Usage: tfs touch <path>");
      return -1;
    }
    TachyonURI path = new TachyonURI(argv[1]);
    TachyonFS tachyonClient = createFS(path);
    TachyonFile tFile = tachyonClient.getFile(tachyonClient.createFile(path));
    OutputStream out = tFile.getOutStream(WriteType.THROUGH);
    out.close();
    System.out.println(path + " has been created");
    return 0;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.