[jira] [Commented] (CASSANDRA-4464) expose 2I CFs to the rest of nodetool

2013-02-04 Thread Brandon Williams (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13570358#comment-13570358
 ] 

Brandon Williams commented on CASSANDRA-4464:
-

Jason, can you rebase?

> expose 2I CFs to the rest of nodetool
> -
>
> Key: CASSANDRA-4464
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4464
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Tools
>Reporter: Jonathan Ellis
>Assignee: Jason Brown
>Priority: Minor
> Fix For: 1.2.2
>
> Attachments: 4464.txt, 4464-v1.patch
>
>
> This was begun in CASSANDRA-4063.  We should extend it to scrub as well, and 
> probably compact since any sane way to do it for scrub should give the other 
> for free.
> Not sure how easy these will be since they go through CompactionManager via 
> StorageProxy.  I think getValidColumnFamilies could be updated to check for 
> index CFs with "dot notation."
> (Other operations like flush or snapshot don't make sense for 2I CFs in 
> isolation of their parent.)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4464) expose 2I CFs to the rest of nodetool

2013-02-05 Thread Brandon Williams (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13571849#comment-13571849
 ] 

Brandon Williams commented on CASSANDRA-4464:
-

bq. cfstats - now prints out 2I info, ordered below owning CF

Actually, it's "after all regular CFs" but I don't care much either way.

bq. snapshot - now throws an exception when attempting to snapshot a 2I

A better exception than saying that the CF does not exist might be better here, 
but overall this looks good.

> expose 2I CFs to the rest of nodetool
> -
>
> Key: CASSANDRA-4464
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4464
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Tools
>Reporter: Jonathan Ellis
>Assignee: Jason Brown
>Priority: Minor
> Fix For: 1.2.2
>
> Attachments: 4464.txt, 4464-v1.patch, 4464-v2.patch
>
>
> This was begun in CASSANDRA-4063.  We should extend it to scrub as well, and 
> probably compact since any sane way to do it for scrub should give the other 
> for free.
> Not sure how easy these will be since they go through CompactionManager via 
> StorageProxy.  I think getValidColumnFamilies could be updated to check for 
> index CFs with "dot notation."
> (Other operations like flush or snapshot don't make sense for 2I CFs in 
> isolation of their parent.)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4464) expose 2I CFs to the rest of nodetool

2013-02-05 Thread Jason Brown (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13571893#comment-13571893
 ] 

Jason Brown commented on CASSANDRA-4464:


Anything you think I should clean up here, or it is shippable?

> expose 2I CFs to the rest of nodetool
> -
>
> Key: CASSANDRA-4464
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4464
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Tools
>Reporter: Jonathan Ellis
>Assignee: Jason Brown
>Priority: Minor
> Fix For: 1.2.2
>
> Attachments: 4464.txt, 4464-v1.patch, 4464-v2.patch
>
>
> This was begun in CASSANDRA-4063.  We should extend it to scrub as well, and 
> probably compact since any sane way to do it for scrub should give the other 
> for free.
> Not sure how easy these will be since they go through CompactionManager via 
> StorageProxy.  I think getValidColumnFamilies could be updated to check for 
> index CFs with "dot notation."
> (Other operations like flush or snapshot don't make sense for 2I CFs in 
> isolation of their parent.)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4464) expose 2I CFs to the rest of nodetool

2013-02-05 Thread Brandon Williams (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13571904#comment-13571904
 ] 

Brandon Williams commented on CASSANDRA-4464:
-

It would be nice to catch the 2I snapshot attempt and throw a relevant error so 
it doesn't confuse anyone (any further, since they're already trying to do 
something bad ;)

> expose 2I CFs to the rest of nodetool
> -
>
> Key: CASSANDRA-4464
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4464
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Tools
>Reporter: Jonathan Ellis
>Assignee: Jason Brown
>Priority: Minor
> Fix For: 1.2.2
>
> Attachments: 4464.txt, 4464-v1.patch, 4464-v2.patch
>
>
> This was begun in CASSANDRA-4063.  We should extend it to scrub as well, and 
> probably compact since any sane way to do it for scrub should give the other 
> for free.
> Not sure how easy these will be since they go through CompactionManager via 
> StorageProxy.  I think getValidColumnFamilies could be updated to check for 
> index CFs with "dot notation."
> (Other operations like flush or snapshot don't make sense for 2I CFs in 
> isolation of their parent.)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4464) expose 2I CFs to the rest of nodetool

2013-02-05 Thread Jason Brown (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13571918#comment-13571918
 ] 

Jason Brown commented on CASSANDRA-4464:


np, will do.

> expose 2I CFs to the rest of nodetool
> -
>
> Key: CASSANDRA-4464
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4464
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Tools
>Reporter: Jonathan Ellis
>Assignee: Jason Brown
>Priority: Minor
> Fix For: 1.2.2
>
> Attachments: 4464.txt, 4464-v1.patch, 4464-v2.patch
>
>
> This was begun in CASSANDRA-4063.  We should extend it to scrub as well, and 
> probably compact since any sane way to do it for scrub should give the other 
> for free.
> Not sure how easy these will be since they go through CompactionManager via 
> StorageProxy.  I think getValidColumnFamilies could be updated to check for 
> index CFs with "dot notation."
> (Other operations like flush or snapshot don't make sense for 2I CFs in 
> isolation of their parent.)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4464) expose 2I CFs to the rest of nodetool

2013-02-06 Thread Jason Brown (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13572408#comment-13572408
 ] 

Jason Brown commented on CASSANDRA-4464:


Looking into it, nodetool's interface is like this:

{code}snapshot [keyspaces...] -cf [columnfamilyName] -t [snapshotName]{code}

If you execute this (on a KS named jason, with a CF named dog, with index 
age_idx):

{code}nodetool snapshot jason -cf dog.age_idx{code}

you get this output:

{code}Requested snapshot for: jeb and column family: dog.age_idx
Exception in thread "main" java.lang.IllegalArgumentException: Cannot take a 
snapshot of a secondary index by itself. Run snapshot on the column family that 
owns the index.
at 
org.apache.cassandra.service.StorageService.takeColumnFamilySnapshot(StorageService.java:2164)
…{code}

Not an unreasonable message, I hope. That said, I'd prefer to catch the 
exception and make a prettier (less verbose) message, but if I catch the 
exception rather than let it escape out of main(), I wouldn't have a chance to 
set the exit status code to a non-0 value (at least, not without bypassing the 
finally{} block at the end of main()).

However, that does not match the exception message you mentioned, "that the CF 
does not exist". I think that comes from SS.takeSnapshot(), which would print 
"Table dog.age_idx does not exist" if you execute it like this:

{code}nodetool snapshot dog.age_idx{code}

In this case, it is true, 'dog.age_idx' does not exist as a table/keyspace, as 
NodeCmd is expecting keyspace names as parameters. However, we can (trivially) 
change the message to say 'Keyspace xyz does not exist' (in SS.getValidTable()) 
to make it a little clearer to users. When they realize the the correct syntax 
of the nodetool snapshot command, they'll run into the IAE (like above), so 
that should stop them from trying to do any more damage :).

Please let me know if I'm missing something here.


> expose 2I CFs to the rest of nodetool
> -
>
> Key: CASSANDRA-4464
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4464
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Tools
>Reporter: Jonathan Ellis
>Assignee: Jason Brown
>Priority: Minor
> Fix For: 1.2.2
>
> Attachments: 4464.txt, 4464-v1.patch, 4464-v2.patch
>
>
> This was begun in CASSANDRA-4063.  We should extend it to scrub as well, and 
> probably compact since any sane way to do it for scrub should give the other 
> for free.
> Not sure how easy these will be since they go through CompactionManager via 
> StorageProxy.  I think getValidColumnFamilies could be updated to check for 
> index CFs with "dot notation."
> (Other operations like flush or snapshot don't make sense for 2I CFs in 
> isolation of their parent.)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4464) expose 2I CFs to the rest of nodetool

2013-02-06 Thread Brandon Williams (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13572449#comment-13572449
 ] 

Brandon Williams commented on CASSANDRA-4464:
-

Oops, you're right, I think I forgot the '-cf' flag so it treated them both as 
keyspaces. +1 and committed, thanks.

> expose 2I CFs to the rest of nodetool
> -
>
> Key: CASSANDRA-4464
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4464
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Tools
>Reporter: Jonathan Ellis
>Assignee: Jason Brown
>Priority: Minor
> Fix For: 1.2.2
>
> Attachments: 4464.txt, 4464-v1.patch, 4464-v2.patch
>
>
> This was begun in CASSANDRA-4063.  We should extend it to scrub as well, and 
> probably compact since any sane way to do it for scrub should give the other 
> for free.
> Not sure how easy these will be since they go through CompactionManager via 
> StorageProxy.  I think getValidColumnFamilies could be updated to check for 
> index CFs with "dot notation."
> (Other operations like flush or snapshot don't make sense for 2I CFs in 
> isolation of their parent.)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4464) expose 2I CFs to the rest of nodetool

2012-09-24 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461974#comment-13461974
 ] 

Jonathan Ellis commented on CASSANDRA-4464:
---

Okay, let's take a step back.  What things should be applicable to 2i CFs?  I 
think we can categorize as follows:

Should be included in operations on parent CFs, and allowed for standalone 
operation on 2i sstables:

# scrub
# upgradesstables
# invalidate[key|row]cache
# cfstats

Stuff that is not very useful on standalone 2i CFs but harmless:
# flush
# getsstables
# rangekeysample

Stuff that we shouldn't support since foot-shooting potential is so high:
# snapshot

> expose 2I CFs to the rest of nodetool
> -
>
> Key: CASSANDRA-4464
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4464
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Tools
>Reporter: Jonathan Ellis
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 1.1.6
>
> Attachments: 4464.txt
>
>
> This was begun in CASSANDRA-4063.  We should extend it to scrub as well, and 
> probably compact since any sane way to do it for scrub should give the other 
> for free.
> Not sure how easy these will be since they go through CompactionManager via 
> StorageProxy.  I think getValidColumnFamilies could be updated to check for 
> index CFs with "dot notation."
> (Other operations like flush or snapshot don't make sense for 2I CFs in 
> isolation of their parent.)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4464) expose 2I CFs to the rest of nodetool

2012-09-24 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461975#comment-13461975
 ] 

Jonathan Ellis commented on CASSANDRA-4464:
---

So, I think we need to fix things to support the first category, make sure we 
raise an error on the last category, and do whatever is easiest for the middle.

> expose 2I CFs to the rest of nodetool
> -
>
> Key: CASSANDRA-4464
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4464
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Tools
>Reporter: Jonathan Ellis
>Assignee: Brandon Williams
>Priority: Minor
> Fix For: 1.1.6
>
> Attachments: 4464.txt
>
>
> This was begun in CASSANDRA-4063.  We should extend it to scrub as well, and 
> probably compact since any sane way to do it for scrub should give the other 
> for free.
> Not sure how easy these will be since they go through CompactionManager via 
> StorageProxy.  I think getValidColumnFamilies could be updated to check for 
> index CFs with "dot notation."
> (Other operations like flush or snapshot don't make sense for 2I CFs in 
> isolation of their parent.)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira