hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yiqun Lin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-11455) Fix javadoc warnings due to deprecated FileSystem APIs
Date Sat, 25 Feb 2017 00:54:45 GMT

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

Yiqun Lin commented on HDFS-11455:
----------------------------------

Hi [~liuml07],  seems there are many palces should be update across the project. Now this
JIRA is plan to focus on HDFS so I filed  this JIRA and make a quick fix. Changed the summary
to be different with HADOOP-14106. Will pleased to attach my patch if I have time to work
on HADOOP-14106. Only one question from me, as the summary showed in HADOOP-14106, don' we
need to fix this in other places which isn't unit tests? For example, in my patch, there is
one places is not unit test.
{code}
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/ErasureCodeBenchmarkThroughput.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/ErasureCodeBenchmarkThroughput.java
@@ -403,7 +403,7 @@ private long readFile(Path path) throws IOException {
     @Override
     public Long call() throws Exception {
       Path path = new Path(getFilePathForThread());
-      if (!fs.exists(path) || fs.isDirectory(path)) {
+      if (!fs.exists(path) || fs.getFileStatus(path).isDirectory()) {
         System.out.println("File not found at " + path +
             ". Call gen first?");
         return 0L;
{code}

> Fix javadoc warnings due to deprecated FileSystem APIs
> ------------------------------------------------------
>
>                 Key: HDFS-11455
>                 URL: https://issues.apache.org/jira/browse/HDFS-11455
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Yiqun Lin
>            Assignee: Yiqun Lin
>            Priority: Minor
>         Attachments: HDFS-11455.001.patch
>
>
> There are many javadoc warnings coming out after FileSystem APIs which promote inefficient
call patterns being deprecated in HADOOP-13321. The relevant warnings:
> {code}
> [WARNING] /testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestQuota.java:[320,18]
[deprecation] isFile(Path) in FileSystem has been deprecated
> [WARNING] /testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestQuota.java:[1409,18]
[deprecation] isFile(Path) in FileSystem has been deprecated
> [WARNING] /testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java:[778,19]
[deprecation] isDirectory(Path) in FileSystem has been deprecated
> [WARNING] /testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java:[787,20]
[deprecation] isDirectory(Path) in FileSystem has been deprecated
> [WARNING] /testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestQuotaByStorageType.java:[834,18]
[deprecation] isFile(Path) in FileSystem has been 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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


Mime
View raw message