cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajanarayanan Thottuvaikkatumana (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-7124) Use JMX Notifications to Indicate Success/Failure of Long-Running Operations
Date Wed, 05 Nov 2014 10:50:34 GMT

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

Rajanarayanan Thottuvaikkatumana commented on CASSANDRA-7124:
-------------------------------------------------------------

[~thobbs], Let me share the understanding of the problem with the example of the "repair"
command as fixed in CASSANDRA-4767 and based on that let me explain what I am planning to
do for the cleanup command to start with. 
1) From the NodeTool.java, located the annotation for the repair command and the corresponding
execute method in the class. 
2) That called the NodeProbe.java's method "repairAsync". In this method the JMX listeners
are added, a runner class for the repair is created and called the run method. Then the JMX
listeners are removed
3) The RepairRunner.java runs the repairAsync method on the MBean proxy and this class handles
the JMX notification as well.
4) The repairAsync method is defined in the StorageServiceMBean.java interface and the corresponding
implementation in StorageService.java

Now let us take the case of the "cleanup" command where the change need to be implemented.
Here are the steps I can think of.
a) The execute method of the "public static class Cleanup extends NodeToolCmd" in NodeTool.java
is the start of this command
b) It calls the forceKeyspaceCleanup in the NodeProbe.java. Here we should add/remove the
JMX listeners.
c) A class CleanupRunner.java class needs to be created and this should handle the JMX notifications
d) There are already methods in the StorageServiceMBean.java and StorageService.java for the
method "forceKeyspaceCleanup" but a little bit of refactoring will be required here and there
to make it work. 

Please correct if my understanding is not correct. Thanks


> Use JMX Notifications to Indicate Success/Failure of Long-Running Operations
> ----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-7124
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7124
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>            Reporter: Tyler Hobbs
>            Assignee: Rajanarayanan Thottuvaikkatumana
>            Priority: Minor
>              Labels: lhf
>             Fix For: 3.0
>
>
> If {{nodetool cleanup}} or some other long-running operation takes too long to complete,
you'll see an error like the one in CASSANDRA-2126, so you can't tell if the operation completed
successfully or not.  CASSANDRA-4767 fixed this for repairs with JMX notifications.  We should
do something similar for nodetool cleanup, compact, decommission, move, relocate, etc.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message