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

HIVE-28059: Iceberg REST Catalog #5606

Merged
merged 54 commits into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
26d22d0
HIVE-28059 : major rebase stage 1;
henrib Jan 10, 2025
a573191
Merge branch 'master' of https://github.com/apache/hive
henrib Jan 31, 2025
23a3c90
HIVE-28059 : major rebase and simpler code;
henrib Jan 31, 2025
e90e1d8
HIVE-28059 : rollback changes that are unnecessary;
henrib Feb 3, 2025
f7da91b
HIVE-28059 : rollback changes that are unnecessary;
henrib Feb 3, 2025
ef8b220
Update iceberg_stats.q.out
henrib Feb 3, 2025
4ee1720
HIVE-28059 : increase test server startup wait time;
henrib Feb 4, 2025
8a09245
HIVE-28059 : attempting a rename on artefactId to blindfix build issue;
henrib Feb 4, 2025
92b9883
HIVE-28059 : fixing src packaging;
henrib Feb 6, 2025
822ad44
Merge branch 'apache:master' into HMS-Catalog
henrib Feb 6, 2025
bc36af2
HIVE-28059 : fixing PR comments;
henrib Feb 11, 2025
399e25b
HIVE-28059 : fixing more PR comments (conf, pom);
henrib Feb 11, 2025
cfe85d2
HIVE-28059 : refactored cache;
henrib Feb 12, 2025
81db7e4
HIVE-28059 : remove dead class & code;
henrib Feb 12, 2025
931eff5
HIVE-28059 : remove dead code;
henrib Feb 12, 2025
37ae8f3
HIVE-28059 : moving configuration variables to the common place;
henrib Feb 12, 2025
c3c71c0
Merge branch 'apache:master' into HMS-Catalog
henrib Feb 12, 2025
1ab4d94
HIVE-28059 : default servlet path update (iceberg);
henrib Feb 13, 2025
7cb3ce2
HIVE-28059 : pom cleanup;
henrib Feb 13, 2025
33a9cff
Merge branch 'apache:master' into HMS-Catalog
henrib Feb 13, 2025
cae7f2f
HIVE-28059 : renamed & commented test helper class
henrib Feb 13, 2025
a4d66fd
HIVE-28059 : removed useless synchronized;
henrib Feb 13, 2025
b83cfaf
HIVE-28059 : removed SecureServletCaller;
henrib Feb 14, 2025
e79c155
Merge branch 'apache:master' into HMS-Catalog
henrib Feb 14, 2025
107e423
HIVE-28059 : nit, javadoc;
henrib Feb 15, 2025
4921457
HIVE-28059 : nit, javadoc (again!);
henrib Feb 15, 2025
9b7eb15
HIVE-28059 : javadoc (again!!);
henrib Feb 16, 2025
4c41e9c
HIVE-28059 : fix regression on PropertyServlet & test;
henrib Feb 16, 2025
507dd6e
HIVE-28059 : fix regression on PropertyServlet test;
henrib Feb 17, 2025
cc9f4fd
Merge branch 'apache:master' into HMS-Catalog
henrib Feb 17, 2025
edd7148
HIVE-28059 : fix nits;
henrib Feb 18, 2025
0190228
Merge branch 'apache:master' into HMS-Catalog
henrib Feb 19, 2025
0a6381c
HIVE-28059 : fixing more nits;
henrib Feb 19, 2025
2be9327
Javadoc nit;
henrib Feb 19, 2025
4750304
Merge branch 'apache:master' into HMS-Catalog
henrib Feb 21, 2025
6c2b930
HIVE-28059 : create only one Jetty instance for HMS property & Iceber…
henrib Feb 21, 2025
11c9718
HIVE-28059 :
henrib Feb 21, 2025
0b1add3
HIVE-28059: Update src.xml
henrib Feb 21, 2025
670ab10
HIVE-28059 :
henrib Feb 21, 2025
e84c069
Merge branch 'apache:master' into HMS-Catalog
henrib Feb 23, 2025
77fb867
HIVE-28059 : fixing property servlet tests;
henrib Feb 23, 2025
447f48d
HIVE-28059 : adding REST catalog to packaging;
henrib Feb 24, 2025
b99d91a
HIVE-28059 : addressing easiest pr comments;
henrib Feb 26, 2025
70b8c75
HIVE-28059 : fix packaging;
henrib Feb 27, 2025
e1675bb
Merge branch 'apache:master' into HMS-Catalog
henrib Feb 27, 2025
1efdf6f
Merge branch 'apache:master' into HMS-Catalog
henrib Mar 2, 2025
7f75025
HIVE-28059 : fix jar naming;
henrib Mar 2, 2025
4e09a68
HIVE-28059 : fixing nits & javadoc;
henrib Mar 2, 2025
370a0e0
HIVE-28059 : fixing javadoc;
henrib Mar 3, 2025
edcaea3
Merge branch 'apache:master' into HMS-Catalog
henrib Mar 6, 2025
d44bfe0
HIVE-28059 : latest nits (servlet names, etc);
henrib Mar 6, 2025
1e7a8da
HIVE-28059 : fixing thrift over http servlet init;
henrib Mar 7, 2025
81041bb
Merge branch 'apache:master' into HMS-Catalog
henrib Mar 7, 2025
f0977c3
Merge branch 'apache:master' into HMS-Catalog
henrib Mar 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packaging/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,11 @@
<artifactId>hive-webhcat-java-client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-standalone-metastore-rest-catalog</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs-client</artifactId>
Expand Down
1 change: 1 addition & 0 deletions packaging/src/main/assembly/src.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
<include>standalone-metastore/metastore-common/**/*</include>
<include>standalone-metastore/metastore-server/**/*</include>
<include>standalone-metastore/metastore-tools/**/*</include>
<include>standalone-metastore/metastore-rest-catalog/**/*</include>
<include>standalone-metastore/src/assembly/src.xml</include>
<include>standalone-metastore/pom.xml</include>
<include>streaming/**/*</include>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,7 @@ static ThriftHiveMetastore.Iface callEmbeddedMetastore(Configuration conf) throw
try {
Class<?> clazz = Class.forName(HIVE_METASTORE_CLASS);
//noinspection JavaReflectionMemberAccess
Method method = clazz.getDeclaredMethod(HIVE_METASTORE_CREATE_HANDLER_METHOD,
Configuration.class);
Method method = clazz.getDeclaredMethod(HIVE_METASTORE_CREATE_HANDLER_METHOD, Configuration.class);
method.setAccessible(true);
return (ThriftHiveMetastore.Iface) method.invoke(null, conf);
} catch (InvocationTargetException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Copy link
Member

@deniskuzZ deniskuzZ Feb 13, 2025

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.

Copy link
Contributor

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.

"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",
Copy link
Member

Choose a reason for hiding this comment

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

are there any tests that validate the simple auth method?

"hive.metastore.catalog.servlet.auth", "jwt",
Copy link
Member

@deniskuzZ deniskuzZ Feb 24, 2025

Choose a reason for hiding this comment

The 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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

"HMS Iceberg Catalog servlet authentication method (simple or jwt)."
),
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",
Copy link
Member

Choose a reason for hiding this comment

The 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
Expand Down
258 changes: 258 additions & 0 deletions standalone-metastore/metastore-rest-catalog/pom.xml
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>
<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>
Loading
Loading