HDFS-14170. [SBN read] Fix checkstyle warnings related to SBN reads. Contributed by Konstantin V Shvachko.

This commit is contained in:
Konstantin V Shvachko 2018-12-24 09:39:20 -08:00
parent c546b12e45
commit bd2a59e508
2 changed files with 4 additions and 4 deletions

View File

@ -591,7 +591,7 @@ public static <T> ProtocolProxy<T> getProtocolProxy(Class<T> protocol,
/** /**
* Get a protocol proxy that contains a proxy connection to a remote server * Get a protocol proxy that contains a proxy connection to a remote server
* and a set of methods that are supported by the server * and a set of methods that are supported by the server.
* *
* @param protocol protocol * @param protocol protocol
* @param clientVersion client's version * @param clientVersion client's version

View File

@ -110,7 +110,7 @@ public class ObserverReadProxyProvider<T extends ClientProtocol>
public ObserverReadProxyProvider( public ObserverReadProxyProvider(
Configuration conf, URI uri, Class<T> xface, HAProxyFactory<T> factory) { Configuration conf, URI uri, Class<T> xface, HAProxyFactory<T> factory) {
this(conf, uri, xface, factory, this(conf, uri, xface, factory,
new ConfiguredFailoverProxyProvider<>(conf, uri, xface,factory)); new ConfiguredFailoverProxyProvider<>(conf, uri, xface, factory));
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@ -144,7 +144,7 @@ public ObserverReadProxyProvider(
combinedInfo.append(']'); combinedInfo.append(']');
T wrappedProxy = (T) Proxy.newProxyInstance( T wrappedProxy = (T) Proxy.newProxyInstance(
ObserverReadInvocationHandler.class.getClassLoader(), ObserverReadInvocationHandler.class.getClassLoader(),
new Class<?>[] { xface }, new ObserverReadInvocationHandler()); new Class<?>[] {xface}, new ObserverReadInvocationHandler());
combinedProxy = new ProxyInfo<>(wrappedProxy, combinedInfo.toString()); combinedProxy = new ProxyInfo<>(wrappedProxy, combinedInfo.toString());
// TODO : make this configurable or remove this variable // TODO : make this configurable or remove this variable
this.observerReadEnabled = true; this.observerReadEnabled = true;
@ -232,7 +232,7 @@ private synchronized void changeProxy(NNProxyInfo<T> initial) {
/** /**
* An InvocationHandler to handle incoming requests. This class's invoke * An InvocationHandler to handle incoming requests. This class's invoke
* method contains the primary logic for redirecting to observers. * method contains the primary logic for redirecting to observers.
* *
* If observer reads are enabled, attempt to send read operations to the * If observer reads are enabled, attempt to send read operations to the
* current proxy. If it is not an observer, or the observer fails, adjust * current proxy. If it is not an observer, or the observer fails, adjust
* the current proxy and retry on the next one. If all proxies are tried * the current proxy and retry on the next one. If all proxies are tried