简体   繁体   中英

Google cloud storage parallel upload java

I have some big files that I want to upload to cloud storage. I want to use parallel upload to save time. I found this lib: gsutil but I can't find any java example or usage only for python.

gsutil is not distributed as a library, only as a command-line tool. I don't know of a Java library that supports parallel uploads, though that doesn't mean there isn't one. However, you could do parallel writes by using the Compose operation, using the JSON or XML API for Google Cloud Storage. Specifically, you would write a number of smaller objects in parallel and then (once all of those objects have been written) call the Compose request to compose them into one larger object. If you're using the JSON API the compose documentation is at https://cloud.google.com/storage/docs/json_api/v1/objects/compose If you're using the XML API the compose documentation is at https://cloud.google.com/storage/docs/reference-methods#putobject (see the compose query parameter).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM