hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <j...@apache.org>
Subject [jira] [Work logged] (HDFS-15554) RBF: force router check file existence in destinations before adding/updating mount points
Date Wed, 02 Sep 2020 04:57:00 GMT

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

ASF GitHub Bot logged work on HDFS-15554:

                Author: ASF GitHub Bot
            Created on: 02/Sep/20 04:56
            Start Date: 02/Sep/20 04:56
    Worklog Time Spent: 10m 
      Work Description: fengnanli commented on a change in pull request #2266:
URL: https://github.com/apache/hadoop/pull/2266#discussion_r481691251

File path: hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterAdminServer.java
@@ -562,11 +595,35 @@ public GetDestinationResponse getDestination(
       LOG.error("Cannot get location for {}: {}",
           src, ioe.getMessage());
-    if (nsIds.isEmpty() && !locations.isEmpty()) {
-      String nsId = locations.get(0).getNameserviceId();
-      nsIds.add(nsId);
+    return nsIds;
+  }
+  /**
+   * Verify the file exists in destination nameservices to avoid dangling
+   * mount points.
+   *
+   * @param entry the new mount points added, could be from add or update.
+   * @return destination nameservices where the file doesn't exist.
+   * @throws IOException
+   */
+  private List<String> verifyFileInDestinations(MountTable entry)

Review comment:
       Yeah, I can add that.
   This logic change will break a lot of current tests listed by yetus above. What is a good
practice here? I have two ideas in mind:
   1) make the logic based on a command option when adding/updating mount tables.
   2) add mock (if possible) like what I did for TestRouterAdmin.java to fake out the dirs
in namenodes.
   I like 2 since I think this should be the default check, what's your opinion?

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

Issue Time Tracking

    Worklog Id:     (was: 477610)
    Time Spent: 50m  (was: 40m)

> RBF: force router check file existence in destinations before adding/updating mount points
> ------------------------------------------------------------------------------------------
>                 Key: HDFS-15554
>                 URL: https://issues.apache.org/jira/browse/HDFS-15554
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Fengnan Li
>            Assignee: Fengnan Li
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
> Adding/Updating mount points right now is only a router action without validation in
the downstream namenodes for the destination files/directories.
> In practice we have set up the dangling mount points and when clients call listStatus
they would get the file returned, but then if they try to access the file FileNotFoundException
would be thrown out.

This message was sent by Atlassian Jira

To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org

View raw message