Package com.hazelcast.partition

Examples of com.hazelcast.partition.PartitionInfo


            }

            final Set<Address> unknownAddresses = new HashSet<Address>();
            PartitionInfo[] state = partitionState.getPartitions();
            for (int partitionId = 0; partitionId < state.length; partitionId++) {
                PartitionInfo partitionInfo = state[partitionId];
                InternalPartitionImpl currentPartition = partitions[partitionId];
                for (int index = 0; index < InternalPartition.MAX_REPLICA_COUNT; index++) {
                    Address address = partitionInfo.getReplicaAddress(index);
                    if (address != null && getMember(address) == null) {
                        if (logger.isFinestEnabled()) {
                            logger.finest(
                                    "Unknown " + address + " found in partition table sent from master "
                                            + sender + ". It has probably already left the cluster. Partition: "
                                            + partitionId);
                        }
                        unknownAddresses.add(address);
                    }
                }
                // backup replicas will be assigned after active migrations are finalized.
                currentPartition.setOwner(partitionInfo.getReplicaAddress(0));
            }
            if (!unknownAddresses.isEmpty() && logger.isLoggable(Level.WARNING)) {
                StringBuilder s = new StringBuilder("Following unknown addresses are found in partition table")
                        .append(" sent from master[").append(sender).append("].")
                        .append(" (Probably they have recently joined or left the cluster.)")
View Full Code Here


    }

    private void filterAndLogUnknownAddressesInPartitionTable(Address sender, PartitionInfo[] state) {
        final Set<Address> unknownAddresses = new HashSet<Address>();
        for (int partitionId = 0; partitionId < state.length; partitionId++) {
            PartitionInfo partitionInfo = state[partitionId];
            InternalPartitionImpl currentPartition = partitions[partitionId];
            searchUnknownAddressesInPartitionTable(sender, unknownAddresses, partitionId, partitionInfo);
            // backup replicas will be assigned after active migrations are finalized.
            currentPartition.setOwner(partitionInfo.getReplicaAddress(0));
        }
        logUnknownAddressesInPartitionTable(sender, unknownAddresses);
    }
View Full Code Here

    }

    private void filterAndLogUnknownAddressesInPartitionTable(Address sender, PartitionInfo[] state) {
        final Set<Address> unknownAddresses = new HashSet<Address>();
        for (int partitionId = 0; partitionId < state.length; partitionId++) {
            PartitionInfo partitionInfo = state[partitionId];
            InternalPartitionImpl currentPartition = partitions[partitionId];
            searchUnknownAddressesInPartitionTable(sender, unknownAddresses, partitionId, partitionInfo);
            // backup replicas will be assigned after active migrations are finalized.
            currentPartition.setOwner(partitionInfo.getReplicaAddress(0));
        }
        logUnknownAddressesInPartitionTable(sender, unknownAddresses);
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.partition.PartitionInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.