“Failed to execute cluster task within 30 second” issue.
im guess this, hint from : www.javacreed.com/stopping-the-future-in-time/
edit source : org.jivesoftware.openfire.plugin.util.cache.ClusteredCacheFactory.java
check bold texts . please…
…
…
public Object doSynchronousClusterTask(ClusterTask task, byte[] nodeID) {
if (cluster == null) { return null; }
Member member = getMember(nodeID);
Object result = null;
// Check that the requested member was found
if (member != null) {
// Asynchronously execute the task on the target member
logger.debug("Executing DistributedTask: " + task.getClass().getName());
Future future = null;
try {
future = hazelcast.getExecutorService(HAZELCAST_EXECUTOR_SERVICE_NAME)
.submitToMember(new CallableTask(task), member);
result = future.get(MAX_CLUSTER_EXECUTION_TIME, TimeUnit.SECONDS);
logger.debug("DistributedTask result: " + (result == null ? “null” : result));
} catch (TimeoutException te) {
** if(future != null) future.cancel(true);**
** logger.error(“future is canceled, cause by TimeoutException”);**
logger.error(“Failed to execute cluster task within " + MAX_CLUSTER_EXECUTION_TIME + " seconds”, te);
} catch (Exception e) {
logger.error(“Failed to execute cluster task”, e);
}
} else {
String msg = MessageFormat.format(“Requested node {0} not found in cluster”, StringUtils.getString(nodeID));
logger.warn(msg);
throw new IllegalArgumentException(msg);
}
return result;
}
…
…
and see another method and edit : Collection doSynchronousClusterTask(ClusterTask task, boolean includeLocalMember)