hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Owen O'Malley (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-264) WritableFactory has no permissions to create DatanodeRegistration
Date Thu, 01 Jun 2006 00:10:31 GMT
    [ http://issues.apache.org/jira/browse/HADOOP-264?page=comments#action_12414178 ] 

Owen O'Malley commented on HADOOP-264:
--------------------------------------

Ok, after considering it a few minutes, I propose that all objects passed through RPC should
be public classes with public methods. That will help when we factor the different servers
(jobtracker vs. tasktracker) into separate packages (org.apache.hadoop.mapred.job vs org.apache.hadoop.mapred.task
???) and fundamentally the RPC interfaces are _public_ with a capital P.

However, the WritableFactory factory is still very useful for serialization and such. I'd
propose that classes that want to register do:

static void registerWritableFactory() {
  WritableFactories.setFactory(Foo.class, new WritableFactory () { ... });
}

static {
  registerWritableFactory();
}

Then when WritableFactory wants to create an instance of a class, if no factory is registered,
it uses reflection to find a "registerWritableFactory" method and calls it, if such a method
exists. (We can use setAccessable to make it callable, even if it is not public.)

> WritableFactory has no permissions to create DatanodeRegistration
> -----------------------------------------------------------------
>
>          Key: HADOOP-264
>          URL: http://issues.apache.org/jira/browse/HADOOP-264
>      Project: Hadoop
>         Type: Bug

>   Components: dfs
>     Versions: 0.3
>     Reporter: Owen O'Malley
>     Assignee: Owen O'Malley
>     Priority: Blocker
>      Fix For: 0.3
>  Attachments: fix-datanode-registration-perm.patch
>
> The datanode can not come up because the DatanodeRegistration is package local and the
factory registration doesn't happen.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message