hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "LiXin Ge (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-13021) Incorrect storage policy of snapshot file was returned by getStoragePolicy command
Date Thu, 18 Jan 2018 02:35:00 GMT

     [ https://issues.apache.org/jira/browse/HDFS-13021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

LiXin Ge updated HDFS-13021:
----------------------------
    Summary: Incorrect storage policy of snapshot file was returned by getStoragePolicy command
 (was: Incorrect storage policy of snapshott file was returned by getStoragePolicy command)

> Incorrect storage policy of snapshot file was returned by getStoragePolicy command
> ----------------------------------------------------------------------------------
>
>                 Key: HDFS-13021
>                 URL: https://issues.apache.org/jira/browse/HDFS-13021
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs, snapshots
>    Affects Versions: 3.1.0
>            Reporter: LiXin Ge
>            Assignee: LiXin Ge
>            Priority: Major
>
> Snapshots are supposed to be immutable and read only, so the file status which in a snapshot
path shouldn't follow the original file's change.
> The StoragePolicy in snapshot situation acts like a bug now.
> -----------
> Reproduction´╝ÜOperation on snapshottable dir {{/storagePolicy}}
> *before make snapshot:*
> {code:java}
>  [bin]# hdfs storagepolicies -setStoragePolicy -path /storagePolicy -policy PROVIDED
>  Set storage policy PROVIDED on /storagePolicy
>  [bin]# hadoop fs -put /home/file /storagePolicy/file_PROVIDED
>  [bin]# hdfs storagepolicies -getStoragePolicy -path /storagePolicy/file_PROVIDED
>  The storage policy of /storagePolicy/file_PROVIDED:
>  BlockStoragePolicy{HOT:7, storageTypes=[DISK], creationFallbacks=[], replicationFallbacks=[ARCHIVE]}
> {code}
> *make snapshot and check:*
> {code:java}
> [bin]# hdfs dfs -createSnapshot /storagePolicy s3_PROVIDED
> Created snapshot /storagePolicy/.snapshot/s3_PROVIDED
> [bin]# hdfs storagepolicies -getStoragePolicy -path /storagePolicy/.snapshot/s3_PROVIDED/file_PROVIDED
> The storage policy of /storagePolicy/.snapshot/s3_PROVIDED/file_PROVIDED:
> BlockStoragePolicy{PROVIDED:1, storageTypes=[PROVIDED, DISK], creationFallbacks=[PROVIDED,
DISK], replicationFallbacks=[PROVIDED, DISK]} 
> {code}
> *change the StroagePolicy and check again:*
> {code:java}
> [bin]# hdfs storagepolicies -setStoragePolicy -path /storagePolicy -policy HOT
> Set storage policy HOT on /storagePolicy
> [bin]# hdfs storagepolicies -getStoragePolicy -path /storagePolicy/.snapshot/s3_PROVIDED/file_PROVIDED
> The storage policy of /storagePolicy/.snapshot/s3_PROVIDED/file_PROVIDED:
> BlockStoragePolicy{HOT:7, storageTypes=[DISK], creationFallbacks=[], replicationFallbacks=[ARCHIVE]}
  ---- It shouldn't be HOT
> {code}



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

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


Mime
View raw message