From 1a9ba9616a7e2279dcd5a30190b289945713054e Mon Sep 17 00:00:00 2001 From: Chao Sun Date: Wed, 31 Oct 2018 11:22:02 -0700 Subject: [PATCH] HDFS-14016. [SBN read] ObserverReadProxyProvider should enable observer read by default. Contributed by Chen Liang. --- .../hdfs/server/namenode/ha/ObserverReadProxyProvider.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProvider.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProvider.java index 87ca718f89a..17bad65ee94 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProvider.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProvider.java @@ -141,6 +141,8 @@ public class ObserverReadProxyProvider ObserverReadInvocationHandler.class.getClassLoader(), new Class[] { xface }, new ObserverReadInvocationHandler()); combinedProxy = new ProxyInfo<>(wrappedProxy, combinedInfo.toString()); + // TODO : make this configurable or remove this variable + this.observerReadEnabled = true; } public AlignmentContext getAlignmentContext() {