-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[BugFix] Fix a bug that when catalog is unified catalog the background refresh for hive connector do not work #55215
[BugFix] Fix a bug that when catalog is unified catalog the background refresh for hive connector do not work #55215
Conversation
3c683fa
to
40ae02d
Compare
b5f5f94
to
55b0ee0
Compare
Hi @stephen-shelby |
@duanyyyyyyy Do you mean there is only one type catalog like hive catalog could refresh when you create a unified catalog? but hudi/delta lake catalog could not refresh? |
Yes, for example when I create the unified catalog, only delta lake can be refresh background. |
|
|
||
public class ConnectorProcessorName { | ||
|
||
private final String catalogName; |
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 think catalogType is better
private final HiveConnectorInternalMgr internalMgr; | ||
private final HiveMetadataFactory metadataFactory; | ||
|
||
public HiveConnector(ConnectorContext context) { | ||
this.properties = context.getProperties(); | ||
this.catalogName = context.getCatalogName(); | ||
this.processorName = new ConnectorProcessorName(catalogName, "hive_connector"); |
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.
this.processorName = new ConnectorProcessorName(catalogName, "hive_connector"); | |
this.processorName = new ConnectorProcessorName(catalogName, "hive"); |
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.
Maintain consistency with Delta Lake.
@@ -41,6 +43,7 @@ public HudiConnector(ConnectorContext context) { | |||
CloudConfiguration cloudConfiguration = CloudConfigurationFactory.buildCloudConfigurationForStorage(properties); | |||
HdfsEnvironment hdfsEnvironment = new HdfsEnvironment(cloudConfiguration); | |||
this.catalogName = context.getCatalogName(); | |||
this.processorName = new ConnectorProcessorName(catalogName, "hudi_connector"); |
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.
this.processorName = new ConnectorProcessorName(catalogName, "hudi_connector"); | |
this.processorName = new ConnectorProcessorName(catalogName, "hudi"); |
cacheUpdateProcessors.put(catalogName, cache); | ||
public void registerCacheUpdateProcessor(ConnectorProcessorName processorName, CacheUpdateProcessor cache) { | ||
LOG.info("register to update {} metadata cache from {} in the ConnectorTableMetadataProcessor", | ||
processorName.getConnectorName(), processorName.getConnectorName()); |
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.
why log ConnectorName twice, plz print more explicit information.
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 think you could print like this
register to update {}:{} metadata cache in the ConnectorTableMetadataProcessor", catalogName, catalogType
44f5cbd
to
af843a9
Compare
…for hive connector do not work Signed-off-by: duanyyyyyyy <[email protected]>
Signed-off-by: duanyyyyyyy <[email protected]>
af843a9
to
accdf9e
Compare
Quality Gate passedIssues Measures |
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 23 / 26 (88.46%) file detail
|
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
Hi @Youngwb |
Fix a bug that when catalog is unified catalog the background refresh for hive connector do not work
Why I'm doing:
We found that when we use unified catalog the background refresh will not work.
Because that when we register into the map, we will use the same key.
What I'm doing:
Introduce a new object named
CatalogNameType
and use this object as the key.Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: