Package org.apache.hadoop.fs

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


    String forwardIndexPath = (weighted ? env.getWeightedIntDocVectorsForwardIndex()
        : env.getIntDocVectorsForwardIndex());
    FSDataInputStream posInput = fs.open(new Path(forwardIndexPath));

    docnoOffset = posInput.readInt();
    collectionDocumentCount = posInput.readInt();

    positions = new long[collectionDocumentCount];
    for (int i = 0; i < collectionDocumentCount; i++) {
      positions[i] = posInput.readLong();
View Full Code Here


    String forwardIndexPath = (weighted ? env.getWeightedIntDocVectorsForwardIndex()
        : env.getIntDocVectorsForwardIndex());
    FSDataInputStream posInput = fs.open(new Path(forwardIndexPath));

    docnoOffset = posInput.readInt();
    collectionDocumentCount = posInput.readInt();

    positions = new long[collectionDocumentCount];
    for (int i = 0; i < collectionDocumentCount; i++) {
      positions[i] = posInput.readLong();
    }
View Full Code Here

    RetrievalEnvironment env = new RetrievalEnvironment(indexPath, fs);
    path = env.getTermDocVectorsDirectory();

    FSDataInputStream posInput = fs.open(new Path(env.getTermDocVectorsForwardIndex()));

    docnoOffset = posInput.readInt();
    collectionDocumentCount = posInput.readInt();

    positions = new long[collectionDocumentCount];
    for (int i = 0; i < collectionDocumentCount; i++) {
      positions[i] = posInput.readLong();
View Full Code Here

    path = env.getTermDocVectorsDirectory();

    FSDataInputStream posInput = fs.open(new Path(env.getTermDocVectorsForwardIndex()));

    docnoOffset = posInput.readInt();
    collectionDocumentCount = posInput.readInt();

    positions = new long[collectionDocumentCount];
    for (int i = 0; i < collectionDocumentCount; i++) {
      positions[i] = posInput.readLong();
    }
View Full Code Here

      FSDataInputStream inDfs = fs.open(dfByTermFilePath);
      FSDataInputStream inCfs = fs.open(cfByTermFilePath);

      // ignore the first int, which is the count
      inDfs.readInt();
      inCfs.readInt();

      int curKeyIndex = 0;
      byte[] keys;

      curKeyIndex = in.readInt();
View Full Code Here

    RetrievalEnvironment env = new RetrievalEnvironment(indexPath, fs);
    postingsPath = env.getPostingsDirectory();

    FSDataInputStream posInput = fs.open(new Path(env.getPostingsIndexData()));

    int l = posInput.readInt();
    positions = new long[l];
    for (int i = 0; i < l; i++) {
      positions[i] = posInput.readLong();
    }
  }
View Full Code Here

    String forwardIndexPath = (weighted ? env.getWeightedIntDocVectorsForwardIndex()
        : env.getIntDocVectorsForwardIndex());
    FSDataInputStream posInput = fs.open(new Path(forwardIndexPath));

    docnoOffset = posInput.readInt();
    collectionDocumentCount = posInput.readInt();

    positions = new long[collectionDocumentCount];
    for (int i = 0; i < collectionDocumentCount; i++) {
      positions[i] = posInput.readLong();
View Full Code Here

    String forwardIndexPath = (weighted ? env.getWeightedIntDocVectorsForwardIndex()
        : env.getIntDocVectorsForwardIndex());
    FSDataInputStream posInput = fs.open(new Path(forwardIndexPath));

    docnoOffset = posInput.readInt();
    collectionDocumentCount = posInput.readInt();

    positions = new long[collectionDocumentCount];
    for (int i = 0; i < collectionDocumentCount; i++) {
      positions[i] = posInput.readLong();
    }
View Full Code Here

    Preconditions.checkNotNull(fs);

    FSDataInputStream in = fs.open(new Path(file));

    // Read the docno offset.
    docnoOffset = in.readInt();

    // Read the size of the document collection.
    int sz = in.readInt() + 1;

    LOG.info("Docno offset: " + docnoOffset);
View Full Code Here

    // Read the docno offset.
    docnoOffset = in.readInt();

    // Read the size of the document collection.
    int sz = in.readInt() + 1;

    LOG.info("Docno offset: " + docnoOffset);
    LOG.info("Number of docs: " + (sz - 1));

    // Initialize an array to hold all the doc scores.
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.