コード例 #1
0
  private void init(
      final String type,
      final String externalontology,
      final boolean inmemoryexternalontologyinference,
      final RDFS rdfs,
      final LiteralFactory.MapType codemap,
      final String[] tmpDirs,
      final boolean loadindexinfo,
      final PARALLELOPERANDS parallelOperands,
      final boolean blockwise,
      final int limit,
      final int jointhreads,
      final int joinbuffer,
      final Heap.HEAPTYPE heap,
      final ToSort.TOSORT tosort,
      final int indexheap,
      final int mergeheapheight,
      final Heap.HEAPTYPE mergeheaptype,
      final int chunk,
      final int mergethreads,
      final int yagomax,
      final QueryResult.TYPE resulttype,
      final STORAGE storage,
      final JOIN join,
      final JOIN optional,
      final SORT sort,
      final DISTINCT distinct,
      final MERGE_JOIN_OPTIONAL merge_join_optional,
      final String encoding) {
    this.type = type;
    this.externalontology = externalontology;
    this.inmemoryexternalontologyinference = inmemoryexternalontologyinference;

    this.rdfs = rdfs;
    LiteralFactory.setType(codemap);
    DBMergeSortedBag.setTmpDir(tmpDirs);
    DiskCollection.setTmpDir(tmpDirs);
    if (loadindexinfo) {
      lupos.datastructures.paged_dbbptree.DBBPTree.setTmpDir(tmpDirs[0], !loadindexinfo);
    }

    this.parallelOperands = parallelOperands;
    RuleJoinWithParallelOperands.setBLOCKWISE(blockwise);
    if (parallelOperands == PARALLELOPERANDS.LAST) {
      RuleEngineForParallelOperator.setLastJoin(true);
    } else if (parallelOperands == PARALLELOPERANDS.ALL) {
      RuleEngineForParallelOperator.setLastJoin(false);
    }
    if (limit > 0) {
      ParallelOperand.setQueueLimit(limit);
    }
    ParallelJoin.setDEFAULT_NUMBER_THREADS(jointhreads);
    ParallelJoin.setMAXBUFFER(joinbuffer);

    SortConfiguration.setDEFAULT_HEAP_TYPE(heap);
    SortConfiguration.setDEFAULT_TOSORT(tosort);

    SortConfiguration.setDEFAULT_TOSORT_SIZE(indexheap);
    SortConfiguration.setDEFAULT_HEIGHT(indexheap);

    SortConfiguration.setDEFAULT_MERGE_HEAP_HEIGHT(mergeheapheight);
    SortConfiguration.setDEFAULT_MERGEHEAP_TYPE(mergeheaptype);

    SortConfiguration.setDEFAULT_K(chunk);

    if (mergethreads <= 1) {
      DBMergeSortedBag.setParallelMerging(false);
    } else {
      DBMergeSortedBag.setParallelMerging(true);
      DBMergeSortedBag.setNumberOfThreads(mergethreads);
    }
    Parser.setMaxTriples(yagomax);

    QueryResult.type = resulttype;
    this.storage = storage;

    this.join = join;
    this.optional = optional;
    this.sort = sort;
    this.distinct = distinct;
    this.merge_join_optional = merge_join_optional;
    CommonCoreQueryEvaluator.encoding = encoding;
  }