You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org> on 2009/09/08 22:58:57 UTC

[jira] Created: (HDFS-603) mReplica related classes cannot be accessed

mReplica related classes cannot be accessed
-------------------------------------------

                 Key: HDFS-603
                 URL: https://issues.apache.org/jira/browse/HDFS-603
             Project: Hadoop HDFS
          Issue Type: Improvement
          Components: data-node
    Affects Versions: Append Branch
            Reporter: Tsz Wo (Nicholas), SZE
             Fix For: Append Branch


Replica related classes cannot be accessed above FSDatasetInterface.

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


[jira] Commented: (HDFS-603) Most replica related classes cannot be accessed

Posted by "Konstantin Boudnik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12753177#action_12753177 ] 

Konstantin Boudnik commented on HDFS-603:
-----------------------------------------

I will a sort of uneasiness when an input ref. is being simply return from a wrapper method. It opens all sorts of possible security issues. Shall the parameter, at very least, be declared as final? 

> Most replica related classes cannot be accessed
> -----------------------------------------------
>
>                 Key: HDFS-603
>                 URL: https://issues.apache.org/jira/browse/HDFS-603
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: data-node
>    Affects Versions: Append Branch
>            Reporter: Tsz Wo (Nicholas), SZE
>             Fix For: Append Branch
>
>         Attachments: h603_20090908.patch
>
>
> Currently, there are several replica related classes in org.apache.hadoop.hdfs.server.datanode:
> - ReplicaInfo
> - ReplicaInPipelineInterface
> - ReplicaInPipeline
> - ReplicaUnderRecovery
> - ReplicaWaitingToBeRecovered
> - ReplicaBeingWritten
> - FinalizedReplica
> All these classes cannot be accessed above FSDatasetInterface.

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


[jira] Updated: (HDFS-603) Most replica related classes cannot be accessed

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tsz Wo (Nicholas), SZE updated HDFS-603:
----------------------------------------

        Assignee: Tsz Wo (Nicholas), SZE
    Hadoop Flags: [Reviewed]

> Most replica related classes cannot be accessed
> -----------------------------------------------
>
>                 Key: HDFS-603
>                 URL: https://issues.apache.org/jira/browse/HDFS-603
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: data-node
>    Affects Versions: Append Branch
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Tsz Wo (Nicholas), SZE
>             Fix For: Append Branch
>
>         Attachments: h603_20090908.patch, h603_20090909.patch
>
>
> Currently, there are several replica related classes in org.apache.hadoop.hdfs.server.datanode:
> - ReplicaInfo
> - ReplicaInPipelineInterface
> - ReplicaInPipeline
> - ReplicaUnderRecovery
> - ReplicaWaitingToBeRecovered
> - ReplicaBeingWritten
> - FinalizedReplica
> All these classes cannot be accessed above FSDatasetInterface.

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


[jira] Commented: (HDFS-603) Most replica related classes cannot be accessed

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12753239#action_12753239 ] 

Tsz Wo (Nicholas), SZE commented on HDFS-603:
---------------------------------------------

{noformat}
     [exec] +1 overall.
     [exec]
     [exec] +1 @author. The patch does not contain any @author tags.
     [exec]
     [exec] +1 tests included. The patch appears to include 6 new or modified tests.
     [exec]
     [exec] +1 javadoc. The javadoc tool did not generate any warning messages.
     [exec]
     [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings.
     [exec]
     [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings.
     [exec]
     [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings.
{noformat}
Passed all the tests this time. Note that the patch does not fix TestBackupNode.

> Most replica related classes cannot be accessed
> -----------------------------------------------
>
>                 Key: HDFS-603
>                 URL: https://issues.apache.org/jira/browse/HDFS-603
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: data-node
>    Affects Versions: Append Branch
>            Reporter: Tsz Wo (Nicholas), SZE
>             Fix For: Append Branch
>
>         Attachments: h603_20090908.patch, h603_20090909.patch
>
>
> Currently, there are several replica related classes in org.apache.hadoop.hdfs.server.datanode:
> - ReplicaInfo
> - ReplicaInPipelineInterface
> - ReplicaInPipeline
> - ReplicaUnderRecovery
> - ReplicaWaitingToBeRecovered
> - ReplicaBeingWritten
> - FinalizedReplica
> All these classes cannot be accessed above FSDatasetInterface.

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


[jira] Commented: (HDFS-603) Most replica related classes cannot be accessed

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12753182#action_12753182 ] 

Tsz Wo (Nicholas), SZE commented on HDFS-603:
---------------------------------------------

> Tthe two changes to ReplicasMap are necessary. For the newly introduced method get(Replica r), the returned reference should be the same as the input reference.

Yes, I will revert the changes.

> I will a sort of uneasiness when an input ref. is being simply return from a wrapper method. It opens all sorts of possible security issues. Shall the parameter, at very least, be declared as final?

Could you be more specific?  Which methods you are talking about?  What are the security issues?  Which parameters should be declared as final?

> Most replica related classes cannot be accessed
> -----------------------------------------------
>
>                 Key: HDFS-603
>                 URL: https://issues.apache.org/jira/browse/HDFS-603
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: data-node
>    Affects Versions: Append Branch
>            Reporter: Tsz Wo (Nicholas), SZE
>             Fix For: Append Branch
>
>         Attachments: h603_20090908.patch
>
>
> Currently, there are several replica related classes in org.apache.hadoop.hdfs.server.datanode:
> - ReplicaInfo
> - ReplicaInPipelineInterface
> - ReplicaInPipeline
> - ReplicaUnderRecovery
> - ReplicaWaitingToBeRecovered
> - ReplicaBeingWritten
> - FinalizedReplica
> All these classes cannot be accessed above FSDatasetInterface.

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


[jira] Updated: (HDFS-603) Most replica related classes cannot be accessed

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tsz Wo (Nicholas), SZE updated HDFS-603:
----------------------------------------

    Attachment: h603_20090909.patch

h603_20090909.patch: reverted the changes in ReplicasMap.

Talked to Cos: he was actually talking about the new method in ReplicasMap.  So it is not a problem now.

> Most replica related classes cannot be accessed
> -----------------------------------------------
>
>                 Key: HDFS-603
>                 URL: https://issues.apache.org/jira/browse/HDFS-603
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: data-node
>    Affects Versions: Append Branch
>            Reporter: Tsz Wo (Nicholas), SZE
>             Fix For: Append Branch
>
>         Attachments: h603_20090908.patch, h603_20090909.patch
>
>
> Currently, there are several replica related classes in org.apache.hadoop.hdfs.server.datanode:
> - ReplicaInfo
> - ReplicaInPipelineInterface
> - ReplicaInPipeline
> - ReplicaUnderRecovery
> - ReplicaWaitingToBeRecovered
> - ReplicaBeingWritten
> - FinalizedReplica
> All these classes cannot be accessed above FSDatasetInterface.

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


[jira] Resolved: (HDFS-603) Most replica related classes cannot be accessed

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tsz Wo (Nicholas), SZE resolved HDFS-603.
-----------------------------------------

    Resolution: Fixed

I have committed this to the Append Branch.

> Most replica related classes cannot be accessed
> -----------------------------------------------
>
>                 Key: HDFS-603
>                 URL: https://issues.apache.org/jira/browse/HDFS-603
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: data-node
>    Affects Versions: Append Branch
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Tsz Wo (Nicholas), SZE
>             Fix For: Append Branch
>
>         Attachments: h603_20090908.patch, h603_20090909.patch
>
>
> Currently, there are several replica related classes in org.apache.hadoop.hdfs.server.datanode:
> - ReplicaInfo
> - ReplicaInPipelineInterface
> - ReplicaInPipeline
> - ReplicaUnderRecovery
> - ReplicaWaitingToBeRecovered
> - ReplicaBeingWritten
> - FinalizedReplica
> All these classes cannot be accessed above FSDatasetInterface.

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


[jira] Commented: (HDFS-603) Most replica related classes cannot be accessed

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12752871#action_12752871 ] 

Tsz Wo (Nicholas), SZE commented on HDFS-603:
---------------------------------------------

Passed all tests.  Only TestBackupNode failed.
{noformat}
     [exec] +1 overall.  
     [exec] 
     [exec]     +1 @author.  The patch does not contain any @author tags.
     [exec] 
     [exec]     +1 tests included.  The patch appears to include 6 new or modified tests.
     [exec] 
     [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.
     [exec] 
     [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler warnings.
     [exec] 
     [exec]     +1 findbugs.  The patch does not introduce any new Findbugs warnings.
     [exec] 
     [exec]     +1 release audit.  The applied patch does not increase the total number of release audit warnings.
{noformat}

> Most replica related classes cannot be accessed
> -----------------------------------------------
>
>                 Key: HDFS-603
>                 URL: https://issues.apache.org/jira/browse/HDFS-603
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: data-node
>    Affects Versions: Append Branch
>            Reporter: Tsz Wo (Nicholas), SZE
>             Fix For: Append Branch
>
>         Attachments: h603_20090908.patch
>
>
> Currently, there are several replica related classes in org.apache.hadoop.hdfs.server.datanode:
> - ReplicaInfo
> - ReplicaInPipelineInterface
> - ReplicaInPipeline
> - ReplicaUnderRecovery
> - ReplicaWaitingToBeRecovered
> - ReplicaBeingWritten
> - FinalizedReplica
> All these classes cannot be accessed above FSDatasetInterface.

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


[jira] Updated: (HDFS-603) Most replica related classes cannot be accessed

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tsz Wo (Nicholas), SZE updated HDFS-603:
----------------------------------------

    Attachment: h603_20090908.patch

h603_20090908.patch:
- added the Replica interface, which should replace the use of Block in Datanode.
- changed getVisibleLen() to not throwing IOException.  Also renamed it to getVisibleLength().
- implemented toString() in the Replica subclasses


> Most replica related classes cannot be accessed
> -----------------------------------------------
>
>                 Key: HDFS-603
>                 URL: https://issues.apache.org/jira/browse/HDFS-603
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: data-node
>    Affects Versions: Append Branch
>            Reporter: Tsz Wo (Nicholas), SZE
>             Fix For: Append Branch
>
>         Attachments: h603_20090908.patch
>
>
> Currently, there are several replica related classes in org.apache.hadoop.hdfs.server.datanode:
> - ReplicaInfo
> - ReplicaInPipelineInterface
> - ReplicaInPipeline
> - ReplicaUnderRecovery
> - ReplicaWaitingToBeRecovered
> - ReplicaBeingWritten
> - FinalizedReplica
> All these classes cannot be accessed above FSDatasetInterface.

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


[jira] Commented: (HDFS-603) Most replica related classes cannot be accessed

Posted by "Hairong Kuang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12753205#action_12753205 ] 

Hairong Kuang commented on HDFS-603:
------------------------------------

+1. The patch looks good.

Sorry for the confusion. I meat the two changes to ReplicasMap are NOT necessary.

> Most replica related classes cannot be accessed
> -----------------------------------------------
>
>                 Key: HDFS-603
>                 URL: https://issues.apache.org/jira/browse/HDFS-603
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: data-node
>    Affects Versions: Append Branch
>            Reporter: Tsz Wo (Nicholas), SZE
>             Fix For: Append Branch
>
>         Attachments: h603_20090908.patch, h603_20090909.patch
>
>
> Currently, there are several replica related classes in org.apache.hadoop.hdfs.server.datanode:
> - ReplicaInfo
> - ReplicaInPipelineInterface
> - ReplicaInPipeline
> - ReplicaUnderRecovery
> - ReplicaWaitingToBeRecovered
> - ReplicaBeingWritten
> - FinalizedReplica
> All these classes cannot be accessed above FSDatasetInterface.

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


[jira] Updated: (HDFS-603) Most replica related classes cannot be accessed

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tsz Wo (Nicholas), SZE updated HDFS-603:
----------------------------------------

    Description: 
Currently, there are several replica related classes in org.apache.hadoop.hdfs.server.datanode:
- ReplicaInfo
- ReplicaInPipelineInterface
- ReplicaInPipeline
- ReplicaUnderRecovery
- ReplicaWaitingToBeRecovered
- ReplicaBeingWritten
- FinalizedReplica

All these classes cannot be accessed above FSDatasetInterface.

  was:Replica related classes cannot be accessed above FSDatasetInterface.

        Summary: Most replica related classes cannot be accessed  (was: mReplica related classes cannot be accessed)

I suggest to add a new inteface called, Replica.  It will ultimately replace Block in the datanode package since the namenode manages blocks but datanodes manage replicas.

> Most replica related classes cannot be accessed
> -----------------------------------------------
>
>                 Key: HDFS-603
>                 URL: https://issues.apache.org/jira/browse/HDFS-603
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: data-node
>    Affects Versions: Append Branch
>            Reporter: Tsz Wo (Nicholas), SZE
>             Fix For: Append Branch
>
>
> Currently, there are several replica related classes in org.apache.hadoop.hdfs.server.datanode:
> - ReplicaInfo
> - ReplicaInPipelineInterface
> - ReplicaInPipeline
> - ReplicaUnderRecovery
> - ReplicaWaitingToBeRecovered
> - ReplicaBeingWritten
> - FinalizedReplica
> All these classes cannot be accessed above FSDatasetInterface.

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


[jira] Commented: (HDFS-603) Most replica related classes cannot be accessed

Posted by "Hairong Kuang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12752932#action_12752932 ] 

Hairong Kuang commented on HDFS-603:
------------------------------------

Tthe two changes to ReplicasMap are necessary. For the newly introduced method get(Replica r), the returned reference should be the same as the input reference.

> Most replica related classes cannot be accessed
> -----------------------------------------------
>
>                 Key: HDFS-603
>                 URL: https://issues.apache.org/jira/browse/HDFS-603
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: data-node
>    Affects Versions: Append Branch
>            Reporter: Tsz Wo (Nicholas), SZE
>             Fix For: Append Branch
>
>         Attachments: h603_20090908.patch
>
>
> Currently, there are several replica related classes in org.apache.hadoop.hdfs.server.datanode:
> - ReplicaInfo
> - ReplicaInPipelineInterface
> - ReplicaInPipeline
> - ReplicaUnderRecovery
> - ReplicaWaitingToBeRecovered
> - ReplicaBeingWritten
> - FinalizedReplica
> All these classes cannot be accessed above FSDatasetInterface.

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