private void failPartitionRequest() { setError(new PartitionNotFoundException(partitionId)); }
retriggerRequest = true; } else { throw new DataConsumptionException(notFound.getPartitionId(), notFound);
private void failPartitionRequest() { setError(new PartitionNotFoundException(partitionId)); }
private void failPartitionRequest() { setError(new PartitionNotFoundException(partitionId)); }
private void failPartitionRequest() { setError(new DataConsumptionException(partitionId, new PartitionNotFoundException(partitionId))); }
@Override public ResultSubpartitionView createSubpartitionView( ResultPartitionID partitionId, int subpartitionIndex, BufferAvailabilityListener availabilityListener) throws IOException { synchronized (registeredPartitions) { final ResultPartition partition = registeredPartitions.get(partitionId.getProducerId(), partitionId.getPartitionId()); if (partition == null) { throw new PartitionNotFoundException(partitionId); } LOG.debug("Requesting subpartition {} of {}.", subpartitionIndex, partition); return partition.createSubpartitionView(subpartitionIndex, availabilityListener); } }
@Override public ResultSubpartitionView createSubpartitionView( ResultPartitionID partitionId, int subpartitionIndex, BufferAvailabilityListener availabilityListener) throws IOException { synchronized (registeredPartitions) { final ResultPartition partition = registeredPartitions.get(partitionId.getProducerId(), partitionId.getPartitionId()); if (partition == null) { throw new PartitionNotFoundException(partitionId); } LOG.debug("Requesting subpartition {} of {}.", subpartitionIndex, partition); return partition.createSubpartitionView(subpartitionIndex, availabilityListener); } }
@Override public ResultSubpartitionView createSubpartitionView( ResultPartitionID partitionId, int subpartitionIndex, BufferAvailabilityListener availabilityListener) throws IOException { synchronized (registeredPartitions) { final ResultPartition partition = registeredPartitions.get(partitionId.getProducerId(), partitionId.getPartitionId()); if (partition == null) { throw new PartitionNotFoundException(partitionId); } LOG.debug("Requesting subpartition {} of {}.", subpartitionIndex, partition); return partition.createSubpartitionView(subpartitionIndex, availabilityListener); } }
@Override public ResultSubpartitionView createSubpartitionView( ResultPartitionID partitionId, int subpartitionIndex, BufferAvailabilityListener availabilityListener) throws IOException { synchronized (registeredPartitions) { final InternalResultPartition partition = registeredPartitions.get(partitionId.getProducerId(), partitionId.getPartitionId()); if (partition == null) { throw new PartitionNotFoundException(partitionId); } LOG.debug("Requesting subpartition {} of {}.", subpartitionIndex, partition); return partition.createSubpartitionView(subpartitionIndex, availabilityListener); } }
@Override ResultPartitionFileInfo getResultPartitionDir(ResultPartitionID resultPartitionID) throws IOException { YarnResultPartitionFileInfo fileInfo = resultPartitionMap.get(resultPartitionID); if (fileInfo != null) { if (!fileInfo.isReadyToBeConsumed()) { updateUnfinishedResultPartition(resultPartitionID, fileInfo); } fileInfo.updateOnConsumption(); return fileInfo; } // Cache miss, scan configured directories to search for the result partition's directory. fileInfo = searchResultPartitionDir(resultPartitionID); if (fileInfo == null) { throw new PartitionNotFoundException(resultPartitionID); } return fileInfo; }
/** * Check and update a previously unfinished result partition, if it has finished, update * its file information. * * @param resultPartitionID Result partition id. * @param fileInfo Previous file information of this result partition. * @return If this result partition is ready to be consumed, return true, otherwise return false. */ private void updateUnfinishedResultPartition( ResultPartitionID resultPartitionID, YarnResultPartitionFileInfo fileInfo) throws IOException { String finishedFilePath = ExternalBlockShuffleUtils.generateFinishedPath( fileInfo.getRootDirAndPartitionDir().f1); try { // Use finishedFile to get the partition ready time. FileStatus fileStatus = fileSystem.getFileStatus(new Path(finishedFilePath)); if (fileStatus != null) { fileInfo.setReadyToBeConsumed(fileStatus.getModificationTime()); } } catch (FileNotFoundException e) { // The result partition is still unfinished. throw new PartitionNotFoundException(resultPartitionID); } // Other IOExceptions will be thrown out. }
return prevFileInfo; } else { throw new PartitionNotFoundException(resultPartitionID);