예제 #1
0
 public DocumentIndexWriter(TupleFlowParameters parameters)
     throws FileNotFoundException, IOException {
   Parameters p = new Parameters();
   p.add("isCompressed", "true");
   writer = new IndexWriter(parameters.getXML().get("filename"), p);
   documentsWritten = parameters.getCounter("Documents Written");
 }
예제 #2
0
  public static void verify(TupleFlowParameters parameters, ErrorHandler handler) {
    if (!parameters.getXML().containsKey("filename")) {
      handler.addError("DocumentIndexWriter requires an 'filename' parameter.");
      return;
    }

    String index = parameters.getXML().get("filename");
    Verification.requireWriteableFile(index, handler);
  }