You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/01/10 18:58:58 UTC

[jira] [Commented] (BEAM-1258) BigQuery CREATE_IF_NEEDED not working

    [ https://issues.apache.org/jira/browse/BEAM-1258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15815856#comment-15815856 ] 

ASF GitHub Bot commented on BEAM-1258:
--------------------------------------

GitHub user peihe opened a pull request:

    https://github.com/apache/beam/pull/1759

    [BEAM-1258] DONT_RETRY_NOT_FOUND in BigQueryServicesImpl.isTableEmpty().

    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](https://www.apache.org/licenses/icla.txt).
    
    ---


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/peihe/incubator-beam bq-create-if-needed

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/beam/pull/1759.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1759
    
----

----


> BigQuery CREATE_IF_NEEDED not working
> -------------------------------------
>
>                 Key: BEAM-1258
>                 URL: https://issues.apache.org/jira/browse/BEAM-1258
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-gcp
>            Reporter: Pei He
>            Assignee: Pei He
>
> User reported BigQuery error in beam 2.0:
> """
> Updating my streaming pipeline to 2.0 (org.beam).  This is my code:
> .apply(BigQueryIO.Write.to(output)//
>                                                 .withSchema(schema)//
>                                                 .withCreateDisposition(BigQueryIO.Write.CreateDisposition.CREATE_IF_NEEDED));
> The error when pipeline is being deployed is below.  After several such errors, the pipeline is deployed, but no table is ever created, so I don't get any output.
> Jan 09, 2017 3:44:13 PM org.apache.beam.sdk.io.gcp.bigquery.BigQueryServicesImpl executeWithRetries
> WARNING: Ignore the error and retry the request.
> com.google.api.client.googleapis.json.GoogleJsonResponseException: 404 Not Found
> {
>   "code" : 404,
>   "errors" : [ {
>     "domain" : "global",
>     "message" : "Not found: Table cloud-training-demos:demos.streamdemo",
>     "reason" : "notFound"
>   } ],
>   "message" : "Not found: Table cloud-training-demos:demos.streamdemo"
> }
>         at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:146)
>         at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113)
>         at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40)
>         at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:321)
>         at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1065)
>         at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419)
>         at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
>         at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)
>         at org.apache.beam.sdk.io.gcp.bigquery.BigQueryServicesImpl.executeWithRetries(BigQueryServicesImpl.java:860)
>         at org.apache.beam.sdk.io.gcp.bigquery.BigQueryServicesImpl$DatasetServiceImpl.isTableEmpty(BigQueryServicesImpl.java:512)
>         at org.apache.beam.sdk.io.gcp.bigquery.BigQueryIO$Write$Bound.verifyTableEmpty(BigQueryIO.java:1836)
>         at org.apache.beam.sdk.io.gcp.bigquery.BigQueryIO$Write$Bound.validate(BigQueryIO.java:1886)
>         at org.apache.beam.sdk.io.gcp.bigquery.BigQueryIO$Write$Bound.validate(BigQueryIO.java:1623)
>         at org.apache.beam.sdk.Pipeline.applyInternal(Pipeline.java:384)
>         at org.apache.beam.sdk.Pipeline.applyTransform(Pipeline.java:299)
>         at org.apache.beam.sdk.values.PCollection.apply(PCollection.java:154)
>         at com.google.cloud.training.dataanalyst.javahelp.StreamDemoConsumer.main(StreamDemoConsumer.java:102)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:497)
>         at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
>         at java.lang.Thread.run(Thread.java:745)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)