Package org.apache.hadoop.hdfs.protocol

Examples of org.apache.hadoop.hdfs.protocol.DSQuotaExceededException


    if (nsDelta>0 || dsDelta>0) {
      if (nsQuota >= 0 && nsQuota < newCount) {
        throw new NSQuotaExceededException(nsQuota, newCount);
      }
      if (dsQuota >= 0 && dsQuota < newDiskspace) {
        throw new DSQuotaExceededException(dsQuota, newDiskspace);
      }
    }
  }
View Full Code Here


    if (nsDelta>0 || dsDelta>0) {
      if (nsQuota >= 0 && nsQuota < newCount) {
        throw new NSQuotaExceededException(nsQuota, newCount);
      }
      if (dsQuota >= 0 && dsQuota < newDiskspace) {
        throw new DSQuotaExceededException(dsQuota, newDiskspace);
    }
    }
  }
View Full Code Here

                                  throws QuotaExceededException {
    if (nsQuota >= 0 && nsQuota < nsCount) {
      throw new NSQuotaExceededException(nsQuota, nsCount);
    }
    if (dsQuota >= 0 && dsQuota < diskspace) {
      throw new DSQuotaExceededException(dsQuota, diskspace);
    }
  }
View Full Code Here

   */
  @Test
  public void testDSQuotaExceededExceptionIsHumanReadable() throws Exception {
    Integer bytes = 1024;
    try {
      throw new DSQuotaExceededException(bytes, bytes);
    } catch(DSQuotaExceededException e) {
     
      assertEquals("The DiskSpace quota is exceeded: quota=1.0k " +
          "diskspace consumed=1.0k", e.getMessage());
    }
View Full Code Here

    if (nsDelta>0 || dsDelta>0) {
      if (nsQuota >= 0 && nsQuota < newCount) {
        throw new NSQuotaExceededException(nsQuota, newCount);
      }
      if (dsQuota >= 0 && dsQuota < newDiskspace) {
        throw new DSQuotaExceededException(dsQuota, newDiskspace);
      }
    }
  }
View Full Code Here

   */
  void verifyQuota(long nsDelta, long dsDelta) throws QuotaExceededException {
    verifyNamespaceQuota(nsDelta);

    if (Quota.isViolated(dsQuota, diskspace, dsDelta)) {
      throw new DSQuotaExceededException(dsQuota, diskspace + dsDelta);
    }
  }
View Full Code Here

   */
  @Test
  public void testDSQuotaExceededExceptionIsHumanReadable() throws Exception {
    Integer bytes = 1024;
    try {
      throw new DSQuotaExceededException(bytes, bytes);
    } catch(DSQuotaExceededException e) {
     
      assertEquals("The DiskSpace quota is exceeded: quota = 1024 B = 1 KB"
          + " but diskspace consumed = 1024 B = 1 KB", e.getMessage());
    }
View Full Code Here

   */
  @Test
  public void testDSQuotaExceededExceptionIsHumanReadable() throws Exception {
    Integer bytes = 1024;
    try {
      throw new DSQuotaExceededException(bytes, bytes);
    } catch(DSQuotaExceededException e) {
     
      assertEquals("The DiskSpace quota is exceeded: quota=1.0k " +
          "diskspace consumed=1.0k", e.getMessage());
    }
View Full Code Here

   */
  @Test
  public void testDSQuotaExceededExceptionIsHumanReadable() throws Exception {
    Integer bytes = 1024;
    try {
      throw new DSQuotaExceededException(bytes, bytes);
    } catch(DSQuotaExceededException e) {
     
      assertEquals("The DiskSpace quota is exceeded: quota = 1024 B = 1 KB"
          + " but diskspace consumed = 1024 B = 1 KB", e.getMessage());
    }
View Full Code Here

   */
  void verifyQuota(long nsDelta, long dsDelta) throws QuotaExceededException {
    verifyNamespaceQuota(nsDelta);

    if (Quota.isViolated(dsQuota, diskspace, dsDelta)) {
      throw new DSQuotaExceededException(dsQuota, diskspace + dsDelta);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hdfs.protocol.DSQuotaExceededException

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.