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

Akira AJISAKA commented on HDFS-8622:
-------------------------------------

Thanks [~jagadesh.kiran] for taking this issue and thanks [~kanaka] for 
reviewing the patch. Here are my first comments in the test code. I'll try your 
patch and comment later.
{code}
      URL url = new URL("http://localhost:"; + port
          + "/webhdfs/v1/dir1/?op=GETCONTENTSUMMARY");
      HttpURLConnection connection = (HttpURLConnection) url.openConnection();
      connection.setRequestMethod("GET");
      connection.connect();
{code}
1. Adding the above code for each test case is unnecessarily. We should do it 
once and assert that the response code is 200 in 
{{testGetContentSummaryResponseCode}}.

{code}
      assertEquals(fileSummaryFromDFS.getDirectoryCount(),
          summary.getDirectoryCount());
      assertEquals(fileSummaryFromDFS.getFileCount(), summary.getFileCount());
      assertEquals(fileSummaryFromDFS.getLength(), summary.getLength());
      assertEquals(fileSummaryFromDFS.getSpaceConsumed(),
          summary.getSpaceConsumed());
      assertEquals(fileSummaryFromDFS.getQuota(), summary.getQuota());
      assertEquals(fileSummaryFromDFS.getSpaceQuota(), summary.getSpaceQuota());
{code}
2. Can we create a separate method for comparing {{ContentSummary}} to remove 
code duplication?
3. {{throws IOException}} can be removed from {{@AfterClass}}.
4. Would you remove unused variable {{contentSummary}}?


> Implement GETCONTENTSUMMARY operation for WebImageViewe
> -------------------------------------------------------
>
>                 Key: HDFS-8622
>                 URL: https://issues.apache.org/jira/browse/HDFS-8622
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>            Reporter: Jagadesh Kiran N
>            Assignee: Jagadesh Kiran N
>         Attachments: HDFS-8622-00.patch, HDFS-8622-01.patch, 
> HDFS-8622-02.patch
>
>
>  it would be better for administrators if {code} GETCONTENTSUMMARY {code} are 
> supported.



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

Reply via email to