Examples of DiskOutOfSpaceException


Examples of org.apache.hadoop.util.DiskChecker.DiskOutOfSpaceException

  /* Check if there is no space in disk or the disk is read-only
   *  when IOException occurs.
   * If so, handle the error */
  private void checkDiskError( IOException e ) throws IOException {
    if (e.getMessage().startsWith("No space left on device")) {
      throw new DiskOutOfSpaceException("No space left on device");
    } else {
      checkDiskError();
    }
  }
View Full Code Here

Examples of org.apache.hadoop.util.DiskChecker.DiskOutOfSpaceException

   
    LOG.warn("checkDiskError: exception: ", e);
   
    if (e.getMessage() != null &&
        e.getMessage().startsWith("No space left on device")) {
      throw new DiskOutOfSpaceException("No space left on device");
    } else {
      checkDiskError();
    }
  }
View Full Code Here

Examples of org.apache.hadoop.util.DiskChecker.DiskOutOfSpaceException

    }
     
    synchronized FSVolume getNextVolume(long blockSize) throws IOException {
     
      if(volumes.length < 1) {
        throw new DiskOutOfSpaceException("No more available volumes");
      }
     
      // since volumes could've been removed because of the failure
      // make sure we are not out of bounds
      if(curVolume >= volumes.length) {
        curVolume = 0;
      }
     
      int startVolume = curVolume;
     
      while (true) {
        FSVolume volume = volumes[curVolume];
        curVolume = (curVolume + 1) % volumes.length;
        if (volume.getAvailable() > blockSize) { return volume; }
        if (curVolume == startVolume) {
          throw new DiskOutOfSpaceException("Insufficient space for an additional block");
        }
      }
    }
View Full Code Here

Examples of org.apache.hadoop.util.DiskChecker.DiskOutOfSpaceException

      while (true) {
        FSVolume volume = volumes[curVolume];
        curVolume = (curVolume + 1) % volumes.length;
        if (volume.getAvailable() > blockSize) { return volume; }
        if (curVolume == startVolume) {
          throw new DiskOutOfSpaceException("Insufficient space for an additional block");
        }
      }
    }
View Full Code Here

Examples of org.apache.hadoop.util.DiskChecker.DiskOutOfSpaceException

   
    // construct a RBW replica with the new GS
    File blkfile = replicaInfo.getBlockFile();
    FsVolumeImpl v = (FsVolumeImpl)replicaInfo.getVolume();
    if (v.getAvailable() < estimateBlockLen - replicaInfo.getNumBytes()) {
      throw new DiskOutOfSpaceException("Insufficient space for appending to "
          + replicaInfo);
    }
    File newBlkFile = new File(v.getRbwDir(bpid), replicaInfo.getBlockName());
    File oldmeta = replicaInfo.getMetaFile();
    ReplicaBeingWritten newReplicaInfo = new ReplicaBeingWritten(
View Full Code Here

Examples of org.apache.hadoop.util.DiskChecker.DiskOutOfSpaceException

  @Override
  public synchronized V chooseVolume(List<V> volumes,
      final long replicaSize) throws IOException {
    if (volumes.size() < 1) {
      throw new DiskOutOfSpaceException("No more available volumes");
    }
   
    AvailableSpaceVolumeList volumesWithSpaces =
        new AvailableSpaceVolumeList(volumes);
   
View Full Code Here

Examples of org.apache.hadoop.util.DiskChecker.DiskOutOfSpaceException

      while (true) {
        FSVolume volume = volumes[curVolume];
        curVolume = (curVolume + 1) % volumes.length;
        if (volume.getAvailable() >= blockSize) { return volume; }
        if (curVolume == startVolume) {
          throw new DiskOutOfSpaceException("Insufficient space for an additional block");
        }
      }
    }
View Full Code Here

Examples of org.apache.hadoop.util.DiskChecker.DiskOutOfSpaceException

  /* Check if there is no space in disk or the disk is read-only
   *  when IOException occurs.
   * If so, handle the error */
  private void checkDiskError( IOException e ) throws IOException {
    if (e.getMessage().startsWith("No space left on device")) {
      throw new DiskOutOfSpaceException("No space left on device");
    } else {
      checkDiskError();
    }
  }
View Full Code Here

Examples of org.apache.hadoop.util.DiskChecker.DiskOutOfSpaceException

    }
    LOG.warn("checkDiskError: exception: ", e);
   
    if (e.getMessage() != null &&
        e.getMessage().startsWith("No space left on device")) {
      throw new DiskOutOfSpaceException("No space left on device");
    } else {
      checkDiskError();
    }
  }
View Full Code Here

Examples of org.apache.hadoop.util.DiskChecker.DiskOutOfSpaceException

     
    private FSVolume getNextVolume(long blockSize) throws IOException {
      FSVolume[] volumes = this.getVolumes();

      if(volumes.length < 1) {
        throw new DiskOutOfSpaceException("No more available volumes");
      }
     
      // since volumes could've been removed because of the failure
      // make sure we are not out of bounds
      if (curVolume >= volumes.length) {
        curVolume = 0;
      }

      int startVolume = curVolume;

      while (true) {
        FSVolume volume = volumes[curVolume];
        curVolume = (curVolume + 1) % volumes.length;
        if (volume.getAvailable() > blockSize) {
          return volume;
        }
        if (curVolume == startVolume) {
          throw new DiskOutOfSpaceException(
              "Insufficient space for an additional block");
        }
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.