Ask Your Question

Static Large Objects

asked 2013-11-13 10:08:35 -0500

Betezed gravatar image

updated 2013-11-13 17:09:17 -0500

torgomatic gravatar image

Hi !

I've some issues trying to use the static large objects feature (while dynamic large objects feature works perfectly)

( )

When I send my "multipart" file with its manifest, followed by the multipart-manifest=put query (json format), everything is successful.

Manifest file :

        "path": "/bar/musique.mp3",
        "etag": "b77211f7a0c76e3b7ad87d88f605e21d",
        "size_bytes": 3256896
        "path": "/foo/toto.txt",
        "etag": "4b6678c41d52dadfb385a4a078c79a14",
        "size_bytes": 20

Request :

curl -X PUT -i -H "X-Auth-Token: abcdef0123456789" -T ./manifest.json ""

Response :

HTTP/1.1 100 Continue

HTTP/1.1 201 Created
Last-Modified: Wed, 13 Nov 2013 16:00:15 GMT
Content-Length: 0
Etag: 0123456789abcdeg
Content-Type: text/html; charset=UTF-8
X-Trans-Id: 1s5d4f6s4fdf1s56fd47d56f514s
Date: Wed, 13 Nov 2013 16:00:15 GMT

The thing is when I try to get the whole file by using the GET method on the manifest, I only get the manifest in its json format, instead of downloading the whole reunited file.

Using the HEAD request returns Content-Length with the size of the manifest itself instead of size of the large object I try to download.

Request :

curl -X HEAD -i -H "X-Auth-Token: abcdef0123456789" ""

Response :

HTTP/1.1 200 OK
Content-Length: 259
Accept-Ranges: bytes
Last-Modified: Wed, 13 Nov 2013 16:00:15 GMT
Etag: 0123456789abcdeg
X-Timestamp: 123456789.36351
Content-Type: application/octet-stream
X-Trans-Id: 1s5d4f6s4fdf1s56fd47d56f514s
Date: Wed, 13 Nov 2013 16:01:02 GMT

If someone has any idea on how to deal with this problem, it would be really helpful ! Thanks you a lot.

(If anybody speeks french this topic deals with the same issue : )

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-11-13 17:08:24 -0500

torgomatic gravatar image

It is entirely possible that the Swift cluster in question does not have static large objects enabled. If that's the case, then your manifest PUT request will still succeed because it is a plain old object PUT request with a query parameter on the end.

Try to PUT an object with X-Static-Large-Object: true in the headers (any object will do; it doesn't have to be a manifest). If static large objects are enabled, the response will be a 400 with a message about a reserved header, so by contraposition, if the response is a 201, then you know that static large objects are not enabled.

edit flag offensive delete link more


Hi, Thanks for your quick answer. I've done what you suggested, and found out that static large objects are not enabled here because the server accepted this header without any questions I guess I'll only use the dynamic large objects feature then. Thank you again for your help **Torgomatic**

Betezed gravatar imageBetezed ( 2013-11-14 03:15:19 -0500 )edit

Adding the header in the put request makes the object made with manifest.json a static large object, which can also be verified in the cli with swift stat container static_large_object

dvigneshwer gravatar imagedvigneshwer ( 2017-02-15 08:24:10 -0500 )edit

But I am facing problem in downloading the contents with the get request.

curl -X GET -H "X-Auth-Token: abcdefgh1234" "http://IP:PORT/v1/ACC/container_name/video_name.avi?multipart-manifest=get"

This only returns the manifest.json.

dvigneshwer gravatar imagedvigneshwer ( 2017-02-15 08:35:56 -0500 )edit

I am reading a video file and writing as a segment object (/cont/video_name/1) and at last created a static object with the video_name. For downloading I used the get command as mentioned above it does not work it was reading all the contents when tried without the param but it's not in upload order

dvigneshwer gravatar imagedvigneshwer ( 2017-02-15 08:50:15 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools


Asked: 2013-11-13 10:08:35 -0500

Seen: 710 times

Last updated: Nov 13 '13