You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Siyao Meng (JIRA)" <ji...@apache.org> on 2019/07/11 10:44:00 UTC

[jira] [Comment Edited] (HDFS-14595) HDFS-11848 breaks API compatibility

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

Siyao Meng edited comment on HDFS-14595 at 7/11/19 10:43 AM:
-------------------------------------------------------------

[~jojochuang] Thanks for reviewing.

I deprecated *LeaseManager#getUnderConstructionFiles(final long prevId)* because we already have a new one *getUnderConstructionFiles(final long prevId, final String path)* which is introduced in HDFS-11848 [here|https://github.com/apache/hadoop/commit/bf5c94899537011465350d5d999fad9ffaeb605d#diff-15d3619a6fb653b9f1047d4b352d044bR282]. The deprecation warning thrown by Yetus javac is because the unit test *TestLeaseManager#verifyINodeLeaseCounts()* uses the old API.

I can simply update the unit test's usage from
{code}
leaseManager.getUnderConstructionFiles(0).size()
{code}
to
{code}
leaseManager.getUnderConstructionFiles(0, OpenFilesIterator.FILTER_PATH_DEFAULT).size()
{code}
which makes sense to me. Yiqun also did similar thing in HDFS-11484 [here|https://github.com/apache/hadoop/commit/bf5c94899537011465350d5d999fad9ffaeb605d#diff-9136819b3acff929ead0ec30da2b2eebR411]

What's your take on this? Or, I could just don't deprecate that old API.


was (Author: smeng):
[~jojochuang] Thanks for reviewing.

I deprecated *LeaseManager#getUnderConstructionFiles(final long prevId)* because we already have a new one *getUnderConstructionFiles(final long prevId, final String path)* which is introduced in HDFS-11848 [here|https://github.com/apache/hadoop/commit/bf5c94899537011465350d5d999fad9ffaeb605d#diff-15d3619a6fb653b9f1047d4b352d044bR282]. The deprecation warning thrown by Yetus javac is because the unit test *TestLeaseManager#verifyINodeLeaseCounts()* uses the old API.

I can simply update the unit test's usage from
{code}
leaseManager.getUnderConstructionFiles(0).size()
{code}
to
{code}
leaseManager.getUnderConstructionFiles(0, OpenFilesIterator.FILTER_PATH_DEFAULT).size()
{code}
which makes sense to me.

What's your take on this? Or, I could just don't deprecate that old API.

> HDFS-11848 breaks API compatibility
> -----------------------------------
>
>                 Key: HDFS-14595
>                 URL: https://issues.apache.org/jira/browse/HDFS-14595
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 3.2.0, 3.1.2
>            Reporter: Wei-Chiu Chuang
>            Assignee: Siyao Meng
>            Priority: Blocker
>         Attachments: HDFS-14595.001.patch, hadoop_ 36e1870eab904d5a6f12ecfb1fdb52ca08d95ac5 to b241194d56f97ee372cbec7062bcf155bc3df662 compatibility report.htm
>
>
> Our internal tool caught an API compatibility issue with HDFS-11848.
> HDFS-11848 adds an additional parameter to DistributedFileSystem.listOpenFiles(), but it doesn't keep the existing API.
> This can cause issue when upgrading from Hadoop 2.9.0/2.8.3/3.0.0 to 3.0.1/3.1.0 and above.
> Suggest:
> (1) Add back the old API (which was added in HDFS-10480), and mark it deprecated.
> (2) Update release doc to enforce running API compatibility check for each releases.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

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