Package org.apache.giraph.graph

Examples of org.apache.giraph.graph.WorkerInfo


    }

    @Override
    public void readFields(DataInput input) throws IOException {
        partitionId = input.readInt();
        workerInfo = new WorkerInfo();
        workerInfo.readFields(input);
        boolean hasPreviousWorkerInfo = input.readBoolean();
        if (hasPreviousWorkerInfo) {
            previousWorkerInfo = new WorkerInfo();
            previousWorkerInfo.readFields(input);
        }
        boolean hasCheckpointFilePrefix = input.readBoolean();
        if (hasCheckpointFilePrefix) {
            checkpointFilesPrefix = input.readUTF();
View Full Code Here


            // superstep mod availableWorkerInfos
            // Guaranteed to be different if the workers (and their order)
            // do not change
            long workerIndex = superstep % availableWorkerInfos.size();
            int i = 0;
            WorkerInfo chosenWorkerInfo = null;
            for (WorkerInfo workerInfo : availableWorkerInfos) {
                if (workerIndex == i) {
                    chosenWorkerInfo = workerInfo;
                }
                ++i;
            }
            if (LOG.isInfoEnabled()) {
                LOG.info("generateChangedPartitionOwners: Chosen worker " +
                         "for superstep " + superstep + " is " +
                         chosenWorkerInfo);
            }

            List<PartitionOwner> partitionOwnerList =
                new ArrayList<PartitionOwner>();
            for (PartitionOwner partitionOwner :
                    getCurrentPartitionOwners()) {
                WorkerInfo prevWorkerinfo =
                    partitionOwner.getWorkerInfo().equals(chosenWorkerInfo) ?
                        null : partitionOwner.getWorkerInfo();
                PartitionOwner tmpPartitionOwner =
                    new BasicPartitionOwner(partitionOwner.getPartitionId(),
                                            chosenWorkerInfo,
View Full Code Here

        }

        Map<WorkerInfo, VertexEdgeCount> workerStatsMap = Maps.newHashMap();
        VertexEdgeCount totalVertexEdgeCount = new VertexEdgeCount();
        for (PartitionStats partitionStats : allPartitionStats) {
            WorkerInfo workerInfo =
                idOwnerMap.get(partitionStats.getPartitionId()).getWorkerInfo();
            VertexEdgeCount vertexEdgeCount =
                workerStatsMap.get(workerInfo);
            if (vertexEdgeCount == null) {
                workerStatsMap.put(
View Full Code Here

TOP

Related Classes of org.apache.giraph.graph.WorkerInfo

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.