You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/05/04 13:28:00 UTC
[jira] [Work logged] (HIVE-26157) Change Iceberg storage handler authz URI to metadata location
[ https://issues.apache.org/jira/browse/HIVE-26157?focusedWorklogId=765980&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-765980 ]
ASF GitHub Bot logged work on HIVE-26157:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 04/May/22 13:27
Start Date: 04/May/22 13:27
Worklog Time Spent: 10m
Work Description: pvary commented on code in PR #3226:
URL: https://github.com/apache/hive/pull/3226#discussion_r864827013
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java:
##########
@@ -456,9 +458,19 @@ public boolean isValidMetadataTable(String metaTableName) {
public URI getURIForAuth(org.apache.hadoop.hive.metastore.api.Table hmsTable) throws URISyntaxException {
String dbName = hmsTable.getDbName();
String tableName = hmsTable.getTableName();
- return new URI(ICEBERG_URI_PREFIX + dbName + "/" + tableName);
+ Optional<String> locationProperty = SessionStateUtil.getProperty(conf, hive_metastoreConstants.META_TABLE_LOCATION);
+ if (locationProperty.isPresent()) {
+ // this property is set during the create operation before the hive table was created
+ // we are returning a dummy iceberg metadata file
+ return new URI(ICEBERG_URI_PREFIX + locationProperty.get() + "/metadata/dummy.metadata.json");
Review Comment:
Do we always set the location?
Would it be worthwhile to check this?
Issue Time Tracking
-------------------
Worklog Id: (was: 765980)
Time Spent: 1h 40m (was: 1.5h)
> Change Iceberg storage handler authz URI to metadata location
> -------------------------------------------------------------
>
> Key: HIVE-26157
> URL: https://issues.apache.org/jira/browse/HIVE-26157
> Project: Hive
> Issue Type: Improvement
> Reporter: László Pintér
> Assignee: László Pintér
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> In HIVE-25964, the authz URI has been changed to "iceberg://db.table".
> It is possible to set the metadata pointers of table A to point to table B, and therefore you could read table B's data via querying table A.
> {code:sql}
> alter table A set tblproperties ('metadata_location'='/path/to/B/snapshot.json', 'previous_metadata_location'='/path/to/B/prev_snapshot.json'); {code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)