ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nitiraj Rathore" <nitiraj.rath...@gmail.com>
Subject Review Request 37792: Ambari File Browser view - Downloading a directory always creates a zip with name hdfs.zip
Date Wed, 26 Aug 2015 09:37:57 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37792/
-----------------------------------------------------------

Review request for Ambari, Srimanth Gunturi, Sid Wagle, and Yusaku Sako.


Bugs: AMBARI-12877
    https://issues.apache.org/jira/browse/AMBARI-12877


Repository: ambari


Description
-------

Earlier : 
Downloaded zip file is always named hdfs.zip

In this Patch :
When single file/ folder is downloaded then zip is named based on that file (eg. somefile.txt.zip
or someFolder.zip). If multiples files / folders are  downloaded then the zip is named as
hdfs.zip itself.

Changes in Patch: 
Earlier he file ambari/contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java
was hardcoding the name of the zip as hdfs.zip in the HTTP header "Content-Disposition".
Now first we check the number of entries in DownloadRequest.entries and if it is one then
we name the zip after the name of this file or folder otherwise the zip is still named as
hdfs.zip.


Diffs
-----

  contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java
4d45a76 
  contrib/views/files/src/test/java/org/apache/ambari/view/filebrowser/FilebrowserTest.java
d481323 

Diff: https://reviews.apache.org/r/37792/diff/


Testing
-------

The unit test file ambari/contrib/views/files/src/test/java/org/apache/ambari/view/filebrowser/FilebrowserTest.java
has been updated to add one more test which checks for 5 combinations for file/folder downloads
and if the name of zip file comes as expected or not.

Manual UI test has been done and found to work as expected


Thanks,

Nitiraj Rathore


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message