{"id":2061,"library":"hmsclient","title":"HMSClient","description":"HMSClient is a Python package designed to interact with the Apache Hive Metastore via the Thrift protocol. It provides a thin Python wrapper around generated Thrift code to facilitate operations like checking for partitions. The current version is 0.1.1, but the project appears to be unmaintained, with its last release in April 2018.","status":"abandoned","version":"0.1.1","language":"en","source_language":"en","source_url":"https://github.com/gglanzani/hmsclient","tags":["hive","metastore","thrift","database","big-data"],"install":[{"cmd":"pip install hmsclient","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"Provides the underlying Thrift protocol implementation for communication with the Hive Metastore.","package":"apache-thrift","optional":false}],"imports":[{"symbol":"hmsclient","correct":"from hmsclient import hmsclient"},{"symbol":"HMSClient","correct":"from hmsclient import hmsclient\nclient = hmsclient.HMSClient(...)"}],"quickstart":{"code":"import os\nfrom hmsclient import hmsclient\n\nhost = os.environ.get('HMS_HOST', 'localhost')\nport = int(os.environ.get('HMS_PORT', 9083))\n\n# Example: Connect and check for a named partition\ntry:\n    client = hmsclient.HMSClient(host=host, port=port)\n    with client as c:\n        # Replace 'your_db', 'your_table', and 'date=...' with actual values\n        partition_exists = c.check_for_named_partition('your_db', 'your_table', 'date=20180101')\n        print(f\"Partition exists: {partition_exists}\")\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")","lang":"python","description":"Initialize the HMSClient and perform a basic operation, such as checking for a named partition. The host and port for the Metastore can be provided directly or configured via `HMS_HOST` and `HMS_PORT` environment variables."},"warnings":[{"fix":"Consider using `hmsclient-hive-3` (if targeting Hive Metastore API v3.0) or an alternative, actively maintained Hive Metastore client library. If sticking with `hmsclient`, thorough compatibility testing with your Python and Hive versions is crucial.","message":"The `hmsclient` library has not been updated since April 2018, and its GitHub repository shows no recent activity for eight years. This makes it highly likely to be incompatible with newer Python versions (e.g., Python 3.8+) or recent Apache Hive Metastore versions without significant issues or manual patches.","severity":"breaking","affected_versions":"<=0.1.1"},{"fix":"Avoid using this client in production environments requiring secure Metastore connections. Explore alternative clients that explicitly support Kerberos or other secure authentication methods.","message":"This library is primarily designed for unsecured Thrift connections. Using it in environments requiring Kerberos or other secure authentication mechanisms for the Hive Metastore is not directly supported and may expose security vulnerabilities.","severity":"gotcha","affected_versions":"All"},{"fix":"Implement custom retry and reconnection logic in your application code when using `hmsclient` to handle transient Metastore connectivity issues gracefully.","message":"The client lacks built-in automatic reconnection logic. If the Hive Metastore becomes temporarily unstable or the connection drops, the client will not automatically attempt to re-establish the connection, leading to persistent failures in your application until manually restarted. This is a common challenge with HMS clients.","severity":"gotcha","affected_versions":"All"},{"fix":"If working with Hive Metastore 3.0 or later, consider migrating to `hmsclient-hive-3` or another client specifically designed for newer Hive versions. Test thoroughly against your target Metastore version.","message":"The existence of `hmsclient-hive-3` (a fork explicitly rebuilt for Hive Metastore API version 3.0) strongly suggests that the original `hmsclient` (version 0.1.1) may not be compatible with Hive Metastore versions 3.0 and newer.","severity":"deprecated","affected_versions":"<=0.1.1 when used with Hive Metastore >=3.0"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}