Package org.apache.solr.handler
Class IndexFetcher
- java.lang.Object
-
- org.apache.solr.handler.IndexFetcher
-
public class IndexFetcher extends Object
Provides functionality of downloading changed index files as well as config files and a timer for scheduling fetches from the leader.- Since:
- solr 1.4
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
IndexFetcher.CompareResult
static class
IndexFetcher.IndexFetchResult
-
Field Summary
Fields Modifier and Type Field Description static String
INDEX_PROPERTIES
static String
REPLICATION_PROPERTIES
-
Constructor Summary
Constructors Constructor Description IndexFetcher(org.apache.solr.common.util.NamedList<?> initArgs, ReplicationHandler handler, SolrCore sc)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static IndexFetcher.CompareResult
compareFile(org.apache.lucene.store.Directory indexDir, String filename, Long backupIndexFileLen, Long backupIndexFileChecksum)
void
destroy()
org.apache.solr.common.util.NamedList<Object>
getLatestVersion()
Gets the latest commit version and generation from the leaderprotected <T> T
getParameter(org.apache.solr.common.util.NamedList<?> initArgs, String configKey, T defaultValue, StringBuilder sb)
-
-
-
Field Detail
-
INDEX_PROPERTIES
public static final String INDEX_PROPERTIES
- See Also:
- Constant Field Values
-
REPLICATION_PROPERTIES
public static final String REPLICATION_PROPERTIES
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
IndexFetcher
public IndexFetcher(org.apache.solr.common.util.NamedList<?> initArgs, ReplicationHandler handler, SolrCore sc)
-
-
Method Detail
-
getParameter
protected <T> T getParameter(org.apache.solr.common.util.NamedList<?> initArgs, String configKey, T defaultValue, StringBuilder sb)
-
getLatestVersion
public org.apache.solr.common.util.NamedList<Object> getLatestVersion() throws IOException
Gets the latest commit version and generation from the leader- Throws:
IOException
-
compareFile
protected static IndexFetcher.CompareResult compareFile(org.apache.lucene.store.Directory indexDir, String filename, Long backupIndexFileLen, Long backupIndexFileChecksum)
-
destroy
public void destroy()
-
-