[ 
https://issues.apache.org/jira/browse/HDFS-16728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17578789#comment-17578789
 ] 

ASF GitHub Bot commented on HDFS-16728:
---------------------------------------

slfan1989 commented on code in PR #4734:
URL: https://github.com/apache/hadoop/pull/4734#discussion_r944106740


##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/NoLocationException.java:
##########
@@ -0,0 +1,33 @@
+/**
+ * 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 java.io.IOException;
+
+/**
+ * This exception is thrown when can not get any mount point for the input 
path.
+ * RBF cannot forward any requests for the path.
+ */
+public class NoLocationException extends IOException {
+
+  private static final long serialVersionUID = 1L;

Review Comment:
   Does this part of the code make sense? Why do we assign a value of 1?





> RBF throw IndexOutOfBoundsException with disableNameServices
> ------------------------------------------------------------
>
>                 Key: HDFS-16728
>                 URL: https://issues.apache.org/jira/browse/HDFS-16728
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: ZanderXu
>            Assignee: ZanderXu
>            Priority: Major
>              Labels: pull-request-available
>
> RBF will throw an IndexOutOfBoundsException when the namespace is disabled.
> Suppose we have a mount point /a/b -> ns0 -> /a/b and we disabled the ns0.  
> RBF will throw IndexOutOfBoundsException during handling requests with path 
> starting with /a/b.
> {code:java}
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0    at 
> java.util.ArrayList.rangeCheck(ArrayList.java:657)
>     at java.util.ArrayList.get(ArrayList.java:433)
>     at 
> org.apache.hadoop.hdfs.server.federation.router.RouterClientProtocol.mkdirs(RouterClientProtocol.java:756)
>     at 
> org.apache.hadoop.hdfs.server.federation.router.RouterRpcServer.mkdirs(RouterRpcServer.java:980)
>  {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to