[
https://issues.apache.org/jira/browse/HDFS-15355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17109087#comment-17109087
]
Yang Yun commented on HDFS-15355:
---------------------------------
Thanks [~elgoiri] and [~ayushtkn] for the suggestion.
Updated to patch to HDFS-15355.006.patch. change those values as an enum.
Yes, it require changes to multiple palces, but most of them is find/replace.
the enum is declared as following.
Please help to review.
{code:java}
// code placeholder
public enum StoragePolicy{
PROVIDED((byte)1), COLD((byte)2), WARM((byte)5), HOT((byte)7),
ONE_SSD((byte)10), ALL_SSD((byte)12), LAZY_PERSIST((byte)15);
private byte value;
StoragePolicy(byte value) {
this.value = value;
}
public static StoragePolicy valueOf(int value) {
switch (value) {
case 1:
return PROVIDED;
case 2:
return COLD;
case 5:
return WARM;
case 7:
return HOT;
case 10:
return ONE_SSD;
case 12:
return ALL_SSD;
case 15:
return LAZY_PERSIST;
default:
return null;
}
}
public byte value() {
return this.value;
}
}
{code}
> Make the default block storage policy ID configurable
> -----------------------------------------------------
>
> Key: HDFS-15355
> URL: https://issues.apache.org/jira/browse/HDFS-15355
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: block placement, namenode
> Reporter: Yang Yun
> Assignee: Yang Yun
> Priority: Minor
> Attachments: HDFS-15355.001.patch, HDFS-15355.002.patch,
> HDFS-15355.003.patch, HDFS-15355.004.patch, HDFS-15355.005.patch,
> HDFS-15355.006.patch
>
>
> Make the default block storage policy ID configurable. Sometime we want to
> use different storage policy ID from the startup of cluster.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]