io.github.repir.Retriever.MultiThread.JobProcess Maven / Gradle / Ivy
The newest version!
package io.github.repir.Retriever.MultiThread;
import java.util.ArrayList;
import java.util.Collection;
import io.github.repir.Repository.Repository;
import io.github.repir.MapReduceTools.RRConfiguration;
import io.github.repir.Retriever.Query;
import io.github.repir.Retriever.MapReduce.QueryInputFormat;
import io.github.repir.TestSet.TestSet;
/**
* Wrapper around a testset being run, enabling simultaneous sets to be run
* with different configurations.
* @author jeroen
*/
public abstract class JobProcess implements JobThreadCallback {
protected RRConfiguration configuration;
protected Repository repository;
protected Retriever retriever;
protected TestSet testset;
protected QueryInputFormat inputformat;
public JobProcess( Retriever retriever, ArrayList queries ) {
this.configuration = retriever.repository.getConf();
inputformat = new QueryInputFormat(repository);
this.repository = retriever.repository;
this.retriever = retriever;
retriever.retrieveThreadedQueries(queries, this);
}
public JobProcess( RRConfiguration conf, ArrayList queries ) {
this(new Retriever(new Repository(conf)), queries);
}
public JobProcess( Repository repository ) {
this( new Retriever(repository) );
}
public JobProcess( Retriever retriever ) {
this( retriever, new TestSet(retriever.repository).getQueries(retriever));
}
public JobProcess( RRConfiguration conf ) {
this( new Repository(conf));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy