You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Johan Oskarsson (JIRA)" <ji...@apache.org> on 2010/04/01 16:16:27 UTC

[jira] Created: (CASSANDRA-941) Replace InetAddress usage with EndPoint

Replace InetAddress usage with EndPoint
---------------------------------------

                 Key: CASSANDRA-941
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-941
             Project: Cassandra
          Issue Type: Sub-task
          Components: Core
            Reporter: Johan Oskarsson


An end point should be represented by both address and port instead of port. Create an EndPoint class that takes an InetAddress and port and use this where needed.

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


[jira] Updated: (CASSANDRA-941) Replace InetAddress usage with EndPoint

Posted by "Johan Oskarsson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johan Oskarsson updated CASSANDRA-941:
--------------------------------------

    Attachment: CASSANDRA-941.patch

Rerolled patch to work with the latest changes in trunk. Passes all tests.

> Replace InetAddress usage with EndPoint
> ---------------------------------------
>
>                 Key: CASSANDRA-941
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-941
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Johan Oskarsson
>         Attachments: CASSANDRA-941.patch, CASSANDRA-941.patch, CASSANDRA-941.patch, CASSANDRA-941.patch
>
>
> An end point should be represented by both address and port instead of port. Create an EndPoint class that takes an InetAddress and port and use this where needed.

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

        

[jira] Commented: (CASSANDRA-941) Replace InetAddress usage with EndPoint

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854025#action_12854025 ] 

Jonathan Ellis commented on CASSANDRA-941:
------------------------------------------

Disagree about wrapping ISA.  We shouldn't be relying on toString anywhere (possibly ReadRepairPerformer.callMe does?  That should not be taking a String param anyway).  All the other places I saw using the String constructor are dealing w/ user input, and should be split to host, port for principle-of-least-surprise.

More generally, the concept of "endpoint" is one of an immutable struct, adding "methods that do stuff" to an EndPoint class is a bad fit.

> Replace InetAddress usage with EndPoint
> ---------------------------------------
>
>                 Key: CASSANDRA-941
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-941
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Johan Oskarsson
>         Attachments: CASSANDRA-941.patch, CASSANDRA-941.patch
>
>
> An end point should be represented by both address and port instead of port. Create an EndPoint class that takes an InetAddress and port and use this where needed.

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


[jira] Updated: (CASSANDRA-941) Replace InetAddress usage with EndPoint

Posted by "Johan Oskarsson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johan Oskarsson updated CASSANDRA-941:
--------------------------------------

    Attachment: CASSANDRA-941.patch

Updated version that uses InetSocketAddress instead. 

> Replace InetAddress usage with EndPoint
> ---------------------------------------
>
>                 Key: CASSANDRA-941
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-941
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Johan Oskarsson
>         Attachments: CASSANDRA-941.patch, CASSANDRA-941.patch, CASSANDRA-941.patch
>
>
> An end point should be represented by both address and port instead of port. Create an EndPoint class that takes an InetAddress and port and use this where needed.

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

        

[jira] Commented: (CASSANDRA-941) Replace InetAddress usage with EndPoint

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12857298#action_12857298 ] 

Jonathan Ellis commented on CASSANDRA-941:
------------------------------------------

I don't want to commit to trunk w/o actually having the code that needs this change  (i.e. multiple clients on one machine), but +1 committing to a feature branch.

> Replace InetAddress usage with EndPoint
> ---------------------------------------
>
>                 Key: CASSANDRA-941
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-941
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Johan Oskarsson
>         Attachments: CASSANDRA-941.patch, CASSANDRA-941.patch, CASSANDRA-941.patch, CASSANDRA-941.patch
>
>
> An end point should be represented by both address and port instead of port. Create an EndPoint class that takes an InetAddress and port and use this where needed.

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

        

[jira] Updated: (CASSANDRA-941) Replace InetAddress usage with EndPoint

Posted by "Johan Oskarsson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johan Oskarsson updated CASSANDRA-941:
--------------------------------------

    Attachment: CASSANDRA-941.patch

This patch changes endpoint to mean address + port. It does not make all the changes needed to allow multiple clients on the same machine, that is left for another patch, this one is big enough as it is.

Points of special interest to a reviewer might be:
* The new EndPoint class
* IncomingTcpConnection
* MessagingService
* ReadRepairManager

> Replace InetAddress usage with EndPoint
> ---------------------------------------
>
>                 Key: CASSANDRA-941
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-941
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Johan Oskarsson
>         Attachments: CASSANDRA-941.patch
>
>
> An end point should be represented by both address and port instead of port. Create an EndPoint class that takes an InetAddress and port and use this where needed.

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


[jira] Commented: (CASSANDRA-941) Replace InetAddress usage with EndPoint

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853533#action_12853533 ] 

Jonathan Ellis commented on CASSANDRA-941:
------------------------------------------

shouldn't this use InetSocketAddress instead of rolling its own address + port pair?

> Replace InetAddress usage with EndPoint
> ---------------------------------------
>
>                 Key: CASSANDRA-941
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-941
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Johan Oskarsson
>         Attachments: CASSANDRA-941.patch
>
>
> An end point should be represented by both address and port instead of port. Create an EndPoint class that takes an InetAddress and port and use this where needed.

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


[jira] Updated: (CASSANDRA-941) Replace InetAddress usage with EndPoint

Posted by "Johan Oskarsson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johan Oskarsson updated CASSANDRA-941:
--------------------------------------

    Attachment: CASSANDRA-941.patch

Changed EndPoint to use InetSocketAddress. Having the EndPoint class wrap it is useful for providing the extra methods (string constructor, toString that works as the other code expects etc) and it'll make future changes easier and less intrusive.

> Replace InetAddress usage with EndPoint
> ---------------------------------------
>
>                 Key: CASSANDRA-941
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-941
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Johan Oskarsson
>         Attachments: CASSANDRA-941.patch, CASSANDRA-941.patch
>
>
> An end point should be represented by both address and port instead of port. Create an EndPoint class that takes an InetAddress and port and use this where needed.

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