private int ensureKeyInHost(HazelcastInstance hz, Member member) {
int i=0;
Member ownerMember;
do {
i++;
PartitionService partitionService = hz.getPartitionService();
Partition partition = partitionService.getPartition(i);
ownerMember = partition.getOwner();
} while (!ownerMember.equals(member));
return i;
}