🐥
TRINO -> Hive metastore 사용 시 HIVE_METASTORE_ERROR 오류 조치 본문
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
'데이터' 카테고리의 다른 글
[Airflow] Telegram 알림 operator 만들기 (requests 사용) (0) | 2024.03.29 |
---|---|
[Kafka] kafka produce 하기 (with C) (0) | 2023.08.31 |
Python을 통해 trino 접속 (0) | 2023.06.16 |
parquet 파일 구조 (0) | 2022.11.09 |
Least Square / Ridge Regression, RMSE (0) | 2018.10.07 |