You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Owen O'Malley (JIRA)" <ji...@apache.org> on 2006/06/01 01:18:30 UTC
[jira] Created: (HADOOP-264) WritableFactory has no permissions to
create DatanodeRegistration
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
Assigned to: Owen O'Malley
Priority: Blocker
Fix For: 0.3
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
[jira] Commented: (HADOOP-264) WritableFactory has no permissions
to create DatanodeRegistration
Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-264?page=comments#action_12414173 ]
Owen O'Malley commented on HADOOP-264:
--------------------------------------
I should comment that this is a total hack just to get us flying again...
> 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
[jira] Updated: (HADOOP-264) WritableFactory has no permissions to
create DatanodeRegistration
Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-264?page=all ]
Owen O'Malley updated HADOOP-264:
---------------------------------
Attachment: fix-datanode-registration-perm-2.patch
Here is a patch that matches the standard idiom.
> 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: PublicDatanodeRegistration.patch, fix-datanode-registration-perm-2.patch, 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
[jira] Closed: (HADOOP-264) WritableFactory has no permissions to
create DatanodeRegistration
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-264?page=all ]
Doug Cutting closed HADOOP-264:
-------------------------------
> 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.0
> Reporter: Owen O'Malley
> Assignee: Owen O'Malley
> Priority: Blocker
> Fix For: 0.3.0
> Attachments: PublicDatanodeRegistration.patch, fix-datanode-registration-perm-2.patch, 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
[jira] Updated: (HADOOP-264) WritableFactory has no permissions to
create DatanodeRegistration
Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-264?page=all ]
Owen O'Malley updated HADOOP-264:
---------------------------------
Attachment: fix-datanode-registration-perm.patch
This patch forces the namenode to load the DatanodeRegistration class so that the factory is setup before it is needed for RPC.
> 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
[jira] Commented: (HADOOP-264) WritableFactory has no permissions
to create DatanodeRegistration
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-264?page=comments#action_12414176 ]
Doug Cutting commented on HADOOP-264:
-------------------------------------
There is an idiom for this hack. See e.g., the static initializer blocks near the top of DataNode, DFSClient, DFSShell, JobTracker, TaskTracker, etc. It's nice to keep these all uniform, with the same comment, so that, someday, we can easily remove them all at once.
> 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
[jira] Commented: (HADOOP-264) WritableFactory has no permissions
to create DatanodeRegistration
Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
[ 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
[jira] Updated: (HADOOP-264) WritableFactory has no permissions to
create DatanodeRegistration
Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-264?page=all ]
Konstantin Shvachko updated HADOOP-264:
---------------------------------------
Attachment: PublicDatanodeRegistration.patch
I agree with Owen that DatanodeRegistration as well as other classes passed through RPC should be public.
The counter-patch :-) with only one word added is attached.
Since it is related to HADOOP-124 making some classes non-public,
I would return public status to the exceptions as well.
Just speculating: if RPC would have to convert RemoteException to the real
exceptions like LeaseExpiredException then it would crash for the same reason.
We do not have that mechanism (for converting exceptions) yet, but one day we will.
> 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: PublicDatanodeRegistration.patch, 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
[jira] Resolved: (HADOOP-264) WritableFactory has no permissions to
create DatanodeRegistration
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-264?page=all ]
Doug Cutting resolved HADOOP-264:
---------------------------------
Resolution: Fixed
I just committed this. Thanks, Owen.
> 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: PublicDatanodeRegistration.patch, fix-datanode-registration-perm-2.patch, 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