This class is a tool for migrating data from an older to a newer version of an S3 filesystem.
All files in the filesystem are migrated by re-writing the block metadata - no datafiles are touched.
245246247248249250251252253
} } catch (S3ServiceException e) { if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); } throw new S3Exception(e); } System.out.println(sb); }
224225226227228229230231
private void handleServiceException(S3ServiceException e) throws IOException { if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); } else { throw new S3Exception(e); } }
143144145146147148149150
mpUtils.uploadObjects(bucket.getName(), s3Service, objectsToUploadAsMultipart, null); } catch (ServiceException e) { handleServiceException(e); } catch (Exception e) { throw new S3Exception(e); } }
400401402403404405406407
} else { if(LOG.isDebugEnabled()) { LOG.debug("S3 Error code: " + e.getS3ErrorCode() + "; S3 Error message: " + e.getS3ErrorMessage()); } throw new S3Exception(e); } }
5253545556575859606162
this.s3Service = new RestS3Service(awsCredentials); } catch (S3ServiceException e) { if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); } throw new S3Exception(e); } bucket = new S3Bucket(uri.getHost()); createBucket(bucket.getName());
6768697071727374
s3Service.createBucket(bucketName); } catch (S3ServiceException e) { if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); } throw new S3Exception(e); } }
8990919293949596979899
s3Service.putObject(bucket, object); } catch (S3ServiceException e) { if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); } throw new S3Exception(e); } finally { if (in != null) { try { in.close(); } catch (IOException e) {
112113114115116117118119
s3Service.putObject(bucket, object); } catch (S3ServiceException e) { if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); } throw new S3Exception(e); } }
129130131132133134135136
return null; } if (e.getCause() instanceof IOException) { throw (IOException) e.getCause(); } throw new S3Exception(e); } }
144145146147148149150151