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

Xiaoyu Yao commented on HDFS-7824:
----------------------------------

The javac warning is from TestCount.MockContentSummary which extends 
ContentSummary with default constructor that has been deprecated by the new 
ContentSummary.Builder class. 

{code}
> [WARNING] 
> /home/jenkins/jenkins-slave/workspace/PreCommit-HDFS-Build/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCount.java:[318,32]
>  [deprecation] ContentSummary() in ContentSummary has been deprecated
{code}

There are two approaches that we can fix this:

1) Suppress the warning for TestCount.MockContentSummary#MockContentSumary()
{code}
  static class MockContentSummary extends ContentSummary {

    @SuppressWarnings("deprecation")
    // suppress warning on the usage of deprecated ContentSummary constructor
    public MockContentSummary() {
    }
{code}

2) Change MockContentSummary from inheritance to composition and provide mocks 
for all the ContentSummary methods. 

Considering this is for the single test only and amount of changes for 2), I 
would prefer 1). Let me know if you have other ideas on fixing this.

> GetContentSummary API and its namenode implementaion for Storage Type 
> Quota/Usage
> ---------------------------------------------------------------------------------
>
>                 Key: HDFS-7824
>                 URL: https://issues.apache.org/jira/browse/HDFS-7824
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode, namenode
>            Reporter: Xiaoyu Yao
>            Assignee: Xiaoyu Yao
>         Attachments: HDFS-7824.00.patch, HDFS-7824.01.patch, 
> HDFS-7824.02.patch, HDFS-7824.03.patch
>
>
> This JIRA is opened to provide API support of GetContentSummary with storage 
> type quota and usage information. It includes namenode implementation, client 
> namenode RPC protocol and Content.Counts refactoring. It is required by 
> HDFS-7701 (CLI to display storage type quota and usage).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to