xchwan commented on code in PR #56276:
URL: https://github.com/apache/airflow/pull/56276#discussion_r2429746214


##########
providers/amazon/src/airflow/providers/amazon/aws/hooks/kinesis.py:
##########
@@ -37,20 +39,110 @@ class FirehoseHook(AwsBaseHook):
 
     .. seealso::
         - :class:`airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook`
+    .. deprecated::
+        This hook was moved. Import from
+       :class:`airflow.providers.amazon.aws.hooks.firehose.FirehoseHook`
+       instead of kinesis.py
     """
 
-    def __init__(self, delivery_stream: str, *args, **kwargs) -> None:
-        self.delivery_stream = delivery_stream
-        kwargs["client_type"] = "firehose"
+    def __init__(self, *args, **kwargs) -> None:
+        warnings.warn(
+            "Importing FirehoseHook from kinesis.py is deprecated "
+            "and will be removed in a future release. "
+            "Please import it from firehose.py instead.",
+            AirflowProviderDeprecationWarning,
+            stacklevel=2,
+        )
         super().__init__(*args, **kwargs)
 
-    def put_records(self, records: Iterable):
+
+class KinesisHook(AwsBaseHook):
+    """
+    Interact with Amazon Kinesis.
+
+    Provide thin wrapper around 
:external+boto3:py:class:`boto3.client("kinesis") <Kinesis.Client>`.
+
+    Additional arguments (such as ``aws_conn_id``) may be specified and
+    are passed down to the underlying AwsBaseHook.
+
+    .. seealso::
+        - :class:`airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook`
+    """
+
+    def __init__(self, *args, **kwargs) -> None:
+        kwargs["client_type"] = "kinesis"
+        super().__init__(*args, **kwargs)
+
+    def create_stream(self, stream_name: str, shard_count: int) -> dict:

Review Comment:
   Yes, these methods in kinesis just warp the boto3 API. Should I remove them?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to