hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-11455) Fix javac warnings in HDFS that caused by deprecated FileSystem APIs
Date Wed, 01 Mar 2017 10:48:45 GMT

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

Steve Loughran commented on HDFS-11455:
---------------------------------------

-1
ContractTestUtils has a set of assertions you can do, "assertIsDirectory", "assertExists",
etc, which are probably better to use. Why? Because I've tried to add better failure handling,
like reporting which actually lists the parent directory. The aim is provide enough information
in the logs & assert that you can get a clue what happens from the junit reports.

Looking it that class, I can see that actually some of the asserts could be improved, but
{{assertPathExists()}} and {{assertPathDoesNotExist}} do ls the parent dir. The others could
be improved now or later —and moving to them now would ensure that any improvements would
get picked up.

I would prefer these get used. Also, in {{testStorageSpaceQuotaWithWarmPolicy}}, catching
an FNFE and then converting a fail(} only loses the stack. Just change the signature of the
test to throw IOE and let the exception bubble up for JUnit to catch. Again, the CTU tests
will handle this.

> Fix javac warnings in HDFS that caused by 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, HDFS-11455.002.patch
>
>
> There are many javac 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