This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 5dfbbbbf5a Referencing correct hooks for Apache Pinot (#33601)
5dfbbbbf5a is described below

commit 5dfbbbbf5adf70a9814121de8706a7c36f241836
Author: Alex Begg <[email protected]>
AuthorDate: Wed Aug 23 11:39:49 2023 -0700

    Referencing correct hooks for Apache Pinot (#33601)
    
    * Referencing correct hooks for Apache Pinot
    
    The `provider.yaml` for `airflow.providers.apache.pinot` provider was 
referencing a non-existing hook class of `PinotHook`, causing a warning during 
`providers_manager`'s sanity check. This corrects it to list both hooks of this 
provider.
    
    * Adding missing attributes for `PinotDbApiHook` and `PinotAdminHook`
---
 airflow/providers/apache/pinot/hooks/pinot.py | 7 +++++++
 airflow/providers/apache/pinot/provider.yaml  | 4 +++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/airflow/providers/apache/pinot/hooks/pinot.py 
b/airflow/providers/apache/pinot/hooks/pinot.py
index 0246a5d3a0..0fe11a04e4 100644
--- a/airflow/providers/apache/pinot/hooks/pinot.py
+++ b/airflow/providers/apache/pinot/hooks/pinot.py
@@ -56,6 +56,11 @@ class PinotAdminHook(BaseHook):
                                     "Exception" is in the output message.
     """
 
+    conn_name_attr = "conn_id"
+    default_conn_name = "pinot_admin_default"
+    conn_type = "pinot_admin"
+    hook_name = "Pinot Admin"
+
     def __init__(
         self,
         conn_id: str = "pinot_admin_default",
@@ -258,6 +263,8 @@ class PinotDbApiHook(DbApiHook):
 
     conn_name_attr = "pinot_broker_conn_id"
     default_conn_name = "pinot_broker_default"
+    conn_type = "pinot"
+    hook_name = "Pinot Broker"
     supports_autocommit = False
 
     def get_conn(self) -> Any:
diff --git a/airflow/providers/apache/pinot/provider.yaml 
b/airflow/providers/apache/pinot/provider.yaml
index 51146a1e6a..3c10b9c05f 100644
--- a/airflow/providers/apache/pinot/provider.yaml
+++ b/airflow/providers/apache/pinot/provider.yaml
@@ -59,5 +59,7 @@ hooks:
       - airflow.providers.apache.pinot.hooks.pinot
 
 connection-types:
-  - hook-class-name: airflow.providers.apache.pinot.hooks.pinot.PinotHook
+  - hook-class-name: airflow.providers.apache.pinot.hooks.pinot.PinotDbApiHook
     connection-type: pinot
+  - hook-class-name: airflow.providers.apache.pinot.hooks.pinot.PinotAdminHook
+    connection-type: pinot_admin

Reply via email to