public final class DirectoryPolicyImpl extends Object implements DirectoryPolicy
As only the DELETE policy is supported, the policy logic here is relatively straightforward.
DirectoryPolicy.MarkerPolicy| Modifier and Type | Field and Description |
|---|---|
static DirectoryPolicy |
DELETE
Delete all markers.
|
static String |
UNKNOWN_MARKER_POLICY
Error string when unable to parse the marker policy option.
|
| Constructor and Description |
|---|
DirectoryPolicyImpl(DirectoryPolicy.MarkerPolicy markerPolicy,
Predicate<org.apache.hadoop.fs.Path> authoritativeness)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static Set<DirectoryPolicy.MarkerPolicy> |
availablePolicies()
Enumerate all available policies.
|
String |
describe()
Describe the policy for marker tools and logs.
|
static DirectoryPolicy |
getDirectoryPolicy(org.apache.hadoop.conf.Configuration conf)
Create/Get the policy for this configuration.
|
DirectoryPolicy.MarkerPolicy |
getMarkerPolicy()
Get the marker policy.
|
boolean |
hasPathCapability(org.apache.hadoop.fs.Path path,
String capability)
Return path policy for store and paths.
|
boolean |
keepDirectoryMarkers(org.apache.hadoop.fs.Path path)
Should a directory marker be retained?
|
String |
toString() |
public static final String UNKNOWN_MARKER_POLICY
public static final DirectoryPolicy DELETE
public DirectoryPolicyImpl(DirectoryPolicy.MarkerPolicy markerPolicy, Predicate<org.apache.hadoop.fs.Path> authoritativeness)
markerPolicy - marker policyauthoritativeness - function for authoritativenesspublic boolean keepDirectoryMarkers(org.apache.hadoop.fs.Path path)
DirectoryPolicykeepDirectoryMarkers in interface DirectoryPolicypath - path a file/directory is being created with.public DirectoryPolicy.MarkerPolicy getMarkerPolicy()
DirectoryPolicygetMarkerPolicy in interface DirectoryPolicypublic String describe()
DirectoryPolicydescribe in interface DirectoryPolicypublic boolean hasPathCapability(org.apache.hadoop.fs.Path path,
String capability)
hasPathCapability in interface DirectoryPolicypath - pathcapability - capabilitypublic static DirectoryPolicy getDirectoryPolicy(org.apache.hadoop.conf.Configuration conf)
conf - configpublic static Set<DirectoryPolicy.MarkerPolicy> availablePolicies()
Copyright © 2008–2021 Apache Software Foundation. All rights reserved.