public NativeS3FsOutputStream(Configuration conf, NativeFileSystemStore store, String key, Progressable progress, int bufferSize) throws IOException { this.conf = conf; this.key = key; this.backupFile = newBackupFile(); try { this.digest = MessageDigest.getInstance("MD5"); this.backupStream = new BufferedOutputStream(new DigestOutputStream( new FileOutputStream(backupFile), this.digest)); } catch (NoSuchAlgorithmException e) { LOG.warn("Cannot load MD5 digest algorithm," + "skipping message integrity check.", e); this.backupStream = new BufferedOutputStream( new FileOutputStream(backupFile)); } }
public NativeS3FsOutputStream(Configuration conf, NativeFileSystemStore store, String key, Progressable progress, int bufferSize) throws IOException { this.conf = conf; this.key = key; this.backupFile = newBackupFile(); LOG.info("OutputStream for key '" + key + "' writing to tempfile '" + this.backupFile + "'"); try { this.digest = MessageDigest.getInstance("MD5"); this.backupStream = new BufferedOutputStream(new DigestOutputStream( new FileOutputStream(backupFile), this.digest)); } catch (NoSuchAlgorithmException e) { LOG.warn("Cannot load MD5 digest algorithm," + "skipping message integrity check.", e); this.backupStream = new BufferedOutputStream( new FileOutputStream(backupFile)); } }
public NativeS3FsOutputStream(Configuration conf, NativeFileSystemStore store, String key, Progressable progress, int bufferSize) throws IOException { this.conf = conf; this.key = key; this.backupFile = newBackupFile(); try { this.digest = MessageDigest.getInstance("MD5"); this.backupStream = new BufferedOutputStream(new DigestOutputStream( new FileOutputStream(backupFile), this.digest)); } catch (NoSuchAlgorithmException e) { LOG.warn("Cannot load MD5 digest algorithm," + "skipping message integrity check.", e); this.backupStream = new BufferedOutputStream( new FileOutputStream(backupFile)); } }