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

James Clampffer commented on HDFS-9616:
---------------------------------------

Just took a look at this.

Could you change the indentation in hdfspp/events.h to 2 space tabs rather than 
4 just to keep things consistent?

It looks like release builds still include the callbacks but just discard the 
return status.  Is this correct?  I'm assuming to support statistics gathering?

Overall it looks pretty good to me, will +1 once the indentation stuff is fixed.


> libhdfs++ Add runtime hooks to allow a client application to add low level 
> monitoring and tests.
> ------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-9616
>                 URL: https://issues.apache.org/jira/browse/HDFS-9616
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs-client
>            Reporter: James Clampffer
>            Assignee: Bob Hansen
>         Attachments: HDFS-9616.HDFS-8707.002.patch, 
> HDFS-9616.HDFS-8707.003.patch
>
>
> It would be nice to have a set of callable objects and corresponding event 
> hooks in useful places that can be set by a client application at runtime.  
> This is intended to provide a scalable mechanism for implementing counters 
> (#retries, #namenode requests) or application specific testing e.g. simulate 
> a dropped connection when the test system running the client application 
> requests.
> Current implementation plan is a struct full of callbacks (std::functions) 
> owned by the FileSystemImpl.  A callback could be set (or left as a no-op) 
> and when the code hits the corresponding event it will be invoked with a 
> reference to the object (for context) and each method argument by reference.  
> The callback returns a bool: true to continue execution or false to bail out 
> of the calling method.



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

Reply via email to