Ahmet Altay created BEAM-539:
--------------------------------
Summary: 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
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.4#6332)