You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Cliff Moon (JIRA)" <ji...@apache.org> on 2010/04/23 19:18:51 UTC

[jira] Created: (CASSANDRA-1018) Ability to close tables for embeddable cassandra

Ability to close tables for embeddable cassandra
------------------------------------------------

                 Key: CASSANDRA-1018
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1018
             Project: Cassandra
          Issue Type: Improvement
          Components: Core
    Affects Versions: 0.3, 0.4, 0.5, 0.6, 0.6.1, 0.6.2, 0.7, 0.8
            Reporter: Cliff Moon
            Priority: Minor


I would like to make Cassandra more embeddable in order to use it from within application unit tests.  Unfortunately, just nuking directories with CassandraServiceDataCleaner doesn't completely isolate test cases within a single running JVM.  In-memory table objects are kept in a static hash map.  This patch adds a close method that will remove table instances from the static hash map.

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


[jira] Issue Comment Edited: (CASSANDRA-1018) Ability to close tables for embeddable cassandra

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

Jonathan Ellis edited comment on CASSANDRA-1018 at 4/23/10 1:55 PM:
--------------------------------------------------------------------

Looks like Table.clear in 0.7 (trunk) does what you want.

We can backport that to 0.6.2 easily enough if necessary.

      was (Author: jbellis):
    Looks like Table.clear in 0.7 does what you want.

We can backport that to 0.6.2 easily enough if necessary.
  
> Ability to close tables for embeddable cassandra
> ------------------------------------------------
>
>                 Key: CASSANDRA-1018
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1018
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Cliff Moon
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: tables.patch
>
>
> I would like to make Cassandra more embeddable in order to use it from within application unit tests.  Unfortunately, just nuking directories with CassandraServiceDataCleaner doesn't completely isolate test cases within a single running JVM.  In-memory table objects are kept in a static hash map.  This patch adds a close method that will remove table instances from the static hash map.

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


[jira] Updated: (CASSANDRA-1018) Ability to close tables for embeddable cassandra

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

Cliff Moon updated CASSANDRA-1018:
----------------------------------

    Attachment: tables.patch

> Ability to close tables for embeddable cassandra
> ------------------------------------------------
>
>                 Key: CASSANDRA-1018
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1018
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.3, 0.4, 0.5, 0.6, 0.6.1, 0.6.2, 0.7, 0.8
>            Reporter: Cliff Moon
>            Priority: Minor
>         Attachments: tables.patch
>
>
> I would like to make Cassandra more embeddable in order to use it from within application unit tests.  Unfortunately, just nuking directories with CassandraServiceDataCleaner doesn't completely isolate test cases within a single running JVM.  In-memory table objects are kept in a static hash map.  This patch adds a close method that will remove table instances from the static hash map.

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


[jira] Commented: (CASSANDRA-1018) Ability to close tables for embeddable cassandra

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

Jonathan Ellis commented on CASSANDRA-1018:
-------------------------------------------

Patch fails for me against trunk HEAD but it's simple enough to apply manually.

> Ability to close tables for embeddable cassandra
> ------------------------------------------------
>
>                 Key: CASSANDRA-1018
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1018
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.3, 0.4, 0.5, 0.6, 0.6.1, 0.6.2, 0.7, 0.8
>            Reporter: Cliff Moon
>            Priority: Minor
>         Attachments: tables.patch
>
>
> I would like to make Cassandra more embeddable in order to use it from within application unit tests.  Unfortunately, just nuking directories with CassandraServiceDataCleaner doesn't completely isolate test cases within a single running JVM.  In-memory table objects are kept in a static hash map.  This patch adds a close method that will remove table instances from the static hash map.

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


[jira] Commented: (CASSANDRA-1018) Ability to close tables for embeddable cassandra

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

Gary Dusbabek commented on CASSANDRA-1018:
------------------------------------------

Depending on the nature of the test, it might be a good idea to call StorageService.instance.clearReplicationStrategy/initReplicationStrategy.

Curse the singletons.

> Ability to close tables for embeddable cassandra
> ------------------------------------------------
>
>                 Key: CASSANDRA-1018
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1018
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Cliff Moon
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: tables.patch
>
>
> I would like to make Cassandra more embeddable in order to use it from within application unit tests.  Unfortunately, just nuking directories with CassandraServiceDataCleaner doesn't completely isolate test cases within a single running JVM.  In-memory table objects are kept in a static hash map.  This patch adds a close method that will remove table instances from the static hash map.

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


[jira] Resolved: (CASSANDRA-1018) Ability to close tables for embeddable cassandra

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

Jonathan Ellis resolved CASSANDRA-1018.
---------------------------------------

    Resolution: Duplicate

Looks like Table.clear in 0.7 does what you want.

We can backport that to 0.6.2 easily enough if necessary.

> Ability to close tables for embeddable cassandra
> ------------------------------------------------
>
>                 Key: CASSANDRA-1018
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1018
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Cliff Moon
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: tables.patch
>
>
> I would like to make Cassandra more embeddable in order to use it from within application unit tests.  Unfortunately, just nuking directories with CassandraServiceDataCleaner doesn't completely isolate test cases within a single running JVM.  In-memory table objects are kept in a static hash map.  This patch adds a close method that will remove table instances from the static hash map.

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


[jira] Updated: (CASSANDRA-1018) Ability to close tables for embeddable cassandra

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

Jonathan Ellis updated CASSANDRA-1018:
--------------------------------------

        Fix Version/s: 0.7
    Affects Version/s:     (was: 0.3)
                           (was: 0.4)
                           (was: 0.5)
                           (was: 0.6)
                           (was: 0.7)
                           (was: 0.8)
                           (was: 0.6.1)
                           (was: 0.6.2)

> Ability to close tables for embeddable cassandra
> ------------------------------------------------
>
>                 Key: CASSANDRA-1018
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1018
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Cliff Moon
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: tables.patch
>
>
> I would like to make Cassandra more embeddable in order to use it from within application unit tests.  Unfortunately, just nuking directories with CassandraServiceDataCleaner doesn't completely isolate test cases within a single running JVM.  In-memory table objects are kept in a static hash map.  This patch adds a close method that will remove table instances from the static hash map.

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