Skip to content
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

[Feature](multi-catalog) Support sql cache for hms catalog #23391

Merged
merged 6 commits into from
Sep 10, 2023

Conversation

dutyu
Copy link
Contributor

@dutyu dutyu commented Aug 23, 2023

Proposed changes

Issue Number: close #xxx

Support sql cache for hms catalog. Legacy planner and Nereids planner are all supported.
Not support partition cache now, not support federated query now.

Now just use the lastUpdateTime of hive table, and the relevant pr is #21873 . The cache will be missed if the lastUpdateTime changed, i will submit a pr to record the update time of hive partitions later~

Test case 1:

Set Config.cache_last_version_interval_second=1.

  1. Execute select * from test_wxy.call_center limit 10, wait a second and submit the query again, the cache will hit at the second time.

image

  1. Execute refresh table hive_safelycc.test_wxy.call_center, then cache will be missed.

image
image

Test case 2:

Set Config.cache_last_version_interval_second=1, enable hms event listener.

  1. Execute select count(0) from test_wxy.call_center, wait a second and submit the query again, the cache will hit at the second time.

image

  1. Alter this hive table at hive side , wait some seconds (need some time to process the hms event), then submit the query again and the cache will be missed.

image

image

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@dutyu
Copy link
Contributor Author

dutyu commented Aug 23, 2023

run buildall

@hello-stephen
Copy link
Contributor

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.69 seconds
stream load tsv: 540 seconds loaded 74807831229 Bytes, about 132 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 29.4 seconds inserted 10000000 Rows, about 340K ops/s
storage size: 17162018128 Bytes

@dutyu dutyu changed the title Support sql cache for hms [Feature](multi-catalog) Support sql cache for hms Aug 23, 2023
@dutyu dutyu changed the title [Feature](multi-catalog) Support sql cache for hms [Feature](multi-catalog) Support sql cache for hms catalog Aug 23, 2023
@dutyu
Copy link
Contributor Author

dutyu commented Aug 28, 2023

run buildall

@hello-stephen
Copy link
Contributor

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 47.27 seconds
stream load tsv: 535 seconds loaded 74807831229 Bytes, about 133 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 29.1 seconds inserted 10000000 Rows, about 343K ops/s
storage size: 17161873831 Bytes

@dutyu
Copy link
Contributor Author

dutyu commented Aug 31, 2023

run buildall

@hello-stephen
Copy link
Contributor

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.8 seconds
stream load tsv: 538 seconds loaded 74807831229 Bytes, about 132 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 29.3 seconds inserted 10000000 Rows, about 341K ops/s
storage size: 17161932448 Bytes

@dutyu
Copy link
Contributor Author

dutyu commented Sep 3, 2023

run buildall

@hello-stephen
Copy link
Contributor

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 48.42 seconds
stream load tsv: 530 seconds loaded 74807831229 Bytes, about 134 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 29.2 seconds inserted 10000000 Rows, about 342K ops/s
storage size: 17161880421 Bytes

@dutyu
Copy link
Contributor Author

dutyu commented Sep 10, 2023

run buildall

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.04 seconds
stream load tsv: 583 seconds loaded 74807831229 Bytes, about 122 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 28.6 seconds inserted 10000000 Rows, about 349K ops/s
storage size: 17162392938 Bytes

@morningman
Copy link
Contributor

I will add test case later

Copy link
Contributor

@xinyiZzz xinyiZzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Sep 10, 2023
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@morningman morningman merged commit 586492c into apache:master Sep 10, 2023
18 of 20 checks passed
@xiaokang xiaokang added merge_conflict usercase Important user case type label labels Sep 10, 2023
morningman added a commit to morningman/doris that referenced this pull request Sep 12, 2023
)

**Support sql cache for hms catalog. Legacy planner and Nereids planner are all supported.
Not support partition cache now, not support federated query now.**
morningman added a commit that referenced this pull request Sep 13, 2023
**Support sql cache for hms catalog. Legacy planner and Nereids planner are all supported.
Not support partition cache now, not support federated query now.**
morningman added a commit to morningman/doris that referenced this pull request Sep 13, 2023
)

**Support sql cache for hms catalog. Legacy planner and Nereids planner are all supported.
Not support partition cache now, not support federated query now.**
xiaokang pushed a commit that referenced this pull request Sep 13, 2023
…24324)

**Support sql cache for hms catalog. Legacy planner and Nereids planner are all supported.
Not support partition cache now, not support federated query now.**
@xiaokang xiaokang mentioned this pull request Sep 30, 2023
@xiaokang xiaokang mentioned this pull request Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. dev/2.0.2-merged merge_conflict reviewed usercase Important user case type label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants