Skip to content

Conversation

@mwalenia
Copy link
Member

@mwalenia mwalenia commented Apr 20, 2020

After the remark in #11261 I modified the code to be in line with the PTransform creation guide.

Thanks, @jkff for your keen eye!


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

Post-Commit Tests Status (on master branch)

Lang SDK Apex Dataflow Flink Gearpump Samza Spark
Go Build Status --- --- Build Status --- --- Build Status
Java Build Status Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status Build Status
Build Status
Build Status
Python Build Status
Build Status
Build Status
Build Status
--- Build Status
Build Status
Build Status
Build Status
Build Status
--- --- Build Status
XLang --- --- --- Build Status --- --- Build Status

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website
Non-portable Build Status Build Status
Build Status
Build Status Build Status
Portable --- Build Status --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

@mwalenia
Copy link
Member Author

R: @jkff
CC: @lukecwik

@mwalenia
Copy link
Member Author

Run Java PreCommit

1 similar comment
@mwalenia
Copy link
Member Author

Run Java PreCommit

Copy link
Contributor

@jkff jkff left a comment

Choose a reason for hiding this comment

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

Thanks! On to @chamikaramj .


/**
* Base class for Video Intelligence transform.
* Base class for VideoIntelligence PTransform.
Copy link
Contributor

Choose a reason for hiding this comment

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

  • PTransforms should almost never need inheritance; based on the usage of this class, it's not needed here either - the current base class serves only the purpose of storing configuration variables, but contains no functionality - these variables can just be packaged into a configuration object, and current subclasses of AnnotateVideo can derive from PTransform directly and each store this configuration object.
  • Even if you decide to keep using inheritance, please at least make this class non-public.

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right that it wasn't necessary. I got rid of the inheritance.

this.featureList = featureList;
}

@StartBundle
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be in @Setup instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

Moved, thanks for the tip

Copy link
Contributor

@jkff jkff left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

@ibzib
Copy link

ibzib commented Apr 22, 2020

@mwalenia Please resolve merge conflicts.

@mwalenia
Copy link
Member Author

Run Java PreCommit

@mwalenia mwalenia force-pushed the BEAM-9147-use-ptransforms branch from 4fe0d53 to d8baca4 Compare April 27, 2020 08:11
@mwalenia
Copy link
Member Author

Run Java PreCommit

2 similar comments
@mwalenia
Copy link
Member Author

Run Java PreCommit

@mwalenia
Copy link
Member Author

Run Java PreCommit

@mwalenia
Copy link
Member Author

@ibzib @jkff Can we merge this?

@jkff
Copy link
Contributor

jkff commented Apr 28, 2020

Yes, feel free to merge.

@mwalenia mwalenia merged commit 068d961 into master Apr 29, 2020
@mwalenia mwalenia deleted the BEAM-9147-use-ptransforms branch June 21, 2020 15:08
yirutang pushed a commit to yirutang/beam that referenced this pull request Jul 23, 2020
…pache#11464)

[BEAM-9147] Make VideoIntelligence use PTransform on user-facing API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants