Package com.netflix.priam.backup

Examples of com.netflix.priam.backup.BackupRestoreException


            compress.decompressAndClose(new BufferedInputStream(rris, (int)bufSize), os);
            bytesDownloaded.addAndGet(contentLen);
        }
        catch (Exception e)
        {
            throw new BackupRestoreException(e.getMessage(), e);
        }
    }
View Full Code Here


                executor.submit(partUploader);
                bytesUploaded.addAndGet(chunk.length);
            }
            executor.sleepTillEmpty();
            if (partNum != partETags.size())
                throw new BackupRestoreException("Number of parts(" + partNum + ")  does not match the uploaded parts(" + partETags.size() + ")");
            new S3PartUploader(s3Client, part, partETags).completeUpload();
           
            if (logger.isDebugEnabled())
            { 
               final S3ResponseMetadata responseMetadata = s3Client.getCachedResponseMetadata(initRequest);
               final String requestId = responseMetadata.getRequestId(); // "x-amz-request-id" header
               final String hostId = responseMetadata.getHostId(); // "x-amz-id-2" header
               logger.debug("S3 AWS x-amz-request-id[" + requestId + "], and x-amz-id-2[" + hostId + "]");
           
           
        }
        catch (Exception e)
        {
            new S3PartUploader(s3Client, part, partETags).abortUpload();
            throw new BackupRestoreException("Error uploading file " + path.getFileName(), e);
        } finally {
            IOUtils.closeQuietly(in);
        }
    }
View Full Code Here

      String filePath) throws BackupRestoreException {
    try {
      // Calling original Download method
      download(path, os);
    } catch (Exception e) {
      throw new BackupRestoreException(e.getMessage(), e);
    }

  }
View Full Code Here

        req.setMd5Digest(SystemUtils.toBase64(dataPart.getMd5()));
        req.setInputStream(new ByteArrayInputStream(dataPart.getPartData()));
        UploadPartResult res = client.uploadPart(req);
        PartETag partETag = res.getPartETag();
        if (!partETag.getETag().equals(SystemUtils.toHex(dataPart.getMd5())))
            throw new BackupRestoreException("Unable to match MD5 for part " + dataPart.getPartNo());
        partETags.add(partETag);
        return null;
    }
View Full Code Here

            downloadedFiles.add(path.getRemotePath());
            System.out.println("Downloading " + path.getRemotePath());
        }
        catch (IOException io)
        {
            throw new BackupRestoreException(io.getMessage(), io);
        }
    }
View Full Code Here

            downloadedFiles.add(path.getRemotePath());
            System.out.println("Downloading " + path.getRemotePath());
        }
        catch (IOException io)
        {
            throw new BackupRestoreException(io.getMessage(), io);
        }
   
  }
View Full Code Here

TOP

Related Classes of com.netflix.priam.backup.BackupRestoreException

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.