org.apache.hadoop.mapred
Class ConfiguredFailoverProxyProvider<T>
java.lang.Object
org.apache.hadoop.mapred.ConfiguredFailoverProxyProvider<T>
- All Implemented Interfaces:
- java.io.Closeable, org.apache.hadoop.io.retry.FailoverProxyProvider<T>
public class ConfiguredFailoverProxyProvider<T>
- extends java.lang.Object
- implements org.apache.hadoop.io.retry.FailoverProxyProvider<T>
A FailoverProxyProvider implementation which allows one to configure two URIs
to connect to during fail-over. The first configured address is tried first,
and on a fail-over event the other address is tried.
Method Summary |
void |
close()
Close all the proxy objects which have been opened over the lifetime of
this proxy provider. |
java.lang.Class<T> |
getInterface()
|
T |
getProxy()
Lazily initialize the RPC proxy object. |
void |
performFailover(T currentProxy)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfiguredFailoverProxyProvider
public ConfiguredFailoverProxyProvider(org.apache.hadoop.conf.Configuration conf,
java.lang.String jtAddress,
java.lang.Class<T> xface)
getInterface
public java.lang.Class<T> getInterface()
- Specified by:
getInterface
in interface org.apache.hadoop.io.retry.FailoverProxyProvider<T>
getProxy
public T getProxy()
- Lazily initialize the RPC proxy object.
- Specified by:
getProxy
in interface org.apache.hadoop.io.retry.FailoverProxyProvider<T>
performFailover
public void performFailover(T currentProxy)
- Specified by:
performFailover
in interface org.apache.hadoop.io.retry.FailoverProxyProvider<T>
close
public void close()
throws java.io.IOException
- Close all the proxy objects which have been opened over the lifetime of
this proxy provider.
- Specified by:
close
in interface java.io.Closeable
- Throws:
java.io.IOException
Copyright © 2009 The Apache Software Foundation