Package org.apache.solr.hdfs
Class HdfsDirectoryFactory
- java.lang.Object
- 
- org.apache.solr.core.DirectoryFactory
- 
- org.apache.solr.core.CachingDirectoryFactory
- 
- org.apache.solr.hdfs.HdfsDirectoryFactory
 
 
 
- 
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- SolrMetricProducer,- NamedListInitializedPlugin,- SolrCoreAware
 
 public class HdfsDirectoryFactory extends CachingDirectoryFactory implements SolrCoreAware, SolrMetricProducer 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.apache.solr.core.CachingDirectoryFactoryCachingDirectoryFactory.CacheValue, CachingDirectoryFactory.CloseListener
 - 
Nested classes/interfaces inherited from class org.apache.solr.core.DirectoryFactoryDirectoryFactory.DirContext
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static StringBLOCKCACHE_DIRECT_MEMORY_ALLOCATIONstatic StringBLOCKCACHE_ENABLEDstatic StringBLOCKCACHE_GLOBALstatic StringBLOCKCACHE_READ_ENABLEDstatic StringBLOCKCACHE_SLAB_COUNTstatic StringBLOCKCACHE_WRITE_ENABLEDstatic StringCACHE_MERGESstatic StringCACHE_READONCEstatic StringCONFIG_DIRECTORYstatic StringHDFS_HOMEstatic StringHDFS_UPDATE_LOG_CLASS_NAMEstatic StringKERBEROS_ENABLEDstatic StringKERBEROS_KEYTABstatic StringKERBEROS_PRINCIPALstatic StringLOCALITYMETRICS_ENABLEDstatic StringLOCK_TYPE_HDFSstatic Metricsmetricsstatic StringNRTCACHINGDIRECTORY_ENABLEstatic StringNRTCACHINGDIRECTORY_MAXCACHEMBstatic StringNRTCACHINGDIRECTORY_MAXMERGESIZEMBstatic StringNUMBEROFBLOCKSPERBANK- 
Fields inherited from class org.apache.solr.core.CachingDirectoryFactorybyDirectoryCache, byPathCache, closeListeners, removeEntries
 - 
Fields inherited from class org.apache.solr.core.DirectoryFactorycoreContainer, dataHomePath, INDEX_W_TIMESTAMP_REGEX, IOCONTEXT_NO_CACHE, LOCK_TYPE_NATIVE, LOCK_TYPE_NONE, LOCK_TYPE_SIMPLE, LOCK_TYPE_SINGLE
 
- 
 - 
Constructor SummaryConstructors Constructor Description HdfsDirectoryFactory()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanupOldIndexDirectories(String dataDir, String currentIndexDir, boolean afterReload)voidclose()protected org.apache.lucene.store.Directorycreate(String path, org.apache.lucene.store.LockFactory lockFactory, DirectoryFactory.DirContext dirContext)protected org.apache.lucene.store.LockFactorycreateLockFactory(String rawLockType)booleanexists(String path)org.apache.hadoop.conf.ConfigurationgetConf(org.apache.hadoop.fs.Path path)StringgetConfDir()StringgetDataHome(CoreDescriptor cd)SolrMetricsContextgetSolrMetricsContext()voidinform(SolrCore core)voidinit(org.apache.solr.common.util.NamedList<?> args)voidinitializeMetrics(SolrMetricsContext parentContext, String scope)booleanisAbsolute(String path)booleanisPersistent()booleanisSharedStorage()voidmove(org.apache.lucene.store.Directory fromDir, org.apache.lucene.store.Directory toDir, String fileName, org.apache.lucene.store.IOContext ioContext)UpdateLognewDefaultUpdateLog()protected voidremoveDirectory(CachingDirectoryFactory.CacheValue cacheValue)voidrenameWithOverwrite(org.apache.lucene.store.Directory dir, String fileName, String toName)booleansearchersReserveCommitPoints()longsize(String path)longsize(org.apache.lucene.store.Directory directory)- 
Methods inherited from class org.apache.solr.core.CachingDirectoryFactoryaddCloseListener, deleteOldIndexDirectory, doneWithDirectory, get, getLivePaths, getPath, incRef, normalize, release, remove, remove, remove, remove, stripTrailingSlash
 - 
Methods inherited from class org.apache.solr.core.DirectoryFactoryempty, getBaseDir, initCoreContainer, sizeOf, sizeOfDirectory
 
- 
 
- 
- 
- 
Field Detail- 
LOCK_TYPE_HDFSpublic static final String LOCK_TYPE_HDFS - See Also:
- Constant Field Values
 
 - 
BLOCKCACHE_SLAB_COUNTpublic static final String BLOCKCACHE_SLAB_COUNT - See Also:
- Constant Field Values
 
 - 
BLOCKCACHE_DIRECT_MEMORY_ALLOCATIONpublic static final String BLOCKCACHE_DIRECT_MEMORY_ALLOCATION - See Also:
- Constant Field Values
 
 - 
BLOCKCACHE_ENABLEDpublic static final String BLOCKCACHE_ENABLED - See Also:
- Constant Field Values
 
 - 
BLOCKCACHE_GLOBALpublic static final String BLOCKCACHE_GLOBAL - See Also:
- Constant Field Values
 
 - 
BLOCKCACHE_READ_ENABLEDpublic static final String BLOCKCACHE_READ_ENABLED - See Also:
- Constant Field Values
 
 - 
BLOCKCACHE_WRITE_ENABLEDpublic static final String BLOCKCACHE_WRITE_ENABLED - See Also:
- Constant Field Values
 
 - 
NRTCACHINGDIRECTORY_ENABLEpublic static final String NRTCACHINGDIRECTORY_ENABLE - See Also:
- Constant Field Values
 
 - 
NRTCACHINGDIRECTORY_MAXMERGESIZEMBpublic static final String NRTCACHINGDIRECTORY_MAXMERGESIZEMB - See Also:
- Constant Field Values
 
 - 
NRTCACHINGDIRECTORY_MAXCACHEMBpublic static final String NRTCACHINGDIRECTORY_MAXCACHEMB - See Also:
- Constant Field Values
 
 - 
NUMBEROFBLOCKSPERBANKpublic static final String NUMBEROFBLOCKSPERBANK - See Also:
- Constant Field Values
 
 - 
LOCALITYMETRICS_ENABLEDpublic static final String LOCALITYMETRICS_ENABLED - See Also:
- Constant Field Values
 
 - 
KERBEROS_ENABLEDpublic static final String KERBEROS_ENABLED - See Also:
- Constant Field Values
 
 - 
KERBEROS_KEYTABpublic static final String KERBEROS_KEYTAB - See Also:
- Constant Field Values
 
 - 
KERBEROS_PRINCIPALpublic static final String KERBEROS_PRINCIPAL - See Also:
- Constant Field Values
 
 - 
HDFS_HOMEpublic static final String HDFS_HOME - See Also:
- Constant Field Values
 
 - 
CONFIG_DIRECTORYpublic static final String CONFIG_DIRECTORY - See Also:
- Constant Field Values
 
 - 
CACHE_MERGESpublic static final String CACHE_MERGES - See Also:
- Constant Field Values
 
 - 
CACHE_READONCEpublic static final String CACHE_READONCE - See Also:
- Constant Field Values
 
 - 
HDFS_UPDATE_LOG_CLASS_NAMEpublic static final String HDFS_UPDATE_LOG_CLASS_NAME - See Also:
- Constant Field Values
 
 - 
metricspublic static Metrics metrics 
 
- 
 - 
Method Detail- 
closepublic void close() throws IOException- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Specified by:
- closein interface- SolrMetricProducer
- Overrides:
- closein class- CachingDirectoryFactory
- Throws:
- IOException
 
 - 
initpublic void init(org.apache.solr.common.util.NamedList<?> args) - Specified by:
- initin interface- NamedListInitializedPlugin
- Overrides:
- initin class- CachingDirectoryFactory
 
 - 
createLockFactoryprotected org.apache.lucene.store.LockFactory createLockFactory(String rawLockType) throws IOException - Specified by:
- createLockFactoryin class- DirectoryFactory
- Throws:
- IOException
 
 - 
createprotected org.apache.lucene.store.Directory create(String path, org.apache.lucene.store.LockFactory lockFactory, DirectoryFactory.DirContext dirContext) throws IOException - Specified by:
- createin class- DirectoryFactory
- Throws:
- IOException
 
 - 
existspublic boolean exists(String path) - Overrides:
- existsin class- CachingDirectoryFactory
 
 - 
getConfpublic org.apache.hadoop.conf.Configuration getConf(org.apache.hadoop.fs.Path path) 
 - 
removeDirectoryprotected void removeDirectory(CachingDirectoryFactory.CacheValue cacheValue) - Overrides:
- removeDirectoryin class- CachingDirectoryFactory
 
 - 
isAbsolutepublic boolean isAbsolute(String path) - Overrides:
- isAbsolutein class- DirectoryFactory
 
 - 
isPersistentpublic boolean isPersistent() - Specified by:
- isPersistentin class- DirectoryFactory
 
 - 
isSharedStoragepublic boolean isSharedStorage() - Overrides:
- isSharedStoragein class- DirectoryFactory
 
 - 
searchersReserveCommitPointspublic boolean searchersReserveCommitPoints() - Overrides:
- searchersReserveCommitPointsin class- DirectoryFactory
 
 - 
getDataHomepublic String getDataHome(CoreDescriptor cd) throws IOException - Overrides:
- getDataHomein class- DirectoryFactory
- Throws:
- IOException
 
 - 
sizepublic long size(org.apache.lucene.store.Directory directory) throws IOException- Overrides:
- sizein class- DirectoryFactory
- Parameters:
- directory- to calculate size of
- Returns:
- size in bytes
- Throws:
- IOException- on low level IO error
 
 - 
sizepublic long size(String path) throws IOException - Overrides:
- sizein class- DirectoryFactory
- Parameters:
- path- to calculate size of
- Returns:
- size in bytes
- Throws:
- IOException- on low level IO error
 
 - 
getConfDirpublic String getConfDir() 
 - 
initializeMetricspublic void initializeMetrics(SolrMetricsContext parentContext, String scope) - Specified by:
- initializeMetricsin interface- SolrMetricProducer
 
 - 
getSolrMetricsContextpublic SolrMetricsContext getSolrMetricsContext() - Specified by:
- getSolrMetricsContextin interface- SolrMetricProducer
 
 - 
informpublic void inform(SolrCore core) - Specified by:
- informin interface- SolrCoreAware
 
 - 
cleanupOldIndexDirectoriespublic void cleanupOldIndexDirectories(String dataDir, String currentIndexDir, boolean afterReload) - Overrides:
- cleanupOldIndexDirectoriesin class- DirectoryFactory
 
 - 
renameWithOverwritepublic void renameWithOverwrite(org.apache.lucene.store.Directory dir, String fileName, String toName) throws IOException- Overrides:
- renameWithOverwritein class- DirectoryFactory
- Throws:
- IOException
 
 - 
movepublic void move(org.apache.lucene.store.Directory fromDir, org.apache.lucene.store.Directory toDir, String fileName, org.apache.lucene.store.IOContext ioContext) throws IOException- Overrides:
- movein class- DirectoryFactory
- Throws:
- IOException
 
 - 
newDefaultUpdateLogpublic UpdateLog newDefaultUpdateLog() - Overrides:
- newDefaultUpdateLogin class- DirectoryFactory
 
 
- 
 
-