-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[enhancement](cloud) support BE http action: /api/file_cache?op=hash #40831
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
run buildall |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls add a file cache regression test too.
TeamCity be ut coverage result: |
TPC-H: Total hot run time: 42891 ms
|
run buildall |
TeamCity be ut coverage result: |
TPC-H: Total hot run time: 42998 ms
|
TPC-DS: Total hot run time: 194950 ms
|
ClickBench: Total hot run time: 31.16 s
|
run buildall |
TeamCity be ut coverage result: |
TPC-H: Total hot run time: 41561 ms
|
TPC-DS: Total hot run time: 189420 ms
|
ClickBench: Total hot run time: 33.3 s
|
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
…40831) ## Proposed changes Add a http action which can calculate its hash value based on the path you input. It's useful when you debug. ### API ```http GET /api/file_cache ``` ### request parameter |param|type |desc |require| |:--- |:--- |:--- |:--- | |op |string|the value must be `hash`, other value you can refer to #37484 |yes | |value|string|the input you want to calc hash |yes | ### response if success |param|type |desc | |:--- |:--- |:--- | |hash |string|the hash value of your input| if fail |param |type |desc | |:--- |:--- |:--- | |status|string|error status | |msg |string|error message| ### example #### case 1 ```bash curl '172.100.0.4:8040/api/file_cache?op=hash&value=0200000000000001bf42c14374fff491ffb7c89a1a65c5bb_0.dat' ``` return ```json {"hash":"c6a599f453f67f0949f80ad9990fa3dd"} ``` #### case 2 ```bash curl '172.100.0.4:8040/api/file_cache?op=hash' ``` return ```json { "status": "INVALID_ARGUMENT", "msg": "missing parameter: value is required" } ```
…1037) ## Proposed changes Add a http action which is useful when you debug. ### API ```http GET /api/file_cache ``` ### request parameter #### request parameter1 |param|type|desc|require| |:---|:---|:---|:---| |op|string|the value must be `list_cache`, other value you can refer to #40831 #37484 |yes| |value|string|the segment file name |yes| #### request parameter2 |param|type|desc|require| |:---|:---|:---|:---| |op|string|the value must be `clear`, other value you can refer to #40831 #37484 |yes| |value|string|the segment file name |yes| |sync|bool|clean local cache in sync |no| ### response #### response1 if success |param|type|desc| |:---|:---|:---| ||array|return the segment file cache in local path| if fail |param|type|desc| |:---|:---|:---| ||array|empty array| #### response2 if success |param|type|desc| |:---|:---|:---| |status|string|| |msg|string|| ### example #### case 1 ```bash curl '172.100.0.4:8040/api/file_cache?op=list_cache&value=0200000000000001bf42c14374fff491ffb7c89a1a65c5bb_0.dat' ``` return ```json ["/opt/doris/be/file_cache/c6a/c6a599f453f67f0949f80ad9990fa3dd/0"] ``` #### case 2 ```bash curl '127.0.0.1:8040/api/file_cache?op=clear&sync=true&value=0200000000000001284b68fea3dcfe8a83e65cd88426b081_0.dat' ``` return ```json { "status": "OK", "msg": "OK" } ```
…ache#41037) ## Proposed changes Add a http action which is useful when you debug. ### API ```http GET /api/file_cache ``` ### request parameter #### request parameter1 |param|type|desc|require| |:---|:---|:---|:---| |op|string|the value must be `list_cache`, other value you can refer to apache#40831 apache#37484 |yes| |value|string|the segment file name |yes| #### request parameter2 |param|type|desc|require| |:---|:---|:---|:---| |op|string|the value must be `clear`, other value you can refer to apache#40831 apache#37484 |yes| |value|string|the segment file name |yes| |sync|bool|clean local cache in sync |no| ### response #### response1 if success |param|type|desc| |:---|:---|:---| ||array|return the segment file cache in local path| if fail |param|type|desc| |:---|:---|:---| ||array|empty array| #### response2 if success |param|type|desc| |:---|:---|:---| |status|string|| |msg|string|| ### example #### case 1 ```bash curl '172.100.0.4:8040/api/file_cache?op=list_cache&value=0200000000000001bf42c14374fff491ffb7c89a1a65c5bb_0.dat' ``` return ```json ["/opt/doris/be/file_cache/c6a/c6a599f453f67f0949f80ad9990fa3dd/0"] ``` #### case 2 ```bash curl '127.0.0.1:8040/api/file_cache?op=clear&sync=true&value=0200000000000001284b68fea3dcfe8a83e65cd88426b081_0.dat' ``` return ```json { "status": "OK", "msg": "OK" } ``` (cherry picked from commit 99d0748)
…and clear (#41037) (#43412) ## Proposed changes Add a http action which is useful when you debug. ### API ```http GET /api/file_cache ``` ### request parameter #### request parameter1 |param|type|desc|require| |:---|:---|:---|:---| |op|string|the value must be `list_cache`, other value you can refer to #40831 #37484 |yes| |value|string|the segment file name |yes| #### request parameter2 |param|type|desc|require| |:---|:---|:---|:---| |op|string|the value must be `clear`, other value you can refer to #40831 #37484 |yes| |value|string|the segment file name |yes| |sync|bool|clean local cache in sync |no| ### response #### response1 if success |param|type|desc| |:---|:---|:---| ||array|return the segment file cache in local path| if fail |param|type|desc| |:---|:---|:---| ||array|empty array| #### response2 if success |param|type|desc| |:---|:---|:---| |status|string|| |msg|string|| ### example #### case 1 ```bash curl '172.100.0.4:8040/api/file_cache?op=list_cache&value=0200000000000001bf42c14374fff491ffb7c89a1a65c5bb_0.dat' ``` return ```json ["/opt/doris/be/file_cache/c6a/c6a599f453f67f0949f80ad9990fa3dd/0"] ``` #### case 2 ```bash curl '127.0.0.1:8040/api/file_cache?op=clear&sync=true&value=0200000000000001284b68fea3dcfe8a83e65cd88426b081_0.dat' ``` return ```json { "status": "OK", "msg": "OK" } ``` (cherry picked from commit 99d0748)
Proposed changes
Add a http action which can calculate its hash value based on the path you input. It's useful when you debug.
API
request parameter
hash
, other value you can refer to #37484response
if success
if fail
example
case 1
curl '172.100.0.4:8040/api/file_cache?op=hash&value=0200000000000001bf42c14374fff491ffb7c89a1a65c5bb_0.dat'
return
case 2
curl '172.100.0.4:8040/api/file_cache?op=hash'
return