Package org.apache.hadoop.fs

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


    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


    // 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

    RankAndFeaturesSmallAdaptive.main(paramsMonolithic);

    FSDataInputStream input = fs.open(new Path(features.getPath()));
    String line;
    int i = 0;
    while((line = input.readLine()) != null) {
      assertTrue(FEATURES[i++].trim().equals(line.trim()));
    }
    input.close();
    assertEquals(FEATURES.length, i);
    LOG.info("Monolithic output checked.");
View Full Code Here

      DocumentVectorOnTheFlyIndexing.main(paramsDecoupled);

      input = fs.open(new Path(features.getPath()));
      i = 0;
      while((line = input.readLine()) != null) {
        assertTrue(FEATURES[i++].trim().equals(line.trim()));
      }
      input.close();
      assertEquals(FEATURES.length, i);
      LOG.info(vectorType + " output checked.");
View Full Code Here

    try {
      FSDataInputStream in = fs.open(new Path(params[0]));
      String next;
      String[] records;
      while((next = in.readLine()) != null) {
        records = next.split("\t");
        counts.put(Integer.parseInt(records[0].trim()),
            Integer.parseInt(records[1].trim()));
      }
      in.close();
View Full Code Here

    try {
      FSDataInputStream in = fs.open(new Path(params[0]));
      String next;
      String[] records;
      while((next = in.readLine()) != null) {
        records = next.split("\t");
        counts.put(Integer.parseInt(records[0].trim()),
            Integer.parseInt(records[1].trim()));
      }
      in.close();
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

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.