use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class MemberRemoveOperation method run.
@Override
public void run() {
ClusterServiceImpl clusterService = getService();
Address caller = getCallerAddress();
ILogger logger = getLogger();
if (!isCallerValid(caller)) {
return;
}
String msg = "Removing member " + address + (memberUuid != null ? ", uuid: " + memberUuid : "") + ", requested by: " + caller;
if (logger.isFineEnabled()) {
logger.fine(msg);
}
if (memberUuid != null) {
clusterService.removeAddress(address, memberUuid, msg);
} else {
clusterService.removeAddress(address, msg);
}
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class SplitBrainMergeValidationOperation method preCheck.
private boolean preCheck(Node node) {
ILogger logger = getLogger();
if (!node.joined()) {
logger.info("Ignoring join check from " + getCallerAddress() + ", because this node is not joined to a cluster yet...");
return false;
}
if (!node.isRunning()) {
logger.info("Ignoring join check from " + getCallerAddress() + ", because this node is not active...");
return false;
}
final ClusterState clusterState = node.clusterService.getClusterState();
if (clusterState != ClusterState.ACTIVE) {
logger.info("Ignoring join check from " + getCallerAddress() + ", because cluster is in " + clusterState + " state ...");
return false;
}
return true;
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class SplitBrainMergeValidationOperation method masterCheck.
private boolean masterCheck(Node node) {
ILogger logger = getLogger();
Address caller = getCallerAddress();
ClusterServiceImpl service = getService();
if (node.isMaster()) {
if (service.getMember(caller) != null) {
logger.info("Removing " + caller + ", since it thinks it's already split from this cluster " + "and looking to merge.");
removeCaller = true;
}
return true;
} else {
// ping master to check if it's still valid
service.getClusterHeartbeatManager().sendMasterConfirmation();
logger.info("Ignoring join check from " + caller + ", because this node is not master...");
return false;
}
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class BeforeJoinCheckFailureOperation method run.
@Override
public void run() {
final NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine();
final Node node = nodeEngine.getNode();
if (node.joined()) {
throw new IllegalStateException("Node is already joined but received a termination message! " + "Reason: " + failReasonMsg);
}
final ILogger logger = nodeEngine.getLogger("com.hazelcast.security");
logger.severe("Node could not join cluster. Before join check failed node is going to shutdown now!");
logger.severe("Reason of failure for node join : " + failReasonMsg);
node.shutdown(true);
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class GroupMismatchOperation method run.
@Override
public void run() {
NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine();
Connection connection = getConnection();
String message = "Node could not join cluster at node: " + connection.getEndPoint() + " Cause: the target cluster has a different group-name";
connection.close(message, null);
ILogger logger = nodeEngine.getLogger("com.hazelcast.cluster");
logger.warning(message);
Node node = nodeEngine.getNode();
node.getJoiner().blacklist(getCallerAddress(), true);
}
Aggregations