-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[fix](hive)Modify the Hive notification event processing method when using meta cache and add parameters to the Hive catalog. #39239
[fix](hive)Modify the Hive notification event processing method when using meta cache and add parameters to the Hive catalog. #39239
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
run buildall |
run buildall |
TPC-H: Total hot run time: 37508 ms
|
run buildall |
TPC-H: Total hot run time: 37485 ms
|
TPC-DS: Total hot run time: 189905 ms
|
ClickBench: Total hot run time: 30.43 s
|
run buildall |
TPC-H: Total hot run time: 37386 ms
|
run buildall |
1 similar comment
run buildall |
TPC-H: Total hot run time: 37886 ms
|
TPC-DS: Total hot run time: 195789 ms
|
ClickBench: Total hot run time: 31.73 s
|
run buildall |
TPC-H: Total hot run time: 38639 ms
|
TPC-DS: Total hot run time: 191458 ms
|
ClickBench: Total hot run time: 31.58 s
|
@@ -101,6 +106,12 @@ public void checkProperties() throws DdlException { | |||
"The parameter " + FILE_META_CACHE_TTL_SECOND + " is wrong, value is " + fileMetaCacheTtlSecond); | |||
} | |||
|
|||
enableHmsEventsIncrementalSync = | |||
catalogProperty.getOrDefault(HMSProperties.ENABLE_HMS_EVENTS_INCREMENTAL_SYNC, "false").equals("true"); |
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.
The default value should be Config.enable_hms_events_incremental_sync
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.
I will modify it
catalogProperty.getOrDefault(HMSProperties.ENABLE_HMS_EVENTS_INCREMENTAL_SYNC, "false").equals("true"); | ||
|
||
hmsEventsBatchSizePerRpc = | ||
Integer.valueOf(catalogProperty.getOrDefault(HMSProperties.HMS_EVENTIS_BATCH_SIZE_PER_RPC, "-1")); |
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.
what is -1 mean?
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.
Originally I wanted to indicate that this value was not set, but now I want its default value to be Config.hms_events_batch_size_per_rpc
fe/fe-core/src/main/java/org/apache/doris/datasource/hive/event/AlterPartitionEvent.java
Show resolved
Hide resolved
@@ -125,6 +128,8 @@ private void realRun() { | |||
} catch (MetastoreNotificationFetchException e) { | |||
LOG.warn("Failed to fetch hms events on {}. msg: ", hmsExternalCatalog.getName(), e); | |||
} catch (Exception ex) { | |||
hmsExternalCatalog.onRefresh(true); |
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.
What is this 2 lines for?
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.
Suppose you receive a set of events, and when processing the insert event, the initialization reports a nullpointer. The event processing fails, and our data with Hive is out of sync? Refresh it and you can process other events next time. i will modify it to onRefreshCache
run buildall |
TPC-H: Total hot run time: 39318 ms
|
TPC-DS: Total hot run time: 195658 ms
|
ClickBench: Total hot run time: 31.87 s
|
run buildall |
TPC-H: Total hot run time: 38306 ms
|
0255473
to
b428fa7
Compare
run buildall |
TPC-H: Total hot run time: 38084 ms
|
TPC-DS: Total hot run time: 185898 ms
|
ClickBench: Total hot run time: 31.14 s
|
PR approved by at least one committer and no changes requested. |
…using meta cache and add parameters to the Hive catalog. (apache#39239) before apache#15401 and apache#38244 1. Add the parameter `hive.enable_hms_events_incremental_sync` to the hive catalog, which is used to switch the catalog to read hive notification events (default is false). The default value is `enable_hms_events_incremental_sync` in fe.conf 2. Add the parameter `hive.hms_events_batch_size_per_rpc` to the hive catalog, which is used to set the size of notification events read by the catalog each time. The default value is `hms_events_batch_size_per_rpc` in fe.conf (default is 500) 3. append hms event notification case . 4. Remove the `use_meta_cache` setting in catalog that is forced to true. Example : ``` create catalog if not exists catalog_name properties ( "type"="hms", 'hive.metastore.uris' = 'thrift://externalEnvIp:hms_port', "hive.enable_hms_events_incremental_sync" ="true", "hive.hms_events_batch_size_per_rpc" = "1000" ); ```
pick part of #39239 set default value of use_meta_cache to false, same as previous version, to avoid compatibility issue. This should be totally fixed in doris 3.0.2
pick part of #39239 set default value of use_meta_cache to false, same as previous version, to avoid compatibility issue. This should be totally fixed in doris 3.0.2
…using meta cache and add parameters to the Hive catalog. (#39239) before #15401 and #38244 ## Proposed changes 1. Add the parameter `hive.enable_hms_events_incremental_sync` to the hive catalog, which is used to switch the catalog to read hive notification events (default is false). The default value is `enable_hms_events_incremental_sync` in fe.conf 2. Add the parameter `hive.hms_events_batch_size_per_rpc` to the hive catalog, which is used to set the size of notification events read by the catalog each time. The default value is `hms_events_batch_size_per_rpc` in fe.conf (default is 500) 3. append hms event notification case . 4. Remove the `use_meta_cache` setting in catalog that is forced to true. Example : ``` create catalog if not exists catalog_name properties ( "type"="hms", 'hive.metastore.uris' = 'thrift://externalEnvIp:hms_port', "hive.enable_hms_events_incremental_sync" ="true", "hive.hms_events_batch_size_per_rpc" = "1000" ); ```
…using meta cache and add parameters to the Hive catalog. (apache#39239) (apache#39865) bp apache#39239 Co-authored-by: daidai <2017501503@qq.com>
before #15401 and #38244
Proposed changes
Add the parameter
hive.enable_hms_events_incremental_sync
to the hive catalog, which is used to switch the catalog to read hive notification events (default is false). The default value isenable_hms_events_incremental_sync
in fe.confAdd the parameter
hive.hms_events_batch_size_per_rpc
to the hive catalog, which is used to set the size of notification events read by the catalog each time. The default value ishms_events_batch_size_per_rpc
in fe.conf (default is 500)append hms event notification case .
Remove the
use_meta_cache
setting in catalog that is forced to true.Example :