Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.0.0-beta-1
-
None
-
None
-
Version: 3.0.0-beta-1
Location: `hbase/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionFactory.java` in method `createConnection`. Lines 397-410.
Description
The system lacks visibility into the specific connection implementation being used during the creation of a connection. This can lead to issues when troubleshooting connection-related problems, particularly when a custom connection implementation is specified. If the configuration is incorrect or the custom class is inaccessible, it is difficult to diagnose the issue without detailed logs. As a result, users may encounter unexpected behavior without a clear understanding of what went wrong, making it challenging to identify and resolve configuration or implementation errors.
Expected Behavior:
The system should log detailed information about the connection implementation being used or attempted during the creation of a connection. If a custom connection class is specified, the system should log the attempt and the outcome, including any errors encountered. If the default implementation is used, this should also be logged.
How-to-Fix:
To address this issue, we propose introducing logging in the createConnection method of the ConnectionFactory class. The logs will provide clear feedback about whether the default asynchronous connection implementation (ConnectionOverAsyncConnection) is used or if a custom implementation is specified. Additionally, if a custom connection implementation fails due to an inaccessible or misconfigured class, detailed error logs will be generated. This enhancement will significantly improve the ability to diagnose and resolve connection-related issues, ensuring that any configuration or implementation errors are promptly identified and addressed.