Package org.apache.hadoop.io

Examples of org.apache.hadoop.io.Text.clear()


                    .getPermission()), archiveIndexStat.getOwner(),
                archiveIndexStat.getGroup(), makeRelative(this.uri.toString(),
                    new Path(hstatus.name)));
            statuses.add(childStatus);
          }
          line.clear();
        }
      }
    } finally {
      if (aIn != null) {
        aIn.close();
View Full Code Here


      if (startHash <= hashCode && hashCode <= endHash) {
        stores.add(new Store(Long.parseLong(readStr[2]),
            Long.parseLong(readStr[3]), startHash,
            endHash));
      }
      line.clear();
    }
    try {
      lin.close();
    } catch(IOException io){
      // do nothing just a read.
View Full Code Here

        if (harPath.compareTo(new Path(parsed[0])) == 0) {
          // bingo!
          retStr = lineFeed;
          break;
        }
        line.clear();
      }
      if (retStr != null)
        break;
    }
    try {
View Full Code Here

            writer.append(key, value);
        } finally {
            writer.close();
        }
        key.clear();
        value.clear();

        FileStatus status = fs.getFileStatus(path);
        InputStream in = new FileInputStream(fs.pathToFile(path));
        try {
            SequenceFile.Reader reader = SequenceFileUtil.openReader(in, status, conf);
View Full Code Here

            writer.append(key, value);
        } finally {
            writer.close();
        }
        key.clear();
        value.clear();

        FileStatus status = fs.getFileStatus(path);
        InputStream in = new FileInputStream(fs.pathToFile(path));
        try {
            SequenceFile.Reader reader = SequenceFileUtil.openReader(in, status.getLen(), conf);
View Full Code Here

            writer.close();
        } finally {
            out.close();
        }
        key.clear();
        value.clear();

        SequenceFile.Reader reader = new SequenceFile.Reader(fs, path, conf);
        try {
            assertThat(reader.next(key, value), is(true));
            assertThat(key.toString(), is("Hello"));
View Full Code Here

          int startHash = Integer.parseInt(readStr[0]);
          int endHash  = Integer.parseInt(readStr[1]);
          stores.add(new Store(Long.parseLong(readStr[2]),
              Long.parseLong(readStr[3]), startHash,
              endHash));
          line.clear();
        }
      } catch (IOException ioe) {
        LOG.warn("Encountered exception ", ioe);
        throw ioe;
      } finally {
View Full Code Here

            read += tmp;
            String lineFeed = line.toString();
            String[] parsed = lineFeed.split(" ");
            parsed[0] = decodeFileName(parsed[0]);
            archive.put(new Path(parsed[0]), new HarStatus(lineFeed));
            line.clear();
          }
        }
      } finally {
        IOUtils.cleanup(LOG, aIn);
      }
View Full Code Here

      try {
        Text row = new Text();
        lineReader = new LineReader((InputStream)in, hconf);

        while(true) {
          row.clear();
          long bytes = lineReader.readLine(row);
          if(bytes <= 0) {
            break;
          }
          proc.processLine(row);
View Full Code Here

          int startHash = Integer.parseInt(readStr[0]);
          int endHash  = Integer.parseInt(readStr[1]);
          stores.add(new Store(Long.parseLong(readStr[2]),
              Long.parseLong(readStr[3]), startHash,
              endHash));
          line.clear();
        }
      } finally {
        IOUtils.cleanup(LOG, lin, in);
      }
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.