Package org.apache.hadoop.fs

Examples of org.apache.hadoop.fs.FSDataInputStream.readLine()


    // Load Qrels into a map
    Map<String, Set<String>> qrels = Maps.newHashMap();
    FSDataInputStream qrelsInput = fs.open(new Path(CIKM_QRELS));
    String line;
    while((line = qrelsInput.readLine()) != null) {
      String[] tokens = line.split("\\s+");
      String qid = tokens[0];
      String docid = tokens[2];
      int grade = Integer.parseInt(tokens[3]);
View Full Code Here


    System.gc();

    // Load the output into a Map
    Map<String, Set<String>> saRelOutput = Maps.newHashMap();
    FSDataInputStream saInput = fs.open(new Path(postingOutput.getPath()));
    while((line = saInput.readLine()) != null) {
      if(line.startsWith("<judgment")) {
        String[] tokens = line.split("\"");
        String docid = tokens[3];
        String qid = tokens[1];
View Full Code Here

    System.gc();

    // Compute relative recall of relevant documents
    Map<String, Integer> counter = Maps.newHashMap();
    FSDataInputStream bInput = fs.open(new Path(bloomOutput.getPath()));
    while((line = bInput.readLine()) != null) {
      if(line.startsWith("<judgment")) {
        String[] tokens = line.split("\"");
        String docid = tokens[3];
        String qid = tokens[1];
View Full Code Here

    BloomRanker.main(paramsBloomRanker);

    FSDataInputStream saInput = fs.open(new Path(postingOutput.getPath()));
    String line;
    int i = 0;
    while((line = saInput.readLine()) != null) {
      if(line.startsWith("<judgment")) {
        String docid = line.split("\"")[3];
        assertEquals(EXACT_RETRIEVAL[i++], docid);
      }
    }
View Full Code Here

    LOG.info("Small Adaptive output checked.");

    FSDataInputStream bInput = fs.open(new Path(bloomOutput.getPath()));
    int c = 0, lastQid = -1;
    i = 0;
    while((line = bInput.readLine()) != null) {
      if(line.startsWith("<judgment")) {
        int qid = Integer.parseInt(line.split("\"")[1]);
        if(qid != lastQid) {
          lastQid = qid;
          c = 0;
View Full Code Here

    System.out.println("-------------------");
    FSDataInputStream out = null;
    try {
      out = fs.open(p);
      while (true) {
        String temp = out.readLine();
        if (temp == null)
          break;
        System.out.println(temp);
      }
    } finally {
View Full Code Here

    System.out.println("-------------------");
    System.out.println("RESULT FOR WRITING");
    System.out.println("-------------------");
    FSDataInputStream out = fs.open(new Path(OUTPUT,"result-writing"));
    while (true) {
      String temp = out.readLine();
      if (temp == null)
        break;
      System.out.println(temp);
    }
    out.close();
View Full Code Here

    System.out.println("------------------");
    System.out.println("RESULT FOR READING");
    System.out.println("------------------");
    out = fs.open(new Path(OUTPUT, "result-reading"));
    while (true) {
      String temp = out.readLine();
      if (temp == null)
        break;
      System.out.println(temp);
    }
    out.close();
View Full Code Here

    System.out.println("-------------------");
    System.out.println("RESULT FOR WRITING");
    System.out.println("-------------------");
    FSDataInputStream out = fs.open(new Path(OUTPUT,"result-writing"));
    while (true) {
      String temp = out.readLine();
      if (temp == null)
        break;
      System.out.println(temp);
    }
    out.close();
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.