jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Archana Chinnaiah (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (JCLOUDS-1250) Swift getBlob fails
Date Mon, 17 Apr 2017 05:14:41 GMT

    [ https://issues.apache.org/jira/browse/JCLOUDS-1250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15970676#comment-15970676
] 

Archana Chinnaiah edited comment on JCLOUDS-1250 at 4/17/17 5:13 AM:
---------------------------------------------------------------------

Looks like this is not because of local setup issue.

We configured a new setup where still we are seeing this problem.

As per our observation, the problem here is, the container name is added to cache in list
method. If we do a PUT followed by list and then by a GET things are working fine.

PUT followed by GET doesnot work, since our container name is not added to the cache.

Our suggestion is to add container name into the cache if PUT operation is successful



was (Author: archupsg03):
Looks like this is not because of local setup issue.

We configured a new setup where still we are seeing this problem

> Swift getBlob fails
> -------------------
>
>                 Key: JCLOUDS-1250
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1250
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-blobstore
>    Affects Versions: 2.0.0
>         Environment: RHEL 7
> Java 1.7
>            Reporter: Archana Chinnaiah
>              Labels: openstack-swift
>
> Checking container exist before container creation for the very first time  followed
by getBlob fails saying
> {code}
> Exception in thread "main" java.lang.IllegalStateException: Optional.get() cannot be
called on an absent value
> 	at com.google.common.base.Absent.get(Absent.java:47)
> 	at org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.toBlobMetadata(RegionScopedSwiftBlobStore.java:603)
> {code}
> Getblob fails
> {code}
> 	at org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.getBlob(RegionScopedSwiftBlobStore.java:381)
> 	at org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.getBlob(RegionScopedSwiftBlobStore.java:371)
> 	at main.java.s3_19.App.main(App.java:98)
> {code}
> Code Snippet Used:
> {code:java}
> BlobStoreContext context = ContextBuilder.newBuilder("openstack-swift")
> 	    		  .endpoint("http://x.xx.xx.x:5000/v2.0")
> 	              .credentials("xx:xxx", "xxx")
> 	              .buildView(BlobStoreContext.class);
> 		PutOptions opt = new PutOptions();
> 		opt.multipart();
> 		 BlobStore blobStore = context.getBlobStore();
> 		boolean val = blobStore.containerExists(CONTAINER_NAME);
> 		 blobStore.createContainerInLocation(null, CONTAINER_NAME);
>                  Blob blob = blobStore.blobBuilder(OBJECT_NAME)
> 		            .payload(payload)
> 		            .build();
>                   blobStore.putBlob(CONTAINER_NAME, blob, opt);
>                    Blob b1 = blobStore.getBlob(CONTAINER_NAME, OBJECT_NAME);
> {code}
> For the second time, since the container is already there its successful.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message