Package org.apache.hadoop.fs.swift.exceptions

Examples of org.apache.hadoop.fs.swift.exceptions.SwiftException


      if (SwiftProtocolConstants.HEADER_LAST_MODIFIED.equals(headerName)) {
        final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(PATTERN);
        try {
          lastModified = simpleDateFormat.parse(header.getValue()).getTime();
        } catch (ParseException e) {
          throw new SwiftException("Failed to parse " + header.toString(), e);
        }
      }
    }
    if (lastModified == 0) {
      lastModified = System.currentTimeMillis();
View Full Code Here


   */
  private void copyObject(SwiftObjectPath srcObject,
                                    SwiftObjectPath destObject) throws
          IOException {
    if (srcObject.isEqualToOrParentOf(destObject)) {
      throw new SwiftException(
        "Can't copy " + srcObject + " onto " + destObject);
    }
    //do the copy
    boolean copySucceeded = swiftRestClient.copyObject(srcObject, destObject);
    if (!copySucceeded) {
      throw new SwiftException("Copy of " + srcObject + " to "
              + destObject + "failed");
    }
  }
View Full Code Here

              null,
              null);

      return new Path(fullUri);
    } catch (URISyntaxException e) {
      throw new SwiftException("Specified path " + path + " is incorrect", e);
    }
  }
View Full Code Here

              null,
              null);

      return new Path(fullUri);
    } catch (URISyntaxException e) {
      throw new SwiftException("Specified path " + path + " is incorrect", e);
    }
  }
View Full Code Here

  }

  private File newBackupFile() throws IOException {
    File dir = new File(conf.get("hadoop.tmp.dir"));
    if (!dir.mkdirs() && !dir.exists()) {
      throw new SwiftException("Cannot create Swift buffer directory: " + dir);
    }
    File result = File.createTempFile("output-", ".tmp", dir);
    result.deleteOnExit();
    return result;
  }
View Full Code Here

    if (httpStream != null) {
      int result;
      for (long i = 0; i < bytes; i++) {
        result = httpStream.read();
        if (result < 0) {
          throw new SwiftException("Received error code while chomping input");
        }
        count ++;
        incPos(1);
      }
    }
View Full Code Here

      if (SwiftProtocolConstants.HEADER_LAST_MODIFIED.equals(headerName)) {
        final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(PATTERN);
        try {
          lastModified = simpleDateFormat.parse(header.getValue()).getTime();
        } catch (ParseException e) {
          throw new SwiftException("Failed to parse " + header.toString(), e);
        }
      }
    }
    if (lastModified == 0) {
      lastModified = System.currentTimeMillis();
View Full Code Here

   */
  private void copyObject(SwiftObjectPath srcObject,
                                    SwiftObjectPath destObject) throws
          IOException {
    if (srcObject.isEqualToOrParentOf(destObject)) {
      throw new SwiftException(
        "Can't copy " + srcObject + " onto " + destObject);
    }
    //do the copy
    boolean copySucceeded = swiftRestClient.copyObject(srcObject, destObject);
    if (!copySucceeded) {
      throw new SwiftException("Copy of " + srcObject + " to "
              + destObject + "failed");
    }
  }
View Full Code Here

              null,
              null);

      return new Path(fullUri);
    } catch (URISyntaxException e) {
      throw new SwiftException("Specified path " + path + " is incorrect", e);
    }
  }
View Full Code Here

              null,
              null);

      return new Path(fullUri);
    } catch (URISyntaxException e) {
      throw new SwiftException("Specified path " + path + " is incorrect", e);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.fs.swift.exceptions.SwiftException

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.