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

Iceberg table creation from Presto fails in AWS Glue #18741

Open
tbinoy opened this issue Nov 30, 2022 · 4 comments
Open

Iceberg table creation from Presto fails in AWS Glue #18741

tbinoy opened this issue Nov 30, 2022 · 4 comments
Assignees
Labels
bug iceberg Apache Iceberg related

Comments

@tbinoy
Copy link

tbinoy commented Nov 30, 2022

The table create statement from Presto to AWS Glue metastore fails with below error.

presto> create schema isl_progress with(location='s3://xxxxxx/');
CREATE SCHEMA
presto> create table isl_progress.sprint_details(sprint_id int, sprint_progress_pct varchar);
Query 20221114_115537_00033_tb3fw failed: Lock is not supported by default

I am using Presto 0.277 to connect create/ insert iceberg tables in AWS Glue. I am able to run select query for iceberg tables in glue but not able to do insert or table creation.

Below is the stack trace

Query 20221116_103709_00002_qie8q failed: Lock is not supported by default
com.facebook.presto.common.NotSupportedException: Lock is not supported by default
at com.facebook.presto.hive.metastore.ExtendedHiveMetastore.lock(ExtendedHiveMetastore.java:126)
at com.facebook.presto.hive.metastore.CachingHiveMetastore.lock(CachingHiveMetastore.java:997)
at com.facebook.presto.iceberg.HiveTableOperations.commit(HiveTableOperations.java:244)
at org.apache.iceberg.BaseTransaction.lambda$commitSimpleTransaction$5(BaseTransaction.java:386)
at org.apache.iceberg.util.Tasks$Builder.runTaskWithRetry(Tasks.java:404)
at org.apache.iceberg.util.Tasks$Builder.runSingleThreaded(Tasks.java:214)
at org.apache.iceberg.util.Tasks$Builder.run(Tasks.java:198)
at org.apache.iceberg.util.Tasks$Builder.run(Tasks.java:190)
at org.apache.iceberg.BaseTransaction.commitSimpleTransaction(BaseTransaction.java:378)
at org.apache.iceberg.BaseTransaction.commitTransaction(BaseTransaction.java:268)
at com.facebook.presto.iceberg.IcebergAbstractMetadata.finishInsert(IcebergAbstractMetadata.java:250)
at com.facebook.presto.spi.connector.classloader.ClassLoaderSafeConnectorMetadata.finishInsert(ClassLoaderSafeConnectorMetadata.java:452)
at com.facebook.presto.metadata.MetadataManager.finishInsert(MetadataManager.java:896)
at com.facebook.presto.sql.planner.LocalExecutionPlanner.lambda$createTableFinisher$3(LocalExecutionPlanner.java:3221)
at com.facebook.presto.operator.TableFinishOperator.getOutput(TableFinishOperator.java:289)
at com.facebook.presto.operator.Driver.processInternal(Driver.java:426)
at com.facebook.presto.operator.Driver.lambda$processFor$9(Driver.java:309)
at com.facebook.presto.operator.Driver.tryWithLock(Driver.java:730)
at com.facebook.presto.operator.Driver.processFor(Driver.java:302)
at com.facebook.presto.execution.SqlTaskExecution$DriverSplitRunner.processFor(SqlTaskExecution.java:1079)
at com.facebook.presto.execution.executor.PrioritizedSplitRunner.process(PrioritizedSplitRunner.java:166)
at com.facebook.presto.execution.executor.TaskExecutor$TaskRunner.run(TaskExecutor.java:599)
at com.facebook.presto.$gen.Presto_0_277_119fd9a____20221116_101723_1.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)

@rohanpednekar
Copy link
Contributor

from Reetika

(https://prestodb.slack.com/archives/C07JH9WMQ/p1669390018794319?thread_ts=1668674486.374049&cid=C07JH9WMQ)
I was able to reproduce the issue.
Looks like the lock related changes were introduced in presto-0.272 here, If you want you can try out presto-0.271 for now, CREATE should work fine there. We may have to debug further about RCA for lock related issue while CREATE Table

https://prestodb.slack.com/archives/C07JH9WMQ/p1668674486374049

@tdcmeehan tdcmeehan added the iceberg Apache Iceberg related label Jul 28, 2023
@tdcmeehan
Copy link
Contributor

@tbinoy are you still facing this issue?

@imjalpreet
Copy link
Member

@tdcmeehan This issue is still present when using Glue as the catalog. We will need to fix this.

@pratyakshsharma
Copy link
Contributor

Latest stack trace on current master branch -

com.facebook.presto.common.NotSupportedException: Lock is not supported by default
	at com.facebook.presto.hive.metastore.ExtendedHiveMetastore.lock(ExtendedHiveMetastore.java:136)
	at com.facebook.presto.hive.metastore.CachingHiveMetastore.lock(CachingHiveMetastore.java:1012)
	at com.facebook.presto.iceberg.HiveTableOperations.commit(HiveTableOperations.java:249)
	at org.apache.iceberg.BaseTransaction.commitCreateTransaction(BaseTransaction.java:311)
	at org.apache.iceberg.BaseTransaction.commitTransaction(BaseTransaction.java:290)
	at com.facebook.presto.iceberg.IcebergAbstractMetadata.finishInsert(IcebergAbstractMetadata.java:244)
	at com.facebook.presto.iceberg.IcebergAbstractMetadata.finishCreateTable(IcebergAbstractMetadata.java:222)
	at com.facebook.presto.iceberg.IcebergAbstractMetadata.createTable(IcebergAbstractMetadata.java:216)
	at com.facebook.presto.spi.connector.classloader.ClassLoaderSafeConnectorMetadata.createTable(ClassLoaderSafeConnectorMetadata.java:356)
	at com.facebook.presto.metadata.MetadataManager.createTable(MetadataManager.java:618)
	at com.facebook.presto.execution.CreateTableTask.internalExecute(CreateTableTask.java:201)
	at com.facebook.presto.execution.CreateTableTask.execute(CreateTableTask.java:87)
	at com.facebook.presto.execution.CreateTableTask.execute(CreateTableTask.java:69)
	at com.facebook.presto.execution.DDLDefinitionExecution.executeTask(DDLDefinitionExecution.java:62)
	at com.facebook.presto.execution.DataDefinitionExecution.start(DataDefinitionExecution.java:209)
	at com.facebook.presto.$gen.Presto_null__testversion____20231012_052924_1.run(Unknown Source)
	at com.facebook.presto.execution.SqlQueryManager.createQuery(SqlQueryManager.java:306)
	at com.facebook.presto.dispatcher.LocalDispatchQuery.lambda$startExecution$8(LocalDispatchQuery.java:211)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug iceberg Apache Iceberg related
Projects
Status: 🏗 In progress
Development

No branches or pull requests

6 participants