diqiu50 commented on code in PR #10726:
URL: https://github.com/apache/gravitino/pull/10726#discussion_r3070760948
##########
catalogs/catalog-glue/src/main/java/org/apache/gravitino/catalog/glue/GlueTablePropertiesMetadata.java:
##########
@@ -26,12 +30,36 @@
/**
* Properties metadata for Glue tables.
*
- * <p>TODO PR-02: support passthrough of Glue Table.parameters() keys such as
{@code table_type} and
- * {@code metadata_location} for Iceberg, Delta, and other formats.
+ * <p>Defines well-known Glue {@code Table.parameters()} keys that Gravitino
exposes. All entries
+ * are optional and mutable, reflecting that Glue stores them as free-form
key-value pairs. Unknown
+ * parameters from {@code Table.parameters()} are passed through transparently
by the catalog
+ * operations layer and are not validated here.
+ *
+ * <p>Note: storage location ({@code StorageDescriptor.location}) varies by
table format and is
+ * handled per-format in the Table CRUD layer, not declared here.
*/
public class GlueTablePropertiesMetadata extends BasePropertiesMetadata {
- private static final Map<String, PropertyEntry<?>> PROPERTIES_METADATA =
ImmutableMap.of();
+ private static final Map<String, PropertyEntry<?>> PROPERTIES_METADATA =
+ ImmutableMap.<String, PropertyEntry<?>>builder()
+ .put(
+ TABLE_FORMAT_TYPE,
+ stringOptionalPropertyEntry(
+ TABLE_FORMAT_TYPE,
+ "Glue table format type stored in Table.parameters(). Common
values:"
+ + " ICEBERG, HIVE, DELTA, PARQUET.",
Review Comment:
We only support the `TABLE_FORMAT_TYPE` of ICEBERG, HIVE first
##########
catalogs/catalog-glue/src/main/java/org/apache/gravitino/catalog/glue/GlueConstants.java:
##########
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.gravitino.catalog.glue;
+
+/** Constant keys for the AWS Glue Data Catalog connector configuration and
table properties. */
+public final class GlueConstants {
+
+ // -------------------------------------------------------------------------
+ // Catalog-level connection properties
+ // -------------------------------------------------------------------------
+
+ /** AWS region for the Glue Data Catalog (required). */
+ public static final String AWS_REGION = "aws-region";
+
+ /**
+ * Glue catalog ID — the 12-digit AWS account ID (optional). When omitted,
defaults to the
+ * caller's AWS account ID.
+ */
+ public static final String AWS_GLUE_CATALOG_ID = "aws-glue-catalog-id";
+
+ /** AWS access key ID for static credential authentication (optional,
sensitive). */
+ public static final String AWS_ACCESS_KEY_ID = "aws-access-key-id";
+
+ /** AWS secret access key for static credential authentication (optional,
sensitive). */
+ public static final String AWS_SECRET_ACCESS_KEY = "aws-secret-access-key";
+
+ /**
+ * Custom Glue endpoint URL (optional). Used for VPC endpoints or LocalStack
testing. Example:
+ * {@code http://localhost:4566}
+ */
+ public static final String AWS_GLUE_ENDPOINT = "aws-glue-endpoint";
+
+ /**
+ * Default table format used when creating tables via Gravitino's {@code
createTable()} API
+ * (optional). Accepted values: {@code iceberg}, {@code hive}. Defaults to
{@code hive}.
+ */
+ public static final String DEFAULT_TABLE_FORMAT = "default-table-format";
+
+ /** Default value for {@link #DEFAULT_TABLE_FORMAT}: {@code "hive"}. */
+ public static final String DEFAULT_TABLE_FORMAT_VALUE = "hive";
+
+ /**
+ * Comma-separated list of table types exposed by {@code listTables()} and
{@code loadTable()}
+ * (optional). Accepted values: {@code all}, {@code hive}, {@code iceberg},
{@code delta}, {@code
+ * parquet}. Defaults to {@code all}.
+ */
+ public static final String TABLE_TYPE_FILTER = "table-type-filter";
+
+ /** Default value for {@link #TABLE_TYPE_FILTER}: expose all table types. */
+ public static final String TABLE_TYPE_FILTER_ALL = "all";
Review Comment:
fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]