{"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":"python","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,"search_vec":"'0.1.1':40 '2018':54 'apach':12 'appear':44 'april':53 'around':25 'big':60 'big-data':59 'check':33 'code':28 'current':37 'data':61 'databas':58 'design':7 'facilit':30 'generat':26 'hive':13,55 'hmsclient':1,2 'interact':9 'last':50 'like':32 'metastor':14,56 'oper':31 'packag':6 'partit':35 'project':43 'protocol':18 'provid':20 'python':5,23 'releas':51 'thin':22 'thrift':17,27,57 'unmaintain':47 'version':38 'via':15 'wrapper':24","created_at":"2026-04-09T18:41:51.196739+00:00","updated_at":"2026-04-16T15:35:01.058800+00:00","problems":[{"fix":"Ensure Kerberos configuration (keytab, krb5.conf, service principal name) is correct on the client, that the `thrift_sasl` package is installed, and that the client's Thrift version is compatible with the Metastore server. Consider testing without SASL if possible to isolate the issue, or regenerating Thrift code with a compatible Thrift compiler version if a newer Metastore version is used.","cause":"This error indicates a problem during the SASL (Simple Authentication and Security Layer) handshake, often due to misconfiguration of Kerberos or other authentication mechanisms, or an incompatibility between the Thrift library version and the Hive Metastore server's configuration.","error":"thrift.transport.TTransport.TTransportException: b'Error in sasl_decode (-1) SASL(-1): generic failure: Unable to find a callback: 32775'"},{"fix":"Verify that the database and table names are spelled correctly and exist in the Hive Metastore. You can use a Hive client (like `beeline`) to confirm the existence of the object.","cause":"This error means that the specific database, table, or other Hive Metastore object you are trying to access (e.g., `db.table`) does not exist in the Hive Metastore.","error":"org.apache.hadoop.hive.metastore.api.NoSuchObjectException: db.table table not found"},{"fix":"Install the package using pip: `pip install hmsclient`. If using Python 3, consider installing `hmsclient-hive-3` (`pip install hmsclient-hive-3`) as the original `hmsclient` might have compatibility issues or be unmaintained for newer Python versions.","cause":"The `hmsclient` package is not installed or not accessible in your current Python environment.","error":"ModuleNotFoundError: No module named 'hmsclient'"},{"fix":"Ensure you are using the correct import statement as shown in the library's documentation: `from hmsclient import hmsclient`. The class is then accessed as `hmsclient.HMSClient()`. If the issue persists, reinstall the package and confirm compatibility with your Python version.","cause":"While the `hmsclient` module might be imported, the `HMSClient` class is not found directly within it, possibly due to incorrect import syntax, a corrupted installation, or a significant change in the library's internal structure or exposure of its main class.","error":"AttributeError: module 'hmsclient' has no attribute 'HMSClient'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.1.1","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/gglanzani/hmsclient","docs":null,"changelog":null,"pypi":"https://pypi.org/project/hmsclient/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-28","next_check":"2026-07-28","install_tag":null}}