public class DirMarkerTracker extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DirMarkerTracker.Marker
This is a marker entry stored in the map and
returned as markers are deleted.
|
| Constructor and Description |
|---|
DirMarkerTracker(org.apache.hadoop.fs.Path basePath,
boolean recordSurplusMarkers)
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
List<DirMarkerTracker.Marker> |
fileFound(org.apache.hadoop.fs.Path path,
String key,
S3ALocatedFileStatus source)
A file has been found.
|
org.apache.hadoop.fs.Path |
getBasePath()
Get the base path of the tracker.
|
int |
getFilesFound() |
org.apache.hadoop.fs.Path |
getLastDirChecked() |
Map<org.apache.hadoop.fs.Path,DirMarkerTracker.Marker> |
getLeafMarkers()
Get the map of leaf markers.
|
int |
getMarkersFound() |
int |
getObjectsFound()
How many objects were found.
|
int |
getScanCount() |
Map<org.apache.hadoop.fs.Path,DirMarkerTracker.Marker> |
getSurplusMarkers()
Get the map of surplus markers.
|
List<DirMarkerTracker.Marker> |
markerFound(org.apache.hadoop.fs.Path path,
String key,
S3ALocatedFileStatus source)
A marker has been found; this may or may not be a leaf.
|
List<org.apache.hadoop.fs.Path> |
removeAllowedMarkers(DirectoryPolicy policy)
Scan the surplus marker list and remove from it all where the directory
policy says "keep".
|
String |
toString() |
public DirMarkerTracker(org.apache.hadoop.fs.Path basePath,
boolean recordSurplusMarkers)
basePath - base path of trackrecordSurplusMarkers - save surplus markers to a map?public org.apache.hadoop.fs.Path getBasePath()
public List<DirMarkerTracker.Marker> markerFound(org.apache.hadoop.fs.Path path, String key, S3ALocatedFileStatus source)
path - marker pathkey - object keysource - listing sourcepublic List<DirMarkerTracker.Marker> fileFound(org.apache.hadoop.fs.Path path, String key, S3ALocatedFileStatus source)
path - marker pathkey - object keysource - listing sourcepublic Map<org.apache.hadoop.fs.Path,DirMarkerTracker.Marker> getLeafMarkers()
public Map<org.apache.hadoop.fs.Path,DirMarkerTracker.Marker> getSurplusMarkers()
public org.apache.hadoop.fs.Path getLastDirChecked()
public int getObjectsFound()
public int getScanCount()
public int getFilesFound()
public int getMarkersFound()
public List<org.apache.hadoop.fs.Path> removeAllowedMarkers(DirectoryPolicy policy)
policy - policy to use when auditing markers for
inclusion/exclusion.Copyright © 2008–2022 Apache Software Foundation. All rights reserved.