1
votes

I have a DolphinDB DFS table in a cluster with 2 machines. Is there a function to return the disk usage of the DFS table?

1

1 Answers

0
votes

You can use function getTabletsMeta.

For a DolphinDB distributed table "quotes" in database dfs://TAQ, the following script returns the disk usage of the table on each node:

def diskUsage(database, table){
    return select sum(diskUsage) from getTabletsMeta("/"+database+"/%", table, true, -1);
}
pnodeRun(diskUsage{`TAQ, `quotes})