mirror of https://github.com/apache/cassandra
add CompletedTasks to CompactionManager. patch by jbellis
git-svn-id: https://svn.apache.org/repos/asf/cassandra/trunk@956943 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5531a7f5db
commit
cb00345edc
|
|
@ -33,6 +33,7 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
|
||||
import org.apache.cassandra.concurrent.DebuggableThreadPoolExecutor;
|
||||
import org.apache.cassandra.concurrent.JMXEnabledThreadPoolExecutor;
|
||||
import org.apache.cassandra.dht.Range;
|
||||
import org.apache.cassandra.io.*;
|
||||
import org.apache.cassandra.io.sstable.*;
|
||||
|
|
@ -625,7 +626,7 @@ public class CompactionManager implements CompactionManagerMBean
|
|||
|
||||
public CompactionExecutor()
|
||||
{
|
||||
super("COMPACTION-POOL");
|
||||
super("CompactionExecutor");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -682,4 +683,9 @@ public class CompactionManager implements CompactionManagerMBean
|
|||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
public long getCompletedTasks()
|
||||
{
|
||||
return executor.getTaskCount() - executor.getCompletedTaskCount();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,4 +59,9 @@ public interface CompactionManagerMBean
|
|||
* @return estimated number of compactions remaining to perform
|
||||
*/
|
||||
public int getPendingTasks();
|
||||
|
||||
/**
|
||||
* @return number of completed compactions since server [re]start
|
||||
*/
|
||||
public long getCompletedTasks();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue