public class DelayedUpdateRenameTracker extends RenameTracker
It is not currently instantiated by any of the active trackers, but is preserved to show that the original rename strategy can be implemented via the tracker model.
LOG| Constructor and Description |
|---|
DelayedUpdateRenameTracker(StoreContext storeContext,
MetadataStore metadataStore,
org.apache.hadoop.fs.Path sourceRoot,
org.apache.hadoop.fs.Path dest,
BulkOperationState operationState) |
| Modifier and Type | Method and Description |
|---|---|
void |
completeRename()
Complete the operation.
|
void |
directoryMarkerCopied(org.apache.hadoop.fs.Path sourcePath,
org.apache.hadoop.fs.Path destPath,
boolean addAncestors)
A directory marker has been copied.
|
void |
fileCopied(org.apache.hadoop.fs.Path sourcePath,
S3ObjectAttributes sourceAttributes,
S3ObjectAttributes destAttributes,
org.apache.hadoop.fs.Path destPath,
long blockSize,
boolean addAncestors)
A file has been copied.
|
void |
moveSourceDirectory()
Top level directory move.
|
IOException |
renameFailed(Exception ex)
Rename has failed.
|
void |
sourceObjectsDeleted(Collection<org.apache.hadoop.fs.Path> paths)
Note that source objects have been deleted.
|
convertToIOException, deleteFailed, getDest, getMetadataStore, getOperationState, getOwner, getSourceRoot, noteRenameFinished, toStringactivateAuditSpan, getAuditSpan, getStoreContextpublic DelayedUpdateRenameTracker(StoreContext storeContext, MetadataStore metadataStore, org.apache.hadoop.fs.Path sourceRoot, org.apache.hadoop.fs.Path dest, BulkOperationState operationState)
public void fileCopied(org.apache.hadoop.fs.Path sourcePath,
S3ObjectAttributes sourceAttributes,
S3ObjectAttributes destAttributes,
org.apache.hadoop.fs.Path destPath,
long blockSize,
boolean addAncestors)
throws IOException
RenameTrackerfileCopied in class RenameTrackersourcePath - source of the file. This may actually be different
from the path of the sourceAttributes. (HOW?)sourceAttributes - status of source.destAttributes - destination attributesdestPath - destination path.blockSize - block size.addAncestors - should ancestors be added?IOException - failure.public void directoryMarkerCopied(org.apache.hadoop.fs.Path sourcePath,
org.apache.hadoop.fs.Path destPath,
boolean addAncestors)
throws IOException
RenameTrackerdirectoryMarkerCopied in class RenameTrackersourcePath - source path.destPath - destination path.addAncestors - should ancestors be added?IOException - failure.public void moveSourceDirectory()
throws IOException
RenameTrackermoveSourceDirectory in class RenameTrackerIOException - on failurepublic void sourceObjectsDeleted(Collection<org.apache.hadoop.fs.Path> paths) throws IOException
RenameTrackersourceObjectsDeleted in class RenameTrackerpaths - path of objects deleted.IOExceptionpublic void completeRename()
throws IOException
RenameTrackercompleteRename in class RenameTrackerIOException - failure.public IOException renameFailed(Exception ex)
RenameTrackerThe metastore now needs to be updated with its current state even though the operation is incomplete. Implementations MUST NOT throw exceptions here, as this is going to be invoked in an exception handler. catch and log or catch and return/wrap.
The base implementation returns the IOE passed in and translates any AWS exception into an IOE.
renameFailed in class RenameTrackerex - the exception which caused the failure.
This is either an IOException or and AWS exceptionCopyright © 2008–2022 Apache Software Foundation. All rights reserved.