Package org.apache.giraph.graph.partition

Examples of org.apache.giraph.graph.partition.PartitionExchange


        // 2. Send all the partitions to their destination workers in a random
        //    fashion.
        // 3. Notify completion with a ZooKeeper stamp
        // 4. Wait for all my dependencies to be done (if any)
        // 5. Add the partitions to myself.
        PartitionExchange partitionExchange =
            workerGraphPartitioner.updatePartitionOwners(
                getWorkerInfo(), masterSetPartitionOwners, getPartitionMap());
        commService.fixPartitionIdToSocketAddrMap();

        Map<WorkerInfo, List<Integer>> workerPartitionMap =
            partitionExchange.getSendWorkerPartitionMap();
        if (!workerPartitionMap.isEmpty()) {
            sendWorkerPartitions(workerPartitionMap);
        }

        Set<WorkerInfo> myDependencyWorkerSet =
            partitionExchange.getMyDependencyWorkerSet();
        Set<String> workerIdSet = new HashSet<String>();
        for (WorkerInfo workerInfo : myDependencyWorkerSet) {
            if (workerIdSet.add(workerInfo.getHostnameId()) != true) {
                throw new IllegalStateException(
                    "exchangeVertexPartitions: Duplicate entry " + workerInfo);
View Full Code Here

TOP

Related Classes of org.apache.giraph.graph.partition.PartitionExchange

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.