Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BEAM-248] Add display data to additional PTransforms #280

Closed
wants to merge 8 commits into from

Conversation

swegner
Copy link
Contributor

@swegner swegner commented May 3, 2016

Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

  • Make sure the PR title is formatted like:
    [BEAM-<Jira issue #>] Description of pull request
  • Make sure tests pass via mvn clean verify. (Even better, enable
    Travis-CI on your fork and ensure the whole test matrix passes).
  • Replace <Jira issue #> in the title with the actual Jira issue
    number, if there is one.
  • If this contribution is large, please file an Apache
    Individual Contributor License Agreement.

@swegner swegner force-pushed the displaydata-leaves branch 3 times, most recently from c25ddaa to cd77d1b Compare May 4, 2016 21:05
@swegner
Copy link
Contributor Author

swegner commented May 4, 2016

R: @bjchambers

@@ -601,6 +600,27 @@ public String toResourceName() {
return sb.toString();
}

private static final Pattern HAS_GLOB = Pattern.compile(".*(\\[|\\*|\\?).*");
public String getBrowseUrl() {
StringBuilder builder = new StringBuilder("https://console.cloud.google.com/storage/browser/");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It appears these URLs work for browsing to "buckets" (i.e. directories), but not "objects" (i.e. files). There's another URL schema, "https://storage.cloud.google.com/*" which works for exactly the opposite-- buckets but not objects. Without doing a query, we won't always be able to tell what's a bucket and what's an object.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've split off link URLs to a separate PR: #300

@swegner
Copy link
Contributor Author

swegner commented May 6, 2016

I've addressed all feedback so far. Please take another look. @bjchambers

*
* @param tempLocation Temp location for {@link DataflowPipelineOptions#setTempLocation(String)}
*/
static DisplayDataEvaluator create(File tempLocation) {
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is only used for testing, I'd propose taking a TemporaryFile instance directly. That will force the tests to be properly written to use @Rule TemporaryFile tempFile and then call DisplayDataEvaluator.create(tempFile). Other option which would be even more extreme is to make this a @Rule.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The temp value parameter is gone in the latest version. Some DataflowPipelineOptions require a GCS path, so we're using a stub GCS instead.

@swegner swegner force-pushed the displaydata-leaves branch 2 times, most recently from 1e08c6d to 664536a Compare May 9, 2016 18:46
@swegner
Copy link
Contributor Author

swegner commented May 9, 2016

I've addressed all feedback so far. Please take another look. @bjchambers

}

@Test
public void testStreamingSinkPrimitiveDisplayData() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think for Junit4 it is preferred not to prefix with "test". So just"

@Test
public void streamingSinkPrimitiveDisplayData

etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The convention is split in the BEAM codebase, but most test cases use the "test" prefix: 1916 prefixed vs 93 not according to this script.

I'm going to follow the BEAM convention. It makes sense to migrate if we're not following JUnit4 convention, but we should do it across the codebase. Feel free to file a bug assigned to me if you feel it's worth the effort.

@bjchambers
Copy link
Contributor

Some comments, then LGTM.

@swegner
Copy link
Contributor Author

swegner commented May 10, 2016

I've addressed all feedback so far. Please take another look. @bjchambers

@bjchambers
Copy link
Contributor

LGTM

@swegner
Copy link
Contributor Author

swegner commented May 16, 2016

Backport: GoogleCloudPlatform/DataflowJavaSDK#230

iemejia pushed a commit to iemejia/beam that referenced this pull request Jan 12, 2018
Abacn pushed a commit to Abacn/beam that referenced this pull request Jan 31, 2023
pl04351820 pushed a commit to pl04351820/beam that referenced this pull request Dec 20, 2023
…uire field data (apache#280)

* fix: limit data transferred as part of list_documents as we don't require field data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants