Package org.apache.solr.filestore
Class DistribFileStore
java.lang.Object
org.apache.solr.filestore.DistribFileStore
- All Implemented Interfaces:
FileStore
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.solr.filestore.FileStore
FileStore.FileDetails, FileStore.FileEntry, FileStore.FileType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FileStore.FileType_getFileType(Path file) static void_persistToFile(Path solrHome, String path, ByteBuffer data, ByteBuffer meta) Internal APIvoidDelete a file cluster-widevoiddeleteLocal(String path) Delete file from local file systemstatic voiddeleteZKFileEntry(org.apache.solr.common.cloud.SolrZkClient client, String path) booleanFetch a resource from another node internal APIvoidget(String path, Consumer<FileStore.FileEntry> consumer, boolean fetchMissing) Read file content from a given path.static PathgetFileStoreDirPath(Path solrHome) getKeys()Get all the keys in the package store.getRealPath(String path) get the real path on filesystemThe type of the resourcestatic booleanisMetaDataFile(String file) voidput(FileStore.FileEntry entry) Store a file into the filestore.voidRefresh the files in a path.voidsyncToAllNodes(String path) Sync a local file to all nodes.
-
Constructor Details
-
DistribFileStore
-
-
Method Details
-
getRealPath
Description copied from interface:FileStoreget the real path on filesystem- Specified by:
getRealPathin interfaceFileStore
-
put
Description copied from interface:FileStoreStore a file into the filestore. This should ensure that it is replicated across all nodes in the cluster- Specified by:
putin interfaceFileStore- Throws:
IOException
-
fetch
Description copied from interface:FileStoreFetch a resource from another node internal API -
get
public void get(String path, Consumer<FileStore.FileEntry> consumer, boolean fetchMissing) throws IOException Description copied from interface:FileStoreRead file content from a given path.TODO: Is fetchMissing actually used? I don't see it being used, but the IDE doesn't flag it not being used!
- Specified by:
getin interfaceFileStore- Throws:
IOException
-
syncToAllNodes
Description copied from interface:FileStoreSync a local file to all nodes. All the nodes are asked to pull the file from this node- Specified by:
syncToAllNodesin interfaceFileStore- Throws:
IOException
-
list
-
delete
Description copied from interface:FileStoreDelete a file cluster-wide -
deleteLocal
Description copied from interface:FileStoreDelete file from local file system- Specified by:
deleteLocalin interfaceFileStore
-
refresh
Description copied from interface:FileStoreRefresh the files in a path. Maybe this node does not have all files? -
getType
Description copied from interface:FileStoreThe type of the resource -
_getFileType
-
isMetaDataFile
-
getFileStoreDirPath
-
_persistToFile
public static void _persistToFile(Path solrHome, String path, ByteBuffer data, ByteBuffer meta) throws IOException Internal API- Throws:
IOException
-
getKeys
Description copied from interface:FileStoreGet all the keys in the package store. The data is a .DER file content- Specified by:
getKeysin interfaceFileStore- Throws:
IOException
-
deleteZKFileEntry
-