[ https://issues.apache.org/jira/browse/HDFS-13956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16640128#comment-16640128 ]
Hrishikesh Gadre commented on HDFS-13956: ----------------------------------------- [~jojochuang] thanks for the review! {quote}Question: is the goal to identify a file is replicated or erasure-coded? Or do you intend to identify the ec policy? If it's for the former, we just need a boolean; if it's for the latter, i'm not sure the byte number of ec policy means too much outside the NN. IMO, the byte number is an internal data structure that shouldn't/doesn't mean too much outside the NN. {quote} The goal is to identify if a given file is replicated or erasure coded. I agree that just exposing a boolean value can work, in fact I had the same thought in my mind. The advantage of providing the byte value is to keep the iNotify Event aligned with the FSEditLogOp ( as we are getting the ecPolicyId from the FSEditLogOp). The disadvantages of this approach are (a) the client need to decode the byte value correctly (i.e. ecPolicyId == 0 means replicated file vs ecPolicyId > 0 means erasure coded file). (b) need to wrap ecPolicyId inside an Optional to handle backwards/forward compatibility. Exposing a boolean will avoid both these limitations. So I will make that change. {quote}On an unrelated note, it looks like we should keep the fields in FSEditLog.AddCloseOp in sync with CreateEvent. That means CreateEvent should also have storagePolicyId field as well. (and xAttrs and aclEntries for that matter) {quote} Sure. Would it be OK to handle this as part of a separate jira? > iNotify should include information to identify a file as either replicated or > erasure coded > ------------------------------------------------------------------------------------------- > > Key: HDFS-13956 > URL: https://issues.apache.org/jira/browse/HDFS-13956 > Project: Hadoop HDFS > Issue Type: Improvement > Affects Versions: 3.0.0 > Reporter: Hrishikesh Gadre > Assignee: Hrishikesh Gadre > Priority: Minor > Attachments: HDFS-13956-001.patch, HDFS-13956-002.patch, > HDFS-13956-003.patch > > > Currently iNotify does not provide information to identify if a given file is > using replication or erasure coding mode. This would be very useful for the > downstream applications using iNotify functionality (e.g. to tag/search files > using erasure coding). -- 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