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

Surendra Singh Lilhore commented on HDFS-13209:
-----------------------------------------------

Thanks [~ayushtkn] for patch.

Some comment for test code.

1. Change variable name to outputStream._
{code:java}
+      FSDataOutputStream inputStream =
+          fs.createFile(file1).storagePolicyName("COLD").build();
+      inputStream.write(1);
+      inputStream.close();{code} 
2. Start MiniDfscluster with three storage DISK, ARCHIVE, SSD.
3. Add case for default storage.

> DistributedFileSystem.create should allow an option to provide StoragePolicy
> ----------------------------------------------------------------------------
>
>                 Key: HDFS-13209
>                 URL: https://issues.apache.org/jira/browse/HDFS-13209
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>          Components: hdfs
>    Affects Versions: 3.0.0
>            Reporter: Jean-Marc Spaggiari
>            Assignee: Ayush Saxena
>            Priority: Major
>         Attachments: HDFS-13209-01.patch, HDFS-13209-02.patch, 
> HDFS-13209-03.patch, HDFS-13209-04.patch, HDFS-13209-05.patch
>
>
> DistributedFileSystem.create allows to get a FSDataOutputStream. The stored 
> file and related blocks will used the directory based StoragePolicy.
>  
> However, sometime, we might need to keep all files in the same directory 
> (consistency constraint) but might want some of them on SSD (small, in my 
> case) until they are processed and merger/removed. Then they will go on the 
> default policy.
>  
> When creating a file, it will be useful to have an option to specify a 
> different StoragePolicy...



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to