You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Chamikara Jayalath (JIRA)" <ji...@apache.org> on 2017/05/01 22:59:04 UTC
[jira] [Commented] (BEAM-539) Error when writing to the root of a
GCS location
[ https://issues.apache.org/jira/browse/BEAM-539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15991709#comment-15991709 ]
Chamikara Jayalath commented on BEAM-539:
-----------------------------------------
Turns out, we already delete all temp files [1]. I was observing undeleted temp files due to GCS eventual consistency.
https://github.com/apache/beam/pull/2770 fixes other issues mentioned above.
[1] https://github.com/apache/beam/blob/master/sdks/python/apache_beam/io/fileio.py#L242
> Error when writing to the root of a GCS location
> ------------------------------------------------
>
> Key: BEAM-539
> URL: https://issues.apache.org/jira/browse/BEAM-539
> Project: Beam
> Issue Type: Bug
> Components: sdk-py
> Reporter: Ahmet Altay
> Assignee: Chamikara Jayalath
> Priority: Minor
> Labels: newbie, starter
> Fix For: First stable release
>
>
> User issue: http://stackoverflow.com/questions/38811152/google-dataflow-python-pipeline-write-failure
> Reproduction: use a TextFileSink and set output locations as gs://mybucket and it fails. Change it to gs://mybucket/ and it works.
> The final output path is generated here:
> https://github.com/apache/incubator-beam/blob/python-sdk/sdks/python/apache_beam/io/fileio.py#L495
> And this seemingly works in the Java SDK.
> Stack:
> File "/usr/local/lib/python2.7/dist-packages/apache_beam/io/iobase.py", line 1058, in finish_bundle
> yield window.TimestampedValue(self.writer.close(), window.MAX_TIMESTAMP)
> File "/usr/local/lib/python2.7/dist-packages/apache_beam/io/fileio.py", line 601, in close
> self.sink.close(self.temp_handle)
> File "/usr/local/lib/python2.7/dist-packages/apache_beam/io/fileio.py", line 687, in close
> file_handle.close()
> File "/usr/local/lib/python2.7/dist-packages/apache_beam/io/gcsio.py", line 617, in close
> self._flush_write_buffer()
> File "/usr/local/lib/python2.7/dist-packages/apache_beam/io/gcsio.py", line 647, in _flush_write_buffer
> raise self.upload_thread.last_error # pylint: disable=raising-bad-type
> HttpError: HttpError accessing <https://www.googleapis.com/resumable/upload/storage/v1/b/mybucket-temp-2016-08-08_21-29-39/o?uploadType=resumable&alt=json&name=f1cd7fe2-cf96-4d1d-bb5b-a6252cbcd342>: response: <{'status': '404', 'alternate-protocol': '443:quic', 'content-length': '165', 'vary': 'Origin, X-Origin', 'server': 'UploadServer', 'x-guploader-uploadid': 'AEnB2Uq6ZGb_CsrMVxozv6aL48k4OMMiRgYVeVGmJrM-sMQWRGeGMkesOQg5F0W7HZuaqTBog_d4ml-DlIars_ZvJTejdfcbAUr4gswZWVieq82ufc3WR2g', 'date': 'Mon, 08 Aug 2016 21:29:46 GMT', 'alt-svc': 'quic=":443"; ma=2592000; v="36,35,34,33,32,31,30"', 'content-type': 'application/json; charset=UTF-8'}>, content <{
> "error": {
> "errors": [
> {
> "domain": "global",
> "reason": "notFound",
> "message": "Not Found"
> }
> ],
> "code": 404,
> "message": "Not Found"
> }
> }
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)