[ 
https://issues.apache.org/jira/browse/HADOOP-4383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12638544#action_12638544
 ] 

Steve Loughran commented on HADOOP-4383:
----------------------------------------

I could certainly separate it, the main issue being that my copy of hadoop has 
diverged somewhat, due mainly to the lifecycle work. I'd have to check out a 
new version and build the patch against that. 

What I've done in my code is add an interface in our own codebase
http://smartfrog.svn.sourceforge.net/viewvc/smartfrog/trunk/core/components/hadoop/src/org/smartfrog/services/hadoop/core/ServiceInfo.java?view=markup
then patch my subclases of the various services 

http://smartfrog.svn.sourceforge.net/viewvc/smartfrog/trunk/core/components/hadoop/src/org/apache/hadoop/hdfs/server/namenode/ExtNameNode.java?view=markup
http://smartfrog.svn.sourceforge.net/viewvc/smartfrog/trunk/core/components/hadoop/src/org/apache/hadoop/mapred/ExtJobTracker.java?view=markup
http://smartfrog.svn.sourceforge.net/viewvc/smartfrog/trunk/core/components/hadoop/src/org/apache/hadoop/mapred/ExtTaskTracker.java?view=markup

one troublespot here is the datanode, which doesn't expose enough information 
to get the http port; I return an error value
http://smartfrog.svn.sourceforge.net/viewvc/smartfrog/trunk/core/components/hadoop/src/org/apache/hadoop/hdfs/server/datanode/ExtDataNode.java?view=markup

-putting this stuff in an interface that is visible for all classes would be 
best, though it runs up against the interface/class issue. Patching the methods 
into a subclass to the service class would make it consistent and avoid adding 
an extra interface, which is just my current way to add the methods to every 
service without changing the hadoop codebase itself.

> Add standard interface/methods for all services to query IPC and HTTP 
> addresses and ports
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4383
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4383
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs, mapred
>    Affects Versions: 0.20.0
>            Reporter: Steve Loughran
>            Priority: Minor
>
> This is something I've ended up doing in subclasses of all the services: 
> methods to get at the IPC and HTTP port and addresses. Some services have 
> exported methods for this (JobTracker), others package-private member 
> variables (namenode), while others don't allow you to get at all the data 
> (Datanode keeps the http server private). 
> A uniform way to query any service for its live port and address values make 
> some aspects of service management much easier, such as feeding those values 
> in to http page monitoring tools.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to