Closed StewartThomson closed 2 years ago
I believe the way to fix this is to use the client as such:
from hive_metastore_client import HiveMetastoreClient
tables = [
"my_table",
"my_table",
]
for table in tables:
print(table)
with HiveMetastoreClient(
"my_url"
) as hive_client:
print(hive_client.get_partition_keys_objects("default", table))
@StewartThomson Thanks for the feedback!
Actually we've run the code for multiple calls and for diff methods as you suggested. But we did not find any issues. Attached is an example of a very simple run that returned results (in this case both cases have similar partitions, so the results are the same).
I'd double check the Hive configurations, maybe it is configured to only return one request per connection?
The way you solved the problem may work, however it is unfortunately spawning one connection per request, what can raise some issues down the road.
Describe the bug
When calling methods in a loop, only the first call succeeds. The next subsequent call seems to hang indefinitely. Event if you use the same table in succession. This happens with any method call, not just get_partition_keys_objects
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Each call should succeed in a timely manner
Environment