mik-laj commented on a change in pull request #6371: [AIRFLOW-5691] Rewrite 
Dataproc operators to use python library
URL: https://github.com/apache/airflow/pull/6371#discussion_r336746007
 
 

 ##########
 File path: airflow/gcp/hooks/dataproc.py
 ##########
 @@ -498,215 +836,59 @@ def submit(
         :type region: str
         :param job_error_states: Job states that should be considered error 
states.
         :type job_error_states: List[str]
-        :raises: Excepion
-        """
-        submitted = _DataProcJob(self.get_conn(), project_id, job, region,
-                                 job_error_states=job_error_states,
-                                 num_retries=self.num_retries)
-        if not submitted.wait_for_done():
-            submitted.raise_error()
-
-    def create_job_template(
-        self,
-        task_id: str,
-        cluster_name: str,
-        job_type: str,
-        properties: Dict[str, str],
-    ) -> _DataProcJobBuilder:
         """
-        Creates Google Cloud Dataproc job template.
-
-        :param task_id: id of the task
-        :type task_id: str
-        :param cluster_name: Dataproc cluster name.
-        :type cluster_name: str
-        :param job_type: Type of Dataproc job.
-        :type job_type: str
-        :param properties: Additional properties of the job.
-        :type properties: dict
-        :return: Dataproc Job
-        """
-        if not self.project_id:
-            raise AirflowException(
-                "The project ID could not be determined. You should specify 
the project id "
-                "in the connection configuration."
-            )
-        return _DataProcJobBuilder(
-            self.project_id,
-            task_id,
-            cluster_name,
-            job_type,
-            properties
+        # TODO: Remover one day
+        warnings.warn(
+            "This method is deprecated. Please use `submit_job`",
+            DeprecationWarning,
 
 Review comment:
   ```suggestion
               DeprecationWarning,
               stacklevel=2
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to