hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akira AJISAKA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-8735) Inotify : All events classes should implement toString() API.
Date Wed, 22 Jul 2015 09:23:04 GMT

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

Akira AJISAKA commented on HDFS-8735:
-------------------------------------

Thanks [~cmccabe] for the comment.

bq. I would caution people not to start parsing the toString representation since it might
change over time (if we add new optional fields to the Events). But it is nice for debugging
and logging.

Adding {{@Public}} and {{@Unstable}} to the subclasses is good for you? {{Event}} class is
annotated, but the subclasses are not annotated and that's why they don't exist in API doc.

> Inotify : All events classes should implement toString() API.
> -------------------------------------------------------------
>
>                 Key: HDFS-8735
>                 URL: https://issues.apache.org/jira/browse/HDFS-8735
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: hdfs-client
>    Affects Versions: 2.7.0
>            Reporter: Surendra Singh Lilhore
>            Assignee: Surendra Singh Lilhore
>         Attachments: HDFS-8735.01.patch, HDFS-8735.patch
>
>
> Event classes is used by client, it’s good to implement toString() API.
> {code}
> for(Event event : events){
> 	System.out.println(event.toString());
> }
> {code}
> This will give output like this
> {code}
> org.apache.hadoop.hdfs.inotify.Event$CreateEvent@6916d97d
> {code}



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

Mime
View raw message