-
Notifications
You must be signed in to change notification settings - Fork 318
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
[ARCTIC-260][Core]Support loading Iceberg catalog #549
Conversation
core/src/main/java/com/netease/arctic/catalog/CatalogLoader.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/netease/arctic/catalog/CatalogLoader.java
Outdated
Show resolved
Hide resolved
String catalogImpl; | ||
Set<TableFormat> tableFormats = CatalogUtil.tableFormats(catalogMeta); | ||
Preconditions.checkArgument(tableFormats.size() == 1, "Catalog support only one table format now."); | ||
TableFormat tableFormat = tableFormats.iterator().next(); | ||
switch (type) { |
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.
这边在实现上,是不是不要在代码层面复用 type 字段了。 v0.4 就直接引入 metastore, table-format 两个新字段。 v0.3 的还走 type 逻辑。 这样代码上更清晰一些。
在兼容性上,保证 v0.4 接口还有 type 字段,v0.5 开始就不返回 type 字段了?
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.
catalog type
is the same with metastore
in AMS Dashboard.
I prefer to not add a metastore
property in database and thrift argument.
return tableMetaStore.doAs(() -> ((SupportsNamespaces)icebergCatalog).listNamespaces(Namespace.empty()).stream() | ||
.map(namespace -> namespace.level(0)).distinct().collect(Collectors.toList())); | ||
} else { | ||
throw new UnsupportedOperationException(String.format("Iceberg catalog: %s do now implement SupportsNamespaces", |
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.
throw new UnsupportedOperationException(String.format("Iceberg catalog: %s do now implement SupportsNamespaces",
'do now' should be does not ?
return null; | ||
}); | ||
} else { | ||
throw new UnsupportedOperationException(String.format("Iceberg catalog: %s do now implement SupportsNamespaces", |
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.
do now --> does not
return null; | ||
}); | ||
} else { | ||
throw new UnsupportedOperationException(String.format("Iceberg catalog: %s do now implement SupportsNamespaces", |
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.
throw new UnsupportedOperationException(String.format("Iceberg catalog: %s do now implement SupportsNamespaces",
'do now' should be does not ?
* add BaseIcebergCatalog * fix compile errors * fix style errors * fix comments
* add BaseIcebergCatalog * fix compile errors * fix style errors * fix comments
Why are the changes needed?
Subtask of #260.
Support loading iceberg catalog.
Brief change log
How was this patch tested?
Add some test cases that check the changes thoroughly including negative and positive cases if possible
Add screenshots for manual tests if appropriate
Run test locally before making a pull request
Documentation