aljoscha commented on a change in pull request #13394:
URL: https://github.com/apache/flink/pull/13394#discussion_r488751183



##########
File path: 
flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/fs/hdfs/LocatedHadoopFileStatus.java
##########
@@ -0,0 +1,49 @@
+/*
+ * 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.flink.runtime.fs.hdfs;
+
+import org.apache.flink.core.fs.BlockLocation;
+import org.apache.flink.core.fs.FileStatus;
+import org.apache.flink.core.fs.LocatedFileStatus;
+
+/**
+ * Concrete implementation of the {@link FileStatus} interface for the
+ * Hadoop Distribution File System.

Review comment:
       ```suggestion
    * Concrete implementation of the {@link LocatedFileStatus} interface for the
    * Hadoop Distributed File System.
   ```
   
   The `Distribution` -> `Distributed` bit is a copy-and-paste error, could 
also fix in `HadoopFileStatus`.

##########
File path: 
flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/fs/hdfs/HadoopFileStatus.java
##########
@@ -77,4 +77,17 @@ public boolean isDir() {
        public org.apache.hadoop.fs.FileStatus getInternalFileStatus() {
                return this.fileStatus;
        }
+
+       // 
------------------------------------------------------------------------
+
+       /**
+        * Creates a new {@code HadoopFileStatus} from Hadoop's {@link 
org.apache.hadoop.fs.FileStatus}.
+        * If Hadoop's file status is <i>located</i>, i.e., it contains block 
information, then this method
+        * returns an implementation of Flink's {@link 
org.apache.flink.core.fs.LocatedFileStatus}.
+        */
+       public static HadoopFileStatus fromHadoopStatus(final 
org.apache.hadoop.fs.FileStatus fileStatus) {

Review comment:
       It feels a bit off that `HadoopFileStatus` knows about its subclasses 
but I think here it's ok.




----------------------------------------------------------------
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:
[email protected]


Reply via email to