Files
doris/docs/en/administrator-guide/http-actions/tablets_distribution.md
weizuo93 07eaf50084 [Feature] Add a http interface to acquire the tablets distribution between different disks (#5096)
For the task of rebalancing tablet among different disks on the same BE,
It might be an effective strategy to ensure all tablets under the same partition
evenly distribute on the different disks. Thus, it is necessary to obtain the
distribution of tablets under the same partition between different disks on a BE.

This patch add a new http interface for BE to acquire the distribution of tablets
under a partition between different disks on the same BE.
2021-01-15 09:32:27 +08:00

3.1 KiB

title, language
title language
GET TABLETS DISTRIBUTION BETWEEN DIFFERENT DISKS en

GET TABLETS DISTRIBUTION BETWEEN DIFFERENT DISKS

Get the distribution of tablets under each partition between different disks on BE node

curl -X GET http://be_host:webserver_port/api/tablets_distribution?group_by=partition

The return is the number distribution of tablets under each partition between different disks on BE node, which only include tablet number.

{
    msg: "OK",
    code: 0,
    data: {
        host: "***",
        tablets_distribution: [
            {
                partition_id:***,
                disks:[
                    {
                        disk_path:"***",
                        tablets_num:***,
                    },
                    {
                        disk_path:"***",
                        tablets_num:***,
                    },

                    ...

                ]
            },
            {
                partition_id:***,
                disks:[
                    {
                        disk_path:"***",
                        tablets_num:***,
                    },
                    {
                        disk_path:"***",
                        tablets_num:***,
                    },

                    ...

                ]
            },

            ...

        ]
    },
    count: ***
}
curl -X GET http://be_host:webserver_port/api/tablets_distribution?group_by=partition&partition_id=xxx

The return is the number distribution of tablets under the particular partition between different disks on BE node, which include tablet number, tablet id, schema hash and tablet size.

{
    msg: "OK",
    code: 0,
    data: {
        host: "***",
        tablets_distribution: [
            {
                partition_id:***,
                disks:[
                    {
                        disk_path:"***",
                        tablets_num:***,
                        tablets:[
                            {
                                tablet_id:***,
                                schema_hash:***,
                                tablet_size:***
                            },

                            ...

                        ]
                    },

                    ...

                ]
            }
        ]
    },
    count: ***
}