Package org.apache.hadoop.fs

Examples of org.apache.hadoop.fs.BlockMissingException


      } catch (IOException ie) {
        int failureTimes = DFSClient.dfsInputStreamfailures.get();
        String blockInfo = block.getBlock() + " file=" + src;
        if (failureTimes >= dfsClient.maxBlockAcquireFailures
            || failureTimes >= block.getLocations().length) {
          throw new BlockMissingException(src, "Could not obtain block: " +
              blockInfo, block.getStartOffset());
        }

        if (nodes == null || nodes.length == 0) {
          DFSClient.LOG.info("No node available for block: " + blockInfo);
View Full Code Here


          return new DNAddrPair(chosenNode, targetAddr);
        } catch (IOException ie) {
          int failureTimes = dfsInputStreamfailures.get();
          String blockInfo = block.getBlock() + " file=" + src;
          if (failureTimes >= maxBlockAcquireFailures) {
            throw new BlockMissingException(src, "Could not obtain block: " +
                blockInfo, block.getStartOffset());
          }

          if (nodes == null || nodes.length == 0) {
            LOG.info("No node available for block: " + blockInfo);
View Full Code Here

              continue;
            }
            LocatedBlockWithFileName lb =
                srcFs.getClient().getBlockInfo(blockId);
            if (lb == null) {
              throw new BlockMissingException(String.valueOf(blockId),
                "Location " + i + " can not be found. Block id: " + blockId, 0);
            } else {
              Path filePath = new Path(lb.getFileName());
              FileStatus stat = srcFs.getFileStatus(filePath);
              long blockSize = stat.getBlockSize();
View Full Code Here

                errorCount++;
              }
              blockMissingMap.put(stream, errorCount);
            }
            if (errorCount <= 2) {
              throw new BlockMissingException(stream.toString(),
                  event.toString(), stream.getPos());
            }
          }
        } else {
          throw new IOException(event.toString());
View Full Code Here

        if (failureTimes >= dfsClient.maxBlockAcquireFailures
            || failureTimes >= seekContext.getTargetBlock().getLocations().length) {
          DFSClient.LOG.warn("Could not obtain block "
              + seekContext.getTargetBlock().getBlock()
              + errMsg + ". Throw a BlockMissingException");
          throw new BlockMissingException(src, "Could not obtain block: "
              + blockInfo, seekContext.getTargetBlock().getStartOffset());
        }

        if (nodes == null || nodes.length == 0) {
          DFSClient.LOG.info("No node available for block: " + blockInfo);
View Full Code Here

TOP

Related Classes of org.apache.hadoop.fs.BlockMissingException

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.