Adding missing method implementation
This series fill some missing functionality by using already existing API. The idea is to use existing code in places that it was not used. Also, in places were a stub value is in place, the methods returns a stab value. Message-Id: <1478619479-10023-1-git-send-email-amnon@scylladb.com>
This commit is contained in:
parent
9b63a35da6
commit
8e5d649048
@ -137,7 +137,7 @@ public class CompactionManager implements CompactionManagerMBean {
|
||||
@Deprecated
|
||||
public long getTotalBytesCompacted() {
|
||||
log(" getTotalBytesCompacted()");
|
||||
return c.getLongValue("");
|
||||
return metrics.bytesCompacted.count();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -187,7 +187,11 @@ public class CompactionManager implements CompactionManagerMBean {
|
||||
*/
|
||||
public int getCoreCompactorThreads() {
|
||||
log(" getCoreCompactorThreads()");
|
||||
return c.getIntValue("");
|
||||
/**
|
||||
* Core size pool is meaningless, we still wants to return a valid reponse,
|
||||
* just in case someone will try to call this method.
|
||||
*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -205,7 +209,11 @@ public class CompactionManager implements CompactionManagerMBean {
|
||||
*/
|
||||
public int getMaximumCompactorThreads() {
|
||||
log(" getMaximumCompactorThreads()");
|
||||
return c.getIntValue("");
|
||||
/**
|
||||
* Core size pool is meaningless, we still wants to return a valid reponse,
|
||||
* just in case someone will try to call this method.
|
||||
*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -223,7 +231,11 @@ public class CompactionManager implements CompactionManagerMBean {
|
||||
*/
|
||||
public int getCoreValidationThreads() {
|
||||
log(" getCoreValidationThreads()");
|
||||
return c.getIntValue("");
|
||||
/**
|
||||
* Core validation size pool is meaningless, we still wants to return a valid reponse,
|
||||
* just in case someone will try to call this method.
|
||||
*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -241,7 +253,11 @@ public class CompactionManager implements CompactionManagerMBean {
|
||||
*/
|
||||
public int getMaximumValidatorThreads() {
|
||||
log(" getMaximumValidatorThreads()");
|
||||
return c.getIntValue("");
|
||||
/**
|
||||
* Core validation size pool is meaningless, we still wants to return a valid reponse,
|
||||
* just in case someone will try to call this method.
|
||||
*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -31,6 +31,8 @@ import javax.json.JsonArray;
|
||||
import javax.json.JsonObject;
|
||||
import javax.management.MBeanServer;
|
||||
import javax.management.ObjectName;
|
||||
import javax.ws.rs.core.MultivaluedHashMap;
|
||||
import javax.ws.rs.core.MultivaluedMap;
|
||||
|
||||
import org.apache.cassandra.metrics.DroppedMessageMetrics;
|
||||
|
||||
@ -240,7 +242,9 @@ public final class MessagingService implements MessagingServiceMBean {
|
||||
|
||||
public int getVersion(String address) throws UnknownHostException {
|
||||
log(" getVersion(String address) throws UnknownHostException");
|
||||
return c.getIntValue("");
|
||||
MultivaluedMap<String, String> queryParams = new MultivaluedHashMap<String, String>();
|
||||
queryParams.add("addr", address);
|
||||
return c.getIntValue("/messaging_service/version", queryParams);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1446,8 +1446,7 @@ public class StorageService extends NotificationBroadcasterSupport
|
||||
|
||||
@Override
|
||||
public double getTracingProbability() {
|
||||
// TODO Auto-generated method stub
|
||||
log(" getTracingProbability()");
|
||||
return c.getDoubleValue("");
|
||||
return c.getDoubleValue("/storage_service/trace_probability");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user