Skip to content
This repository was archived by the owner on Nov 11, 2022. It is now read-only.

Conversation

peihe
Copy link
Contributor

@peihe peihe commented Aug 29, 2016

This fixed #405

@peihe peihe force-pushed the fix-405 branch 3 times, most recently from efb300f to 3631213 Compare August 30, 2016 00:38
@peihe
Copy link
Contributor Author

peihe commented Aug 30, 2016

R: @dhalperi

} catch (IOException e) {
LOG.error(String.format(error, errorArgs), e.getMessage());
String errorMessage = error + String.format(" Cause: %s", e.getMessage());
LOG.error(errorMessage);
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this not just LOG.error("{}", error, e);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done
I want to build the error message once and use in logging and exception.

@peihe
Copy link
Contributor Author

peihe commented Sep 1, 2016

PTAL

throw e;
String errorMessage = String.format(
"%s. Failing to execute job after %d attempts.", error, MAX_RETRIES + 1);
LOG.error(errorMessage);
Copy link
Contributor

@dhalperi dhalperi Sep 2, 2016

Choose a reason for hiding this comment

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

"{}", errorMessage, e ?

Copy link
Contributor Author

@peihe peihe Sep 2, 2016

Choose a reason for hiding this comment

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

done
and, I think it probably will fix the failed tests.

@dhalperi
Copy link
Contributor

dhalperi commented Sep 2, 2016

Results :
Failed tests: 
com.google.cloud.dataflow.sdk.util.BigQueryTableRowIteratorTest.testQueryFailed(com.google.cloud.dataflow.sdk.util.BigQueryTableRowIteratorTest)
  Run 1: BigQueryTableRowIteratorTest.testQueryFailed:241 
Expected: a string containing "bad query"
     but: was "Error when trying to dry run query NOT A QUERY.. Failing to execute job after 4 attempts."
  Run 2: BigQueryTableRowIteratorTest.tearDown:107 
No interactions wanted here:
-> at com.google.cloud.dataflow.sdk.util.BigQueryTableRowIteratorTest.tearDown(BigQueryTableRowIteratorTest.java:107)
But found this interaction on mock 'mockClient':
-> at com.google.cloud.dataflow.sdk.util.BigQueryTableRowIterator.executeQueryAndWaitForCompletion(BigQueryTableRowIterator.java:391)
Actually, above is the only interaction with this mock.

@dhalperi dhalperi merged commit f640569 into master Sep 4, 2016
@dhalperi dhalperi deleted the fix-405 branch September 4, 2016 20:59
dhalperi added a commit that referenced this pull request Sep 7, 2016
)

* BigQueryTableRowIterator: support queries that reference no tables

The new code in #411 did
not adequately handle the case in which a query does not reference any tables, which
could result in a NullPointerException.

* fixup! BigQueryTableRowIterator: support queries that refernece no tables
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BigQueryIO.Read.fromQuery breaks on EU datasets

3 participants