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

With metastore caching enabled Hive queries sometimes fail with: UncheckedExecutionException: java.util.NoSuchElementException: No value present #12513

Closed
findepi opened this issue May 23, 2022 · 0 comments · Fixed by #12439
Labels
bug Something isn't working
Milestone

Comments

@findepi
Copy link
Member

findepi commented May 23, 2022

Example failure

io.trino.spi.TrinoException: com.google.common.util.concurrent.UncheckedExecutionException: java.util.NoSuchElementException: No value present
	at io.trino.plugin.hive.BackgroundHiveSplitLoader$HiveSplitLoaderTask.process(BackgroundHiveSplitLoader.java:283)
	at io.trino.plugin.hive.util.ResumableTasks$1.run(ResumableTasks.java:38)
	at io.trino.$gen.Trino_370____20220419_013359_2.run(Unknown Source)
	at io.airlift.concurrent.BoundedExecutor.drainQueue(BoundedExecutor.java:80)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: com.google.common.util.concurrent.UncheckedExecutionException: com.google.common.util.concurrent.UncheckedExecutionException: java.util.NoSuchElementException: No value present
	at com.google.common.cache.LocalCache.loadAll(LocalCache.java:4083)
	at com.google.common.cache.LocalCache.getAll(LocalCache.java:4036)
	at com.google.common.cache.LocalCache$LocalLoadingCache.getAll(LocalCache.java:4964)
	at io.trino.plugin.base.cache.EvictableLoadingCache.getAll(EvictableLoadingCache.java:124)
	at io.trino.plugin.hive.metastore.cache.CachingHiveMetastore.getAll(CachingHiveMetastore.java:244)
	at io.trino.plugin.hive.metastore.cache.CachingHiveMetastore.getPartitionsByNames(CachingHiveMetastore.java:689)
	at io.trino.plugin.hive.HiveMetastoreClosure.lambda$getPartitionsByNames$4(HiveMetastoreClosure.java:230)
	at java.base/java.util.Optional.map(Optional.java:260)
	at io.trino.plugin.hive.HiveMetastoreClosure.getPartitionsByNames(HiveMetastoreClosure.java:230)
	at io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore.getPartitionsByNames(SemiTransactionalHiveMetastore.java:900)
	at io.trino.plugin.hive.HiveSplitManager.lambda$getPartitionMetadata$2(HiveSplitManager.java:316)
	at com.google.common.collect.Iterators$6.transform(Iterators.java:826)
	at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:52)
	at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:52)
	at com.google.common.collect.Iterators$ConcatenatedIterator.hasNext(Iterators.java:1404)
	at io.trino.plugin.hive.ConcurrentLazyQueue.poll(ConcurrentLazyQueue.java:37)
	at io.trino.plugin.hive.BackgroundHiveSplitLoader.loadSplits(BackgroundHiveSplitLoader.java:348)
	at io.trino.plugin.hive.BackgroundHiveSplitLoader$HiveSplitLoaderTask.process(BackgroundHiveSplitLoader.java:276)
	... 6 more
Caused by: com.google.common.util.concurrent.UncheckedExecutionException: java.util.NoSuchElementException: No value present
	at com.google.common.cache.LocalCache.loadAll(LocalCache.java:4083)
	at com.google.common.cache.LocalCache.getAll(LocalCache.java:4036)
	at com.google.common.cache.LocalCache$LocalLoadingCache.getAll(LocalCache.java:4964)
	at io.trino.plugin.base.cache.EvictableLoadingCache.getAll(EvictableLoadingCache.java:124)
	at io.trino.plugin.hive.metastore.cache.CachingHiveMetastore.getAll(CachingHiveMetastore.java:244)
	at io.trino.plugin.hive.metastore.cache.CachingHiveMetastore.getPartitionsByNames(CachingHiveMetastore.java:689)
	at io.trino.plugin.hive.metastore.cache.CachingHiveMetastore.loadPartitionsByNames(CachingHiveMetastore.java:727)
	at io.trino.plugin.hive.metastore.cache.CachingHiveMetastore$1.loadAll(CachingHiveMetastore.java:1070)
	at io.trino.plugin.base.cache.EvictableLoadingCache$TokenCacheLoader.loadAll(EvictableLoadingCache.java:359)
	at com.google.common.cache.LocalCache.loadAll(LocalCache.java:4073)
	... 23 more
Caused by: java.util.NoSuchElementException: No value present
	at java.base/java.util.Optional.get(Optional.java:143)
	at io.trino.plugin.hive.metastore.cache.CachingHiveMetastore.loadPartitionsByNames(CachingHiveMetastore.java:723)
	at io.trino.plugin.hive.metastore.cache.CachingHiveMetastore$1.loadAll(CachingHiveMetastore.java:1070)
	at io.trino.plugin.base.cache.EvictableLoadingCache$TokenCacheLoader.loadAll(EvictableLoadingCache.java:359)
	at com.google.common.cache.LocalCache.loadAll(LocalCache.java:4073)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

1 participant