public interface URIHandler
Modifier and Type | Interface and Description |
---|---|
static class |
URIHandler.Context |
static class |
URIHandler.DependencyType
Type of the dependency.
|
Modifier and Type | Method and Description |
---|---|
void |
delete(URI uri,
org.apache.hadoop.conf.Configuration conf,
String user)
Delete a URI
|
void |
delete(URI uri,
URIHandler.Context context)
Delete a URI
|
void |
destroy()
Destroy the URIHandler
|
boolean |
exists(URI uri,
org.apache.hadoop.conf.Configuration conf,
String user)
Check if the dependency identified by the URI is available
|
boolean |
exists(URI uri,
URIHandler.Context context)
Check if the dependency identified by the URI is available
|
List<Class<?>> |
getClassesForLauncher()
Get list of classes to ship to launcher for LauncherURIHandler
|
URIHandler.Context |
getContext(URI uri,
org.apache.hadoop.conf.Configuration conf,
String user,
boolean readOnly)
Get the Context which can be used to access URI of the same scheme and
host
|
URIHandler.DependencyType |
getDependencyType(URI uri)
Get the dependency type of the URI.
|
Class<? extends LauncherURIHandler> |
getLauncherURIHandlerClass()
Get the URIHandler that will be used to handle the supported schemes in launcher
|
Set<String> |
getSupportedSchemes()
Get the list of uri schemes supported by this URIHandler
|
String |
getURIWithDoneFlag(String uri,
String doneFlag)
Get the URI based on the done flag
|
String |
getURIWithoutDoneFlag(String uri,
String doneFlag)
Get the URI path from path which has done flag
|
void |
init(org.apache.hadoop.conf.Configuration conf)
Initialize the URIHandler
|
void |
registerForNotification(URI uri,
org.apache.hadoop.conf.Configuration conf,
String user,
String actionID)
Register for notifications in case of a push dependency
|
boolean |
unregisterFromNotification(URI uri,
String actionID)
Unregister from notifications in case of a push dependency
|
void |
validate(String uri)
Check whether the URI is valid or not
|
void init(org.apache.hadoop.conf.Configuration conf)
conf
- Configuration for initializationSet<String> getSupportedSchemes()
Class<? extends LauncherURIHandler> getLauncherURIHandlerClass()
List<Class<?>> getClassesForLauncher()
URIHandler.DependencyType getDependencyType(URI uri) throws URIHandlerException
uri
- the URI to get the dependency type fromURIHandlerException
- in case of errorvoid registerForNotification(URI uri, org.apache.hadoop.conf.Configuration conf, String user, String actionID) throws URIHandlerException
uri
- The URI to check for availabilityconf
- Configuration to access the URIuser
- name of the user the URI should be accessed asactionID
- The id of action which depends on the availability of the uriURIHandlerException
- in case of errorboolean unregisterFromNotification(URI uri, String actionID)
uri
- The URI to be removed from missing dependencyactionID
- The id of action which was dependent on the uri.URIHandler.Context getContext(URI uri, org.apache.hadoop.conf.Configuration conf, String user, boolean readOnly) throws URIHandlerException
uri
- URI which identifies the scheme and hostconf
- Configuration to access the URIuser
- name of the user the URI should be accessed asreadOnly
- indicate if operation is read-onlyURIHandlerException
- in case of errorboolean exists(URI uri, URIHandler.Context context) throws URIHandlerException
uri
- URI of the dependencycontext
- Context to access the URItrue
if the URI exists; false
if the
URI does not existURIHandlerException
- in case of errorboolean exists(URI uri, org.apache.hadoop.conf.Configuration conf, String user) throws URIHandlerException
uri
- URI of the dependencyconf
- Configuration to access the URIuser
- name of the user the URI should be accessed as. If null the
logged in user is used.true
if the URI exists; false
if the
URI does not existURIHandlerException
- in case of errorvoid delete(URI uri, URIHandler.Context context) throws URIHandlerException
uri
- URIcontext
- Context to access the URIURIHandlerException
- in case of errorvoid delete(URI uri, org.apache.hadoop.conf.Configuration conf, String user) throws URIHandlerException
uri
- URIconf
- Configuration to access the URIuser
- name of the user the URI should be accessed asURIHandlerException
- in case of errorString getURIWithDoneFlag(String uri, String doneFlag) throws URIHandlerException
uri
- URI of the dependencydoneFlag
- flag that determines URI availabilityURIHandlerException
- in case of errorString getURIWithoutDoneFlag(String uri, String doneFlag) throws URIHandlerException
uri
- URI of the dependencydoneFlag
- flag that determines URI availabilityURIHandlerException
- in case of errorvoid validate(String uri) throws URIHandlerException
uri
- the uriURIHandlerException
- if the uri is not validvoid destroy()
Copyright © 2018 Apache Software Foundation. All rights reserved.