public class ProgressiveRenameTracker extends RenameTracker
Algorithm
RenameTracker.fileCopied() callbacks
are raised, the metastore is updated with the new file entry.
LOG| Constructor and Description |
|---|
ProgressiveRenameTracker(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 added.
|
void |
fileCopied(org.apache.hadoop.fs.Path sourcePath,
S3ObjectAttributes sourceAttributes,
S3ObjectAttributes destAttributes,
org.apache.hadoop.fs.Path destPath,
long blockSize,
boolean addAncestors)
When a file is copied, any ancestors
are calculated and then the store is updated with
the destination entries.
|
void |
moveSourceDirectory()
Top level directory move.
|
void |
sourceObjectsDeleted(Collection<org.apache.hadoop.fs.Path> paths)
As source objects are deleted, so is the list of entries.
|
convertToIOException, deleteFailed, getDest, getMetadataStore, getOperationState, getOwner, getSourceRoot, noteRenameFinished, renameFailed, toStringactivateAuditSpan, getAuditSpan, getStoreContextpublic ProgressiveRenameTracker(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
The source entries are added to the pathsToDelete list.
fileCopied in class RenameTrackersourcePath - path of sourcesourceAttributes - status of source.destAttributes - destination attributesdestPath - destination path.blockSize - block size.addAncestors - should ancestors be added?IOException - failurepublic void directoryMarkerCopied(org.apache.hadoop.fs.Path sourcePath,
org.apache.hadoop.fs.Path destPath,
boolean addAncestors)
throws IOException
directoryMarkerCopied in class RenameTrackersourcePath - status of source.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
sourceObjectsDeleted in class RenameTrackerpaths - path of objects deleted.IOException - failure.public void completeRename()
throws IOException
RenameTrackercompleteRename in class RenameTrackerIOException - failure.Copyright © 2008–2022 Apache Software Foundation. All rights reserved.