/** * This method tries to get a partition data from the data cache. * If null, it will create one. * * @param workerInfo The remote worker destination * @param partitionId The remote Partition this message belongs to * @return The partition data in data cache */ private VertexIdData<I, T> getPartitionData(WorkerInfo workerInfo, int partitionId) { // Get the data collection B partitionData = getData(partitionId); if (partitionData == null) { partitionData = createVertexIdData(); partitionData.setConf(getConf()); partitionData.initialize(getInitialBufferSize(workerInfo.getTaskId())); setData(partitionId, partitionData); } return partitionData; } }