Notice
Recent Posts
«   2024/12   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
Tags more
Archives
관리 메뉴

🐥

TRINO -> Hive metastore 사용 시 HIVE_METASTORE_ERROR 오류 조치 본문

데이터

TRINO -> Hive metastore 사용 시 HIVE_METASTORE_ERROR 오류 조치

•8• 2023. 4. 21. 13:12
io.trino.spi.TrinoException: testserver-1:9083: java.net.SocketTimeoutException: Read timed out at 
io.trino.plugin.hive.metastore.thrift.ThriftHiveMetastore.getPartitionNamesByFilter(ThriftHiveMetastore.java:1080) at 
io.trino.plugin.hive.metastore.thrift.BridgingHiveMetastore.getPartitionNamesByFilter(BridgingHiveMetastore.java:335) at
io.trino.plugin.hive.metastore.ForwardingHiveMetastore.getPartitionNamesByFilter(ForwardingHiveMetastore.java:239) at 
io.trino.plugin.hive.aws.athena.PartitionProjectionMetastoreDecorator$PartitionProjectionMetastore.getPartitionNamesByFilter(PartitionProjectionMetastoreDecorator.java:79) at 
io.trino.plugin.hive.metastore.cache.CachingHiveMetastore.loadPartitionNamesByFilter(CachingHiveMetastore.java:682) at 
com.google.common.cache.CacheLoader$FunctionToCacheLoader.load(CacheLoader.java:169) at 
io.trino.collect.cache.EvictableCache$TokenCacheLoader.load(EvictableCache.java:442) at 
io.trino.collect.cache.EvictableCache$TokenCacheLoader.load(EvictableCache.java:428) at 
com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3533) at
com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2282) at 
com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2159) at 
com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2049) at 
com.google.common.cache.LocalCache.get(LocalCache.java:3966) at 
com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3989) at
com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4950) at 
io.trino.collect.cache.EvictableCache.get(EvictableCache.java:147) at 
com.google.common.cache.AbstractLoadingCache.getUnchecked(AbstractLoadingCache.java:51) at 
io.trino.plugin.hive.metastore.cache.CachingHiveMetastore.get(CachingHiveMetastore.java:243) at 
io.trino.plugin.hive.metastore.cache.CachingHiveMetastore.getPartitionNamesByFilter(CachingHiveMetastore.java:677) at 
io.trino.plugin.hive.HiveMetastoreClosure.getPartitionNamesByFilter(HiveMetastoreClosure.java:220) at
io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore.doGetPartitionNames(SemiTransactionalHiveMetastore.java:927) at 
io.trino.plugin.hive.metastore.SemiTransactionalHiveMetastore.getPartitionNamesByFilter(SemiTransactionalHiveMetastore.java:898) at 
io.trino.plugin.hive.HivePartitionManager.getFilteredPartitionNames(HivePartitionManager.java:253) at 
io.trino.plugin.hive.HivePartitionManager.lambda$getPartitions$2(HivePartitionManager.java:117) at 
java.base/java.util.Optional.orElseGet(Optional.java:364) at io.trino.plugin.hive.HivePartitionManager.getPartitions(HivePartitionManager.java:117) at 
io.trino.plugin.hive.HiveMetadata.lambda$getTableProperties$82(HiveMetadata.java:2855) at 
java.base/java.util.Optional.or(Optional.java:313) at 
io.trino.plugin.hive.HiveMetadata.getTableProperties(HiveMetadata.java:2851) at
io.trino.plugin.base.classloader.ClassLoaderSafeConnectorMetadata.getTableProperties(ClassLoaderSafeConnectorMetadata.java:854) at 
io.trino.metadata.MetadataManager.getTableProperties(MetadataManager.java:385)

Trino에서 hive catalog 사용 중 위와 같은 오류가 발생했다.

보통 파티션이 많은 테이블을 조회할 때 저런 오류를 발견했는데, Hive에서는 정상 조회되는 것으로 보아 Trino문제라고 생각됐다. (hive 서비스 떠있음 확인)

 

 

[수정 내용]

trino의 hive connector 쪽 아래의 properites값 수정했다.

default가 10초인데 120초로 올림

https://trino.io/docs/current/connector/hive.html#metastores

hive.metastore-timeout=120s​