be/src/io/tools/readme.md
To compile the project, run the following command:
./build.sh --clean --file-cache-microbench --be
This will generate the file_cache_microbench executable in the apache_doris/output/be/lib directory.
Create a deployment directory:
mkdir {deploy_dir}
Create a configuration directory:
mkdir {deploy_dir}/conf
Copy the executable to the deployment directory:
cp -r apache_doris/output/be/lib/file_cache_microbench {deploy_dir}
Copy the configuration file to the configuration directory:
cp -r apache_doris/output/be/conf/be.conf {deploy_dir}/conf
Edit the configuration file {deploy_dir}/conf/be.conf and add the following configuration information:
enable_file_cache=true
file_cache_path = [ {"path": "/mnt/disk2/file_cache", "total_size":53687091200, "query_limit": 10737418240}]
test_s3_resource = "resource"
test_s3_ak = "ak"
test_s3_sk = "sk"
test_s3_endpoint = "endpoint"
test_s3_region = "region"
test_s3_bucket = "bucket"
test_s3_prefix = "prefix"
Change to the deployment directory:
cd {deploy_dir}
Run the microbenchmark:
./file_cache_microbench --port={test_port}
Access the variables:
bvar http://${ip}:${port}/vars/
Check the logs in {deploy_dir}/log/.
curl "http://localhost:{port}/MicrobenchService/get_help"
GET /get_job_status/<job_id>
job_id: The ID of the job to retrieve status for.files (optional): If provided, returns the associated file records for the job.
/get_job_status/job_id?files=10GET /list_jobs
GET /get_help
GET /file_cache_clear
{
"sync": <true|false>, // Whether to synchronize the cache clear operation
"segment_path": "<path>" // Optional path of the segment to clear from the cache
}
segment_path is not provided, all caches will be cleared based on the sync parameter.GET /file_cache_reset
{
"capacity": <new_capacity>, // New capacity for the specified path
"path": "<path>" // Path of the segment to reset
}
GET /file_cache_release
{
"base_path": "<base_path>" // Optional base path to release specific caches
}
GET /update_config
{
"config_key": "<key>", // The configuration key to update
"config_value": "<value>", // The new value for the configuration key
"persist": <true|false> // Whether to persist the configuration change
}
GET /show_config
you can see it in get_help return msg