[ 
https://issues.apache.org/jira/browse/HDFS-13522?focusedWorklogId=781882&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-781882
 ]

ASF GitHub Bot logged work on HDFS-13522:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/Jun/22 00:40
            Start Date: 16/Jun/22 00:40
    Worklog Time Spent: 10m 
      Work Description: simbadzina commented on code in PR #4441:
URL: https://github.com/apache/hadoop/pull/4441#discussion_r898588205


##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterGSIContext.java:
##########
@@ -0,0 +1,56 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hdfs.server.federation.router;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.hdfs.ClientGSIContext;
+import org.apache.hadoop.ipc.protobuf.RpcHeaderProtos.RpcRequestHeaderProto;
+
+/**
+ * Global State ID context for the router.
+ * <p>
+ * This is the router side implementation responsible for receiving
+ * state alignment info from server(s).
+ */
[email protected]
[email protected]
+public class RouterGSIContext extends ClientGSIContext {

Review Comment:
   I feel the alignment between routers and namenode can be taken care of with 
just ClientGSIContext.
   How does the router not updating the lastSeenStateID when communicating with 
the namenode help?



##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/ConnectionManager.java:
##########
@@ -231,6 +246,18 @@ public ConnectionContext 
getConnection(UserGroupInformation ugi,
     return conn;
   }
 
+  /**
+   * Dynamically reconfigure the enableObserverRead.
+   */
+  public void reconfEnableObserverRead(boolean enableObserverRead) {
+    readLock.lock();
+    this.enableObserverRead = enableObserverRead;
+    for (RouterGSIContext routerGSIContext : alignmentContexts.values()) {
+      routerGSIContext.setEnableObserverRead(enableObserverRead);
+    }
+    readLock.unlock();
+  }
+

Review Comment:
   Why do we need to reconfigure observer reads dynamically?





Issue Time Tracking
-------------------

    Worklog Id:     (was: 781882)
    Time Spent: 12h 40m  (was: 12.5h)

> RBF: Support observer node from Router-Based Federation
> -------------------------------------------------------
>
>                 Key: HDFS-13522
>                 URL: https://issues.apache.org/jira/browse/HDFS-13522
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: federation, namenode
>            Reporter: Erik Krogen
>            Assignee: Simbarashe Dzinamarira
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HDFS-13522.001.patch, HDFS-13522.002.patch, 
> HDFS-13522_WIP.patch, RBF_ Observer support.pdf, Router+Observer RPC 
> clogging.png, ShortTerm-Routers+Observer.png
>
>          Time Spent: 12h 40m
>  Remaining Estimate: 0h
>
> Changes will need to occur to the router to support the new observer node.
> One such change will be to make the router understand the observer state, 
> e.g. {{FederationNamenodeServiceState}}.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to