Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A81951859C for ; Wed, 22 Jul 2015 09:30:25 +0000 (UTC) Received: (qmail 85289 invoked by uid 500); 22 Jul 2015 09:23:04 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 85236 invoked by uid 500); 22 Jul 2015 09:23:04 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 85220 invoked by uid 99); 22 Jul 2015 09:23:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jul 2015 09:23:04 +0000 Date: Wed, 22 Jul 2015 09:23:04 +0000 (UTC) From: "Akira AJISAKA (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-8735) Inotify : All events classes should implement toString() API. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-8735?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D14636= 576#comment-14636576 ]=20 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 Even= ts). But it is nice for debugging and logging. Adding {{@Public}} and {{@Unstable}} to the subclasses is good for you? {{E= vent}} 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=E2=80=99s good to implement toString(= ) API. > {code} > for(Event event : events){ > =09System.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)