hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "tangjunjie (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-2338) service assemble so complex
Date Thu, 24 Jul 2014 00:36:42 GMT

    [ https://issues.apache.org/jira/browse/YARN-2338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14072638#comment-14072638

tangjunjie commented on YARN-2338:

Hello, Tsuyoshi OZAWA 
         I think service assembly should remove from resourcemanager because the main task
for resourcemanager is alloct resource and so on.Consider use lightweight DI framwork like
guice to refactor .Then, resourcemanager code will 
get rid of bad code smell. Use xml or annotation to display service assembley. For example,

<bean="org.apache.hadoop.yarn.server.resourcemanager.ResourceManager" scope ="singleton">
     <bean ="org.apache.hadoop.yarn.server.resourcemanager.ApplicationMasterService"/>


I think test code will also benifit from this refactor. Because we can easily mock a service
then inject for test.

> service assemble so complex
> ---------------------------
>                 Key: YARN-2338
>                 URL: https://issues.apache.org/jira/browse/YARN-2338
>             Project: Hadoop YARN
>          Issue Type: Wish
>            Reporter: tangjunjie
>   See ResourceManager
> protected void serviceInit(Configuration configuration) throws Exception 
> So many service will assembe into resourcemanager.
> Use guice or other service assemble framework to refactor this complex code.

This message was sent by Atlassian JIRA

View raw message