Search in sources :

Example 1 with ShowMissingDiskStoresFunction

use of org.apache.geode.management.internal.cli.functions.ShowMissingDiskStoresFunction in project geode by apache.

the class DiskStoreCommands method getMissingDiskStoresList.

protected List<Object> getMissingDiskStoresList(Set<DistributedMember> members) {
    final Execution membersFunctionExecutor = getMembersFunctionExecutor(members);
    if (membersFunctionExecutor instanceof AbstractExecution) {
        ((AbstractExecution) membersFunctionExecutor).setIgnoreDepartedMembers(true);
    }
    final ResultCollector<?, ?> resultCollector = membersFunctionExecutor.execute(new ShowMissingDiskStoresFunction());
    final List<?> results = (List<?>) resultCollector.getResult();
    final List<Object> distributedPersistentRecoveryDetails = new ArrayList<Object>(results.size());
    for (final Object result : results) {
        if (result instanceof Set) {
            // ignore FunctionInvocationTargetExceptions and other
            // Exceptions...
            distributedPersistentRecoveryDetails.addAll((Set<Object>) result);
        }
    }
    return distributedPersistentRecoveryDetails;
}
Also used : AbstractExecution(org.apache.geode.internal.cache.execute.AbstractExecution) Execution(org.apache.geode.cache.execute.Execution) AbstractExecution(org.apache.geode.internal.cache.execute.AbstractExecution) Set(java.util.Set) HashSet(java.util.HashSet) ShowMissingDiskStoresFunction(org.apache.geode.management.internal.cli.functions.ShowMissingDiskStoresFunction) ArrayList(java.util.ArrayList) List(java.util.List) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 List (java.util.List)1 Set (java.util.Set)1 Execution (org.apache.geode.cache.execute.Execution)1 AbstractExecution (org.apache.geode.internal.cache.execute.AbstractExecution)1 ShowMissingDiskStoresFunction (org.apache.geode.management.internal.cli.functions.ShowMissingDiskStoresFunction)1