mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-26 03:20:37 +00:00
storage_service: Stub get_load
Needed by API.
This commit is contained in:
@@ -1468,4 +1468,19 @@ future<> storage_service::drain() {
|
||||
return make_ready_future<>();
|
||||
}
|
||||
|
||||
double storage_service::get_load() {
|
||||
double bytes = 0;
|
||||
#if 0
|
||||
for (String keyspaceName : Schema.instance.getKeyspaces())
|
||||
{
|
||||
Keyspace keyspace = Schema.instance.getKeyspaceInstance(keyspaceName);
|
||||
if (keyspace == null)
|
||||
continue;
|
||||
for (ColumnFamilyStore cfs : keyspace.getColumnFamilyStores())
|
||||
bytes += cfs.getLiveDiskSpaceUsed();
|
||||
}
|
||||
#endif
|
||||
return bytes;
|
||||
}
|
||||
|
||||
} // namespace service
|
||||
|
||||
@@ -963,22 +963,12 @@ private:
|
||||
|
||||
return changedRanges;
|
||||
}
|
||||
|
||||
#endif
|
||||
public:
|
||||
/** raw load value */
|
||||
public double getLoad()
|
||||
{
|
||||
double bytes = 0;
|
||||
for (String keyspaceName : Schema.instance.getKeyspaces())
|
||||
{
|
||||
Keyspace keyspace = Schema.instance.getKeyspaceInstance(keyspaceName);
|
||||
if (keyspace == null)
|
||||
continue;
|
||||
for (ColumnFamilyStore cfs : keyspace.getColumnFamilyStores())
|
||||
bytes += cfs.getLiveDiskSpaceUsed();
|
||||
}
|
||||
return bytes;
|
||||
}
|
||||
double get_load();
|
||||
|
||||
#if 0
|
||||
public String getLoadString()
|
||||
{
|
||||
return FileUtils.stringifyFileSize(getLoad());
|
||||
|
||||
Reference in New Issue
Block a user