private void restoreInProgressFile(final BucketState<BucketID> state) throws IOException { if (!state.hasInProgressResumableFile()) { return; } // we try to resume the previous in-progress file final ResumeRecoverable resumable = state.getInProgressResumableFile(); if (fsWriter.supportsResume()) { final RecoverableFsDataOutputStream stream = fsWriter.recover(resumable); inProgressPart = partFileFactory.resumeFrom( bucketId, stream, resumable, state.getInProgressFileCreationTime()); } else { // if the writer does not support resume, then we close the // in-progress part and commit it, as done in the case of pending files. fsWriter.recoverForCommit(resumable).commitAfterRecovery(); } if (fsWriter.requiresCleanupOfRecoverableState()) { fsWriter.cleanupRecoverableState(resumable); } }
private void restoreInProgressFile(final BucketState<BucketID> state) throws IOException { if (!state.hasInProgressResumableFile()) { return; } // we try to resume the previous in-progress file final ResumeRecoverable resumable = state.getInProgressResumableFile(); if (fsWriter.supportsResume()) { final RecoverableFsDataOutputStream stream = fsWriter.recover(resumable); inProgressPart = partFileFactory.resumeFrom( bucketId, stream, resumable, state.getInProgressFileCreationTime()); } else { // if the writer does not support resume, then we close the // in-progress part and commit it, as done in the case of pending files. fsWriter.recoverForCommit(resumable).commitAfterRecovery(); } if (fsWriter.requiresCleanupOfRecoverableState()) { fsWriter.cleanupRecoverableState(resumable); } }
private void restoreInProgressFile(final BucketState<BucketID> state) throws IOException { if (!state.hasInProgressResumableFile()) { return; } // we try to resume the previous in-progress file final ResumeRecoverable resumable = state.getInProgressResumableFile(); if (fsWriter.supportsResume()) { final RecoverableFsDataOutputStream stream = fsWriter.recover(resumable); inProgressPart = partFileFactory.resumeFrom( bucketId, stream, resumable, state.getInProgressFileCreationTime()); } else { // if the writer does not support resume, then we close the // in-progress part and commit it, as done in the case of pending files. fsWriter.recoverForCommit(resumable).commitAfterRecovery(); } if (fsWriter.requiresCleanupOfRecoverableState()) { fsWriter.cleanupRecoverableState(resumable); } }