You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "John Zhuge (JIRA)" <ji...@apache.org> on 2015/12/14 03:00:49 UTC

[jira] [Created] (HDFS-9554) Change string modificationLabel to enum in protobuf message SnapshotDiffReportEntryProto

John Zhuge created HDFS-9554:
--------------------------------

             Summary: Change string modificationLabel to enum in protobuf message SnapshotDiffReportEntryProto
                 Key: HDFS-9554
                 URL: https://issues.apache.org/jira/browse/HDFS-9554
             Project: Hadoop HDFS
          Issue Type: Improvement
          Components: hdfs-client, namenode
            Reporter: John Zhuge
            Assignee: John Zhuge
            Priority: Minor


Field modificationLabel represents the type of message SnapshotDiffReportEntryProto, but it gets its value from a different place, a Java enum SnapshotDiffReport.DiffType. There are a few drawbacks:
* SnapshotDiffReportEntryProto is not well encapsulated.
* The Java user of this message has to have the access to SnapshotDiffReport.DiffType as well.
* In language other than Java, users have to duplicate the string values of DiffType.

We should change its type from string to enum and rename it to "type".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)