/** * Return all directory names in the nodes/{node.id}/indices directory for the given node path. * * @param nodePath the path * @return all directories that could be indices for the given node path. * @throws IOException if an I/O exception occurs traversing the filesystem */ public Set<String> availableIndexFoldersForPath(final NodePath nodePath) throws IOException { return availableIndexFoldersForPath(nodePath, p -> false); }
/** * Returns folder names in ${data.paths}/nodes/{node.id}/indices folder that don't match the given predicate. * @param excludeIndexPathIdsPredicate folder names to exclude */ public Set<String> availableIndexFolders(Predicate<String> excludeIndexPathIdsPredicate) throws IOException { if (nodePaths == null || locks == null) { throw new IllegalStateException("node is not configured to store local location"); } assertEnvIsLocked(); Set<String> indexFolders = new HashSet<>(); for (NodePath nodePath : nodePaths) { indexFolders.addAll(availableIndexFoldersForPath(nodePath, excludeIndexPathIdsPredicate)); } return indexFolders; }
/** * Return all directory names in the nodes/{node.id}/indices directory for the given node path. * * @param nodePath the path * @return all directories that could be indices for the given node path. * @throws IOException if an I/O exception occurs traversing the filesystem */ public Set<String> availableIndexFoldersForPath(final NodePath nodePath) throws IOException { return availableIndexFoldersForPath(nodePath, p -> false); }
/** * Returns folder names in ${data.paths}/nodes/{node.id}/indices folder that don't match the given predicate. * @param excludeIndexPathIdsPredicate folder names to exclude */ public Set<String> availableIndexFolders(Predicate<String> excludeIndexPathIdsPredicate) throws IOException { if (nodePaths == null || locks == null) { throw new IllegalStateException("node is not configured to store local location"); } assertEnvIsLocked(); Set<String> indexFolders = new HashSet<>(); for (NodePath nodePath : nodePaths) { indexFolders.addAll(availableIndexFoldersForPath(nodePath, excludeIndexPathIdsPredicate)); } return indexFolders; }
/** * Returns all folder names in ${data.paths}/nodes/{node.id}/indices folder */ public Set<String> availableIndexFolders() throws IOException { if (nodePaths == null || locks == null) { throw new IllegalStateException("node is not configured to store local location"); } assertEnvIsLocked(); Set<String> indexFolders = new HashSet<>(); for (NodePath nodePath : nodePaths) { indexFolders.addAll(availableIndexFoldersForPath(nodePath)); } return indexFolders; }
final Set<String> availableIndexFolders = nodeEnv.availableIndexFoldersForPath(nodePath); if (availableIndexFolders.isEmpty()) { continue;