Skip to content

GCP SparkR operator - #7864

Closed
roelhogervorst wants to merge 6 commits into
apache:masterfrom
roelhogervorst:feature/add_sparkroperator_gcp
Closed

roelhogervorst wants to merge 6 commits into
apache:masterfrom
roelhogervorst:feature/add_sparkroperator_gcp

Conversation

@roelhogervorst

Copy link
Copy Markdown
Contributor

This PR adds a spark_R operator which will allow you to schedule R, and sparkR jobs on a dataproc cluster. The functionality to run that kind of job is already in dataproc, but for some reason there is no operator in Airflow.


Issue link: WILL BE INSERTED BY boring-cyborg

Make sure to mark the boxes below before creating PR: [x]


In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.

@boring-cyborg boring-cyborg Bot added the provider:google Google (including GCP) related issues label Mar 25, 2020
@boring-cyborg

boring-cyborg Bot commented Mar 25, 2020

Copy link
Copy Markdown

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, pylint and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://apache-airflow-slack.herokuapp.com/

Comment thread airflow/contrib/operators/dataproc_operator.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need custom operator for R jobs? Can't we use the DataprocSubmitJobOperator?

@turbaszek turbaszek Mar 25, 2020 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DataprocJobBaseOperator as well as other XJobOperators will be deleted in future:

        # TODO: Remove one day
        warnings.warn(
            "The `{cls}` operator is deprecated, please use `DataprocSubmitJobOperator` instead. You can use"
            " `generate_job` method of `{cls}` to generate dictionary representing your job"
            " and use it with the new operator.".format(cls=type(self).__name__),
            DeprecationWarning,
            stacklevel=1
        )

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an example of how to use the generic DataprocJobBaseOperator for all the jobs yet, @turbaszek?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh that is way easier, I'll create a new PR

@turbaszek

Copy link
Copy Markdown
Member

Hi @roelhogervorst any progress? I am happy to help with running system tests for the new SparkR job :)

@roelhogervorst

Copy link
Copy Markdown
Contributor Author

I'm so sorry @turbaszek , I completely missed your message. Are you saying we can submit jobs without specifying the type of job?

@roelhogervorst
roelhogervorst force-pushed the feature/add_sparkroperator_gcp branch from 572129a to c6c3f7c Compare April 9, 2020 13:51
@roelhogervorst roelhogervorst mentioned this pull request Apr 10, 2020
5 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

provider:google Google (including GCP) related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants