Class FileStoreAPI


  • public class FileStoreAPI
    extends Object
    • 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 succeed
        entry - The file details
        isFirstAttempt - If there is a failure
        Throws:
        org.apache.solr.common.SolrException
        IOException