0

I would like to store the entire File content (File is placed in GCS Bucket) in a single String variable. I know this is possible using Cloud Storage library and couldn't find any related example as reference.

Please provide me any working code-reference of this use-case.

Balajee Venkatesh
  • 1,041
  • 2
  • 18
  • 39
  • See https://stackoverflow.com/questions/45920895/read-a-file-from-gcs-in-apache-beam/45946643#45946643 – jkff Aug 30 '17 at 18:10
  • Tried the piece of code you suggested but getting this exception : Exception in thread "main" java.lang.IllegalStateException: Unable to find registrar for gs at org.apache.beam.sdk.io.FileSystems.getFileSystemInternal(FileSystems.java:447) at org.apache.beam.sdk.io.FileSystems.matchNewResource(FileSystems.java:523) at com.bitwise.cloud.XMLReader.main(XMLReader.java:73) – Balajee Venkatesh Aug 31 '17 at 13:37
  • 1
    I edited my answer to that question, try again? – jkff Aug 31 '17 at 20:51
  • 1
    Possible duplicate of [Read a file from GCS in Apache Beam](https://stackoverflow.com/questions/45920895/read-a-file-from-gcs-in-apache-beam) – jkff Sep 01 '17 at 16:20
  • Tried and it worked perfectly !!! Thank you so much. – Balajee Venkatesh Sep 01 '17 at 17:07

0 Answers0