-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
HIVE-28059: Iceberg REST Catalog #5606
Changes from all commits
26d22d0
a573191
23a3c90
e90e1d8
f7da91b
ef8b220
4ee1720
8a09245
92b9883
822ad44
bc36af2
399e25b
cfe85d2
81db7e4
931eff5
37ae8f3
c3c71c0
1ab4d94
7cb3ce2
33a9cff
cae7f2f
a4d66fd
b83cfaf
e79c155
107e423
4921457
9b7eb15
4c41e9c
507dd6e
cc9f4fd
edd7148
0190228
0a6381c
2be9327
4750304
6c2b930
11c9718
0b1add3
670ab10
e84c069
77fb867
447f48d
b99d91a
70b8c75
e1675bb
1efdf6f
7f75025
4e09a68
370a0e0
edcaea3
d44bfe0
1e7a8da
81041bb
f0977c3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1823,8 +1823,46 @@ public enum ConfVars { | |
), | ||
PROPERTIES_SERVLET_AUTH("hive.metastore.properties.servlet.auth", | ||
"hive.metastore.properties.servlet.auth", "jwt", | ||
new StringSetValidator("simple", "jwt"), | ||
"Property-maps servlet authentication method (simple or jwt)." | ||
), | ||
ICEBERG_CATALOG_SERVLET_FACTORY("hive.metastore.catalog.servlet.factory", | ||
"hive.metastore.catalog.servlet.factory", | ||
"org.apache.iceberg.rest.HMSCatalogFactory", | ||
"HMS Iceberg Catalog servlet factory class name." | ||
+ "The factory needs to expose a method: " | ||
+ "public static HttpServlet createServlet(Configuration configuration);" | ||
), | ||
ICEBERG_CATALOG_SERVLET_PATH("hive.metastore.catalog.servlet.path", | ||
"hive.metastore.catalog.servlet.path", "iceberg", | ||
"HMS Iceberg Catalog servlet path component of URL endpoint." | ||
), | ||
ICEBERG_CATALOG_SERVLET_PORT("hive.metastore.catalog.servlet.port", | ||
"hive.metastore.catalog.servlet.port", -1, | ||
"HMS Iceberg Catalog servlet server port. Negative value disables the servlet," + | ||
" 0 will let the system determine the catalog server port," + | ||
" positive value will be used as-is." | ||
), | ||
ICEBERG_CATALOG_SERVLET_AUTH("hive.metastore.catalog.servlet.auth", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are there any tests that validate the |
||
"hive.metastore.catalog.servlet.auth", "jwt", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we do not support oauth2 as per iceberg rest spec ATM, right? Iceberg rest-catalog clients won't be able to connect with oauth2 IdP? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I'm not mistaken, the Iceberg rest spec allows using a Bearer token for authentication which is what our 'jwt' auth does. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you might be right
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"HMS Iceberg Catalog servlet authentication method (simple or jwt)." | ||
henrib marked this conversation as resolved.
Show resolved
Hide resolved
|
||
), | ||
ICEBERG_CATALOG_CACHE_EXPIRY("hive.metastore.catalog.cache.expiry", | ||
"hive.metastore.catalog.cache.expiry", 60_000L, | ||
"HMS Iceberg Catalog cache expiry." | ||
), | ||
HTTPSERVER_THREADPOOL_MIN("hive.metastore.httpserver.threadpool.min", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. indentation is diff |
||
"hive.metastore.httpserver.threadpool.min", 8, | ||
"HMS embedded HTTP server minimum number of threads." | ||
), | ||
HTTPSERVER_THREADPOOL_MAX("hive.metastore.httpserver.threadpool.max", | ||
"hive.metastore.httpserver.threadpool.max", 256, | ||
"HMS embedded HTTP server maximum number of threads." | ||
), | ||
HTTPSERVER_THREADPOOL_IDLE("hive.metastore.httpserver.threadpool.idle", | ||
"hive.metastore.httpserver.threadpool.idle", 60_000L, | ||
"HMS embedded HTTP server thread idle time." | ||
), | ||
|
||
// Deprecated Hive values that we are keeping for backwards compatibility. | ||
@Deprecated | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,258 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>hive-standalone-metastore</artifactId> | ||
<groupId>org.apache.hive</groupId> | ||
<version>4.1.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
<artifactId>hive-standalone-metastore-rest-catalog</artifactId> | ||
<name>Hive Metastore REST Catalog</name> | ||
<properties> | ||
<standalone.metastore.path.to.root>..</standalone.metastore.path.to.root> | ||
<maven.compiler.source>8</maven.compiler.source> | ||
<maven.compiler.target>8</maven.compiler.target> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<log4j2.debug>false</log4j2.debug> | ||
<hive.version>${project.parent.version}</hive.version> | ||
<iceberg.version>1.6.1</iceberg.version> | ||
</properties> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.hive</groupId> | ||
<artifactId>hive-standalone-metastore-server</artifactId> | ||
<version>${hive.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.hive</groupId> | ||
<artifactId>hive-standalone-metastore-common</artifactId> | ||
<version>${hive.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.hive</groupId> | ||
<artifactId>hive-iceberg-catalog</artifactId> | ||
deniskuzZ marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<version>${hive.version}</version> | ||
</dependency> | ||
<!-- Test dependencies --> | ||
<dependency> | ||
<groupId>org.apache.hive</groupId> | ||
<artifactId>hive-standalone-metastore-common</artifactId> | ||
<version>${hive.version}</version> | ||
<classifier>tests</classifier> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.hive</groupId> | ||
<artifactId>hive-standalone-metastore-server</artifactId> | ||
<version>${hive.version}</version> | ||
<classifier>tests</classifier> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.httpcomponents.core5</groupId> | ||
<artifactId>httpcore5</artifactId> | ||
<version>5.2</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.github.tomakehurst</groupId> | ||
<artifactId>wiremock-jre8-standalone</artifactId> | ||
<version>${wiremock.jre8.standalone.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-api</artifactId> | ||
<version>${junit.jupiter.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.hadoop</groupId> | ||
<artifactId>hadoop-auth</artifactId> | ||
<version>${hadoop.version}</version> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-log4j12</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-reload4j</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>ch.qos.reload4j</groupId> | ||
<artifactId>reload4j</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>commons-logging</groupId> | ||
<artifactId>commons-logging</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.hadoop</groupId> | ||
<artifactId>hadoop-common</artifactId> | ||
<version>${hadoop.version}</version> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-log4j12</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-reload4j</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>ch.qos.reload4j</groupId> | ||
<artifactId>reload4j</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>commons-beanutils</groupId> | ||
<artifactId>commons-beanutils</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>commons-logging</groupId> | ||
<artifactId>commons-logging</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.hadoop</groupId> | ||
<artifactId>hadoop-hdfs-client</artifactId> | ||
<version>${hadoop.version}</version> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-log4j12</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-reload4j</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>ch.qos.reload4j</groupId> | ||
<artifactId>reload4j</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>commons-logging</groupId> | ||
<artifactId>commons-logging</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.hadoop</groupId> | ||
<artifactId>hadoop-hdfs</artifactId> | ||
<version>${hadoop.version}</version> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-log4j12</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-reload4j</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>ch.qos.reload4j</groupId> | ||
<artifactId>reload4j</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>commons-logging</groupId> | ||
<artifactId>commons-logging</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.hadoop</groupId> | ||
<artifactId>hadoop-mapreduce-client-core</artifactId> | ||
<version>${hadoop.version}</version> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-log4j12</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-reload4j</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>ch.qos.reload4j</groupId> | ||
<artifactId>reload4j</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>commons-logging</groupId> | ||
<artifactId>commons-logging</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<!-- Suppress source assembly --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>assemble</id> | ||
<phase>none</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.rat</groupId> | ||
<artifactId>apache-rat-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<phase>process-resources</phase> | ||
<goals> | ||
<goal>check</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>${surefire.version}</version> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>exec-maven-plugin</artifactId> | ||
<version>3.1.0</version> | ||
<executions> | ||
<execution> | ||
<phase>test</phase> | ||
<configuration> | ||
<systemProperties> | ||
<systemProperty> | ||
<key>log4j2.debug</key> | ||
<value>false</value> | ||
</systemProperty> | ||
</systemProperties> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
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.
Is it supposed to be table-format agnostic RestCatalog, supporting both iceberg, external and Hive native tables?
I would expect It to open via REST an interface to both Iceberg Catalog & HMS.
see https://www.databricks.com/product/unity-catalog
Unity Catalog supports all 3 lakehouse table formats, but it also supports the major catalog interfaces across Iceberg Rest Catalog, Hive Metastore (HMS), and Unity Catalog.
HMS:
https://github.com/unitycatalog/unitycatalog/blob/5f868a7e08cafbe3235887d34747e357a292fa17/server/src/main/java/io/unitycatalog/server/UnityCatalogServer.java#L206
Iceberg Rest Catalog:
https://github.com/unitycatalog/unitycatalog/blob/5f868a7e08cafbe3235887d34747e357a292fa17/server/src/main/java/io/unitycatalog/server/UnityCatalogServer.java#L234
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.
Another OSS https://github.com/Netflix/metacat also has similar ability-supporting a variety of different kinds of catalog.