Examples of WrappedIOException


Examples of org.terrier.utility.io.WrappedIOException

    try{
      rtr = (fieldCount > 0)
        ? postingConstructor.newInstance(file, pointer.getNumberOfEntries(), getDocumentIndex(pointer), fieldCount)
        : postingConstructor.newInstance(file, pointer.getNumberOfEntries(), getDocumentIndex(pointer));
    } catch (Exception e) {
      throw new WrappedIOException("Problem creating IterablePosting", e);
    }
    return rtr;
  }
View Full Code Here

Examples of org.terrier.utility.io.WrappedIOException

        reporter.incrCounter(Counters.INDEXED_TOKENS, numOfTokensInDocument);
        reporter.incrCounter(Counters.INDEXED_POINTERS, termsInDocument.getNumberOfPointers());
      } catch (IOException ioe) {
        throw ioe;       
      } catch (Exception e) {
        throw new WrappedIOException(e);
      }
    }
    termsInDocument.clear();
    reporter.incrCounter(Counters.INDEXED_DOCUMENTS, 1);
  }
View Full Code Here

Examples of org.terrier.utility.io.WrappedIOException

    runIteratorF.setRunPostingIterator(postingIterator);
    runIteratorF.setTerm(term);
    try{
      merger.mergeOne(lexstream);
    } catch (Exception e) {
      throw new WrappedIOException(e);
    }
    reporter.progress();
    this.lastReporter = reporter;
  }
View Full Code Here

Examples of org.terrier.utility.io.WrappedIOException

        if (_dataSource.startsWith("uk.ac.gla.terrier"))
          _dataSource = _dataSource.replaceAll("uk.ac.gla.terrier", "org.terrier");       
        try{
          this.file[i] = Class.forName(_dataSource).asSubclass(BitInSeekable.class).getConstructor(String.class).newInstance(dataFilename);
        } catch (Exception e) {
          throw new WrappedIOException(e);
        }
      }
    }
    fieldCount = _fieldCount;
    setPostingImplementation(_postingImplementation);
View Full Code Here

Examples of org.terrier.utility.io.WrappedIOException

    try{
      postingConstructor = (fieldCount > 0)
        ? postingImplementation.getConstructor(BitIn.class, Integer.TYPE, DocumentIndex.class, Integer.TYPE)
        : postingImplementation.getConstructor(BitIn.class, Integer.TYPE, DocumentIndex.class);
    } catch (NoSuchMethodException e) {
      throw new WrappedIOException(e);
    }
  }
View Full Code Here

Examples of org.terrier.utility.io.WrappedIOException

    try{
      rtr = (fieldCount > 0)
        ? postingConstructor.newInstance(_file, pointer.getNumberOfEntries(), fixedDi, fieldCount)
        : postingConstructor.newInstance(_file, pointer.getNumberOfEntries(), fixedDi);
    } catch (Exception e) {
      throw new WrappedIOException(e);
    }
    return rtr;
  }
View Full Code Here

Examples of org.terrier.utility.io.WrappedIOException

      rdi.seek(startByteOffset);
      BitIn in = new BitInputStream(rdi);
      in.skipBits(startBitOffset);
      return in;
    } catch (CloneNotSupportedException e) {
      throw new WrappedIOException(e);
    }
  }
View Full Code Here

Examples of org.terrier.utility.io.WrappedIOException

    try{
      rtr = (fieldCount > 0)
        ? postingConstructor.newInstance(_file, pointer.getNumberOfEntries(), doi, fieldCount)
        : postingConstructor.newInstance(_file, pointer.getNumberOfEntries(), doi);
    } catch (Exception e) {
      throw new WrappedIOException(e);
    }
    return rtr;
  }
View Full Code Here

Examples of org.terrier.utility.io.WrappedIOException

    /**
     * Validates the structure based on the job configuration
     */
    public void validateInput(JobConf jc) throws IOException {
      if (jc.get(STRUCTURE_NAME_JC_KEY, null) == null)
        throw new WrappedIOException(new IllegalArgumentException("Key " + STRUCTURE_NAME_JC_KEY +" not specified"));
    }
View Full Code Here

Examples of org.terrier.utility.io.WrappedIOException

        .getConstructor(String.class, Boolean.TYPE, FixedSizeWriteableFactory.class, FixedSizeWriteableFactory.class)
        .newInstance(filename, false, keyFactory, valueFactory);
      }
      catch (Exception e)
      {
      throw new WrappedIOException("Could not find a class for FSOMapFileLexicon", e);
    }
      return rtr;
    }
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.