You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Vijay (JIRA)" <ji...@apache.org> on 2011/06/02 01:55:54 UTC

[jira] [Created] (CASSANDRA-2733) nodetool ring with EC2Snitch, NPE checking for the zone and dc

nodetool ring with EC2Snitch, NPE checking for the zone and dc
--------------------------------------------------------------

                 Key: CASSANDRA-2733
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2733
             Project: Cassandra
          Issue Type: New Feature
          Components: Contrib
    Affects Versions: 0.8.0
         Environment: Cassandra JVM
            Reporter: Vijay
            Assignee: Vijay
            Priority: Minor
             Fix For: 0.8.0


Existing EC2Snitch... compare is done via == instead of equals() while comparing the IP's... 
(endpoint == FBUtilities.getLocalAddress())
It is ok to compare the Object Address as most of the code uses FBU.getLocalAddress() and it returns the same object everywhere... but it breaks nodetool ring.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-2733) nodetool ring with EC2Snitch, NPE checking for the zone and dc

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

Jonathan Ellis updated CASSANDRA-2733:
--------------------------------------

    Affects Version/s:     (was: 0.8.0)
                       0.7.1
        Fix Version/s: 0.7.7

also committed to 0.7 branch

> nodetool ring with EC2Snitch, NPE checking for the zone and dc
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-2733
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2733
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Contrib
>    Affects Versions: 0.7.1
>         Environment: Cassandra JVM
>            Reporter: Vijay
>            Assignee: Vijay
>            Priority: Minor
>             Fix For: 0.7.7, 0.8.1
>
>         Attachments: EC2Snitch-Patch-2733.patch, EC2Snitch-test-2733.patch
>
>
> Existing EC2Snitch... compare is done via == instead of equals() while comparing the IP's... 
> (endpoint == FBUtilities.getLocalAddress())
> It is ok to compare the Object Address as most of the code uses FBU.getLocalAddress() and it returns the same object everywhere... but it breaks nodetool ring.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2733) nodetool ring with EC2Snitch, NPE checking for the zone and dc

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

Jonathan Ellis commented on CASSANDRA-2733:
-------------------------------------------

awsApiCall in the test is unused, should it just be removed or did you mean to add another test using it?

> nodetool ring with EC2Snitch, NPE checking for the zone and dc
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-2733
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2733
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Contrib
>    Affects Versions: 0.8.0
>         Environment: Cassandra JVM
>            Reporter: Vijay
>            Assignee: Vijay
>            Priority: Minor
>             Fix For: 0.8.1
>
>         Attachments: EC2Snitch-Patch-2733.patch, EC2Snitch-test-2733.patch
>
>
> Existing EC2Snitch... compare is done via == instead of equals() while comparing the IP's... 
> (endpoint == FBUtilities.getLocalAddress())
> It is ok to compare the Object Address as most of the code uses FBU.getLocalAddress() and it returns the same object everywhere... but it breaks nodetool ring.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2733) nodetool ring with EC2Snitch, NPE checking for the zone and dc

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

Vijay commented on CASSANDRA-2733:
----------------------------------

Hi Jonathan,
1) awsApiCall in test is used by assertEquals("us-east", snitch.getDatacenter(local)).... TestEC2Snitch hardcodes the configuration ("us-east-1d") just for this test.
2) yeah we can call the AWS API only on AWS instance hence it should timeout in without TestEC2Snitch....
3) EC2Snitch.awsApiCall will enable us to write test case... as well as we can reuse for the Multi-Region Snitch which i was working on.
Thanks!


> nodetool ring with EC2Snitch, NPE checking for the zone and dc
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-2733
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2733
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Contrib
>    Affects Versions: 0.8.0
>         Environment: Cassandra JVM
>            Reporter: Vijay
>            Assignee: Vijay
>            Priority: Minor
>             Fix For: 0.8.1
>
>         Attachments: EC2Snitch-Patch-2733.patch, EC2Snitch-test-2733.patch
>
>
> Existing EC2Snitch... compare is done via == instead of equals() while comparing the IP's... 
> (endpoint == FBUtilities.getLocalAddress())
> It is ok to compare the Object Address as most of the code uses FBU.getLocalAddress() and it returns the same object everywhere... but it breaks nodetool ring.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2733) nodetool ring with EC2Snitch, NPE checking for the zone and dc

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

Jonathan Ellis commented on CASSANDRA-2733:
-------------------------------------------

Ah, I see -- the test really isn't a separate patch and needs the awsApiCall refactor from the fix patch to work.

Committed with minor tweaks (made awsApiCall package local, added @Override to test version).

> nodetool ring with EC2Snitch, NPE checking for the zone and dc
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-2733
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2733
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Contrib
>    Affects Versions: 0.8.0
>         Environment: Cassandra JVM
>            Reporter: Vijay
>            Assignee: Vijay
>            Priority: Minor
>             Fix For: 0.8.1
>
>         Attachments: EC2Snitch-Patch-2733.patch, EC2Snitch-test-2733.patch
>
>
> Existing EC2Snitch... compare is done via == instead of equals() while comparing the IP's... 
> (endpoint == FBUtilities.getLocalAddress())
> It is ok to compare the Object Address as most of the code uses FBU.getLocalAddress() and it returns the same object everywhere... but it breaks nodetool ring.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2733) nodetool ring with EC2Snitch, NPE checking for the zone and dc

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

Jonathan Ellis commented on CASSANDRA-2733:
-------------------------------------------

I'm also getting a timeout failure on the test w/o the patch applied, it looks like an assertion failure is intended instead?

> nodetool ring with EC2Snitch, NPE checking for the zone and dc
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-2733
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2733
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Contrib
>    Affects Versions: 0.8.0
>         Environment: Cassandra JVM
>            Reporter: Vijay
>            Assignee: Vijay
>            Priority: Minor
>             Fix For: 0.8.1
>
>         Attachments: EC2Snitch-Patch-2733.patch, EC2Snitch-test-2733.patch
>
>
> Existing EC2Snitch... compare is done via == instead of equals() while comparing the IP's... 
> (endpoint == FBUtilities.getLocalAddress())
> It is ok to compare the Object Address as most of the code uses FBU.getLocalAddress() and it returns the same object everywhere... but it breaks nodetool ring.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-2733) nodetool ring with EC2Snitch, NPE checking for the zone and dc

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

Vijay updated CASSANDRA-2733:
-----------------------------

    Attachment: EC2Snitch-Patch-2733.patch
                EC2Snitch-test-2733.patch

Attached patch to use equals and also test case for the same.

> nodetool ring with EC2Snitch, NPE checking for the zone and dc
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-2733
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2733
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Contrib
>    Affects Versions: 0.8.0
>         Environment: Cassandra JVM
>            Reporter: Vijay
>            Assignee: Vijay
>            Priority: Minor
>             Fix For: 0.8.0
>
>         Attachments: EC2Snitch-Patch-2733.patch, EC2Snitch-test-2733.patch
>
>
> Existing EC2Snitch... compare is done via == instead of equals() while comparing the IP's... 
> (endpoint == FBUtilities.getLocalAddress())
> It is ok to compare the Object Address as most of the code uses FBU.getLocalAddress() and it returns the same object everywhere... but it breaks nodetool ring.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2733) nodetool ring with EC2Snitch, NPE checking for the zone and dc

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

Jonathan Ellis commented on CASSANDRA-2733:
-------------------------------------------

finally, what is the goal of the changes to EC2Snitch.awsApiCall?

> nodetool ring with EC2Snitch, NPE checking for the zone and dc
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-2733
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2733
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Contrib
>    Affects Versions: 0.8.0
>         Environment: Cassandra JVM
>            Reporter: Vijay
>            Assignee: Vijay
>            Priority: Minor
>             Fix For: 0.8.1
>
>         Attachments: EC2Snitch-Patch-2733.patch, EC2Snitch-test-2733.patch
>
>
> Existing EC2Snitch... compare is done via == instead of equals() while comparing the IP's... 
> (endpoint == FBUtilities.getLocalAddress())
> It is ok to compare the Object Address as most of the code uses FBU.getLocalAddress() and it returns the same object everywhere... but it breaks nodetool ring.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2733) nodetool ring with EC2Snitch, NPE checking for the zone and dc

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

Hudson commented on CASSANDRA-2733:
-----------------------------------

Integrated in Cassandra-0.8 #158 (See [https://builds.apache.org/job/Cassandra-0.8/158/])
    fix nodetoolring use with Ec2Snitch
patch by Vijay; reviewed by jbellis for CASSANDRA-2733

jbellis : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1133389
Files : 
* /cassandra/branches/cassandra-0.8/CHANGES.txt
* /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/locator/Ec2Snitch.java


> nodetool ring with EC2Snitch, NPE checking for the zone and dc
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-2733
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2733
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Contrib
>    Affects Versions: 0.7.1
>         Environment: Cassandra JVM
>            Reporter: Vijay
>            Assignee: Vijay
>            Priority: Minor
>             Fix For: 0.7.7, 0.8.1
>
>         Attachments: EC2Snitch-Patch-2733.patch, EC2Snitch-test-2733.patch
>
>
> Existing EC2Snitch... compare is done via == instead of equals() while comparing the IP's... 
> (endpoint == FBUtilities.getLocalAddress())
> It is ok to compare the Object Address as most of the code uses FBU.getLocalAddress() and it returns the same object everywhere... but it breaks nodetool ring.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira