Package org.apache.solr.filestore
Class FileStoreAPI
- java.lang.Object
-
- org.apache.solr.filestore.FileStoreAPI
-
public class FileStoreAPI extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
FileStoreAPI.FSRead
class
FileStoreAPI.FSWrite
static class
FileStoreAPI.MetaData
-
Field Summary
Fields Modifier and Type Field Description static String
FILESTORE_DIRECTORY
static String
KEYS_DIR
FileStoreAPI.FSRead
readAPI
static String
TRUSTED_DIR
FileStoreAPI.FSWrite
writeAPI
-
Constructor Summary
Constructors Constructor Description FileStoreAPI(CoreContainer coreContainer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FileStoreAPI.MetaData
_createJsonMetaData(byte[] buf, List<String> signatures)
Creates a JSON string with the metadata.FileStore
getFileStore()
ArrayList<String>
shuffledNodes()
get a list of nodes randomly shuffled * @lucene.internalvoid
validate(List<String> sigs, FileStore.FileEntry entry, boolean isFirstAttempt)
Validate a file for signaturevoid
validateFiles(List<String> files, boolean validateSignatures, Consumer<String> errs)
static void
validateName(String path, boolean failForTrusted)
-
-
-
Field Detail
-
FILESTORE_DIRECTORY
public static final String FILESTORE_DIRECTORY
- See Also:
- Constant Field Values
-
TRUSTED_DIR
public static final String TRUSTED_DIR
- See Also:
- Constant Field Values
-
KEYS_DIR
public static final String KEYS_DIR
- See Also:
- Constant Field Values
-
readAPI
public final FileStoreAPI.FSRead readAPI
-
writeAPI
public final FileStoreAPI.FSWrite writeAPI
-
-
Constructor Detail
-
FileStoreAPI
public FileStoreAPI(CoreContainer coreContainer)
-
-
Method Detail
-
getFileStore
public FileStore getFileStore()
-
shuffledNodes
public ArrayList<String> shuffledNodes()
get a list of nodes randomly shuffled * @lucene.internal
-
validateFiles
public void validateFiles(List<String> files, boolean validateSignatures, Consumer<String> errs)
-
_createJsonMetaData
public static FileStoreAPI.MetaData _createJsonMetaData(byte[] buf, List<String> signatures) throws IOException
Creates a JSON string with the metadata.- Throws:
IOException
- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
validateName
public static void validateName(String path, boolean failForTrusted)
-
validate
public void validate(List<String> sigs, FileStore.FileEntry entry, boolean isFirstAttempt) throws org.apache.solr.common.SolrException, IOException
Validate a file for signature- Parameters:
sigs
- the signatures. atleast one should succeedentry
- The file detailsisFirstAttempt
- If there is a failure- Throws:
org.apache.solr.common.SolrException
IOException
-
-