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

ASF subversion and git services commented on KUDU-3204:
-------------------------------------------------------

Commit e60ac3ca93532fdffa71999e90661e42d7dcc0b0 in kudu's branch 
refs/heads/master from Abhishek Chennaka
[ https://gitbox.apache.org/repos/asf?p=kudu.git;h=e60ac3c ]

KUDU-3204: Add a metric for amount of available space

This commit adds two metrics to server entity.
- wal_dir_space_available_bytes - Exposes the free space available in the
  wal directory
- data_dirs_space_available_bytes - Exposes the sum of free space in each
  of the data directories.

We ensure the reserved space is being accounted for. This is specified by
the flags --fs_data_dirs_reserved_bytes and --fs_wal_dir_reserved_bytes in
data directories and wal directories respectively. For calculating the
total free space in data directories, we ensure we are not counting the
same device/filesystem twice by getting and checking for uniqueness
of the filesystemID of each of the data directories before summing it up.
Tested the uniqueness of the filesystemID by creating a new volume in my
local macOS machine. The space reported is based on the data directories in
different volumes (and hence unique filesystemID). Having multiple data
directories on the same volume does not increase the metric.

The free space calculated is cached for the period specified by the flags
--fs_data_dirs_available_space_cache_seconds and
--fs_wal_dir_available_space_cache_seconds.

Change-Id: I58a7419847d080498aaf431d1dab098e1af71ad0
Reviewed-on: http://gerrit.cloudera.org:8080/17725
Reviewed-by: Alexey Serbin <[email protected]>
Tested-by: Kudu Jenkins


> Add a metric for amount of available space
> ------------------------------------------
>
>                 Key: KUDU-3204
>                 URL: https://issues.apache.org/jira/browse/KUDU-3204
>             Project: Kudu
>          Issue Type: Improvement
>          Components: fs, metrics
>            Reporter: Andrew Wong
>            Assignee: Abhishek
>            Priority: Major
>
> It'd be convenient to expose a metric for how much space there is available 
> on each tablet server (accounting for {{fs_wal_dir_reserved_bytes}} and 
> {{fs_data_dirs_reserved_bytes}}). This would be usefulĀ in implementing a 
> replica placement policy based on available space.
> It's probably worth separating metrics for available WAL directory space and 
> available data directory space. E.g. we may want to treat a lack of space 
> differently depending on whether we are limited on WAL space and not limited 
> on data space, and vice versa.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to