[jira] [Created] (JCLOUDS-1322) Zero length putBlob is making two network calls

2017-07-19 Thread Chaithanya Ganta (JIRA)
Chaithanya Ganta created JCLOUDS-1322:
-

 Summary: Zero length putBlob is making two network calls 
 Key: JCLOUDS-1322
 URL: https://issues.apache.org/jira/browse/JCLOUDS-1322
 Project: jclouds
  Issue Type: Bug
  Components: jclouds-core
 Environment: Tested using Azure
Reporter: Chaithanya Ganta
 Attachments: Charles1.png

Zero length putBlob is making two (duplicate) network calls instead of one.
This issue can be easily replicated by invoking putBlob operation with the 
zero-length blob.

ByteSource payload = ByteSource.empty();
Blob blob = blobStore.blobBuilder(blobName)
.payload(payload)
.contentLength(payload.size())
.build();
blobStore.putBlob(containerName, blob);

Attached the charles log screenshot which depicts the issue



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (JCLOUDS-1327) putBlob with zero length Inputstream is failing on google-cloud-storage

2017-08-05 Thread Chaithanya Ganta (JIRA)
Chaithanya Ganta created JCLOUDS-1327:
-

 Summary: putBlob with zero length Inputstream is failing on 
google-cloud-storage
 Key: JCLOUDS-1327
 URL: https://issues.apache.org/jira/browse/JCLOUDS-1327
 Project: jclouds
  Issue Type: Bug
  Components: jclouds-blobstore
Affects Versions: 2.0.2
Reporter: Chaithanya Ganta


putBlob with zero length Inputstream is failing on google-cloud-storage with

org.jclouds.http.HttpResponseException: command: POST 
https://www.googleapis.com/storage/v1/b/gaul-blobstore3/o/multipart-upload/compose
 HTTP/1.1 failed with response: HTTP/1.1 400 Bad Request; content: [{
 "error": {
  "errors": [
   {
"domain": "global",
"reason": "required",
"message": "You must provide at least one source component."
   }
  ],
  "code": 400,
  "message": "You must provide at least one source component."
 }
}
]





--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (JCLOUDS-1327) putBlob with zero length Inputstream is failing on google-cloud-storage

2017-08-06 Thread Chaithanya Ganta (JIRA)

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

Chaithanya Ganta commented on JCLOUDS-1327:
---

[~argaul] This issue has nothing to do with the proposed change in 
https://github.com/jclouds/jclouds/pull/1120. There is actually a bug in 
BaseBlobStore.putMultipartBlob which causes this issue.

> putBlob with zero length Inputstream is failing on google-cloud-storage
> ---
>
> Key: JCLOUDS-1327
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1327
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Reporter: Chaithanya Ganta
>  Labels: google-cloud-storage
>
> putBlob with zero length Inputstream is failing on google-cloud-storage with
> org.jclouds.http.HttpResponseException: command: POST 
> https://www.googleapis.com/storage/v1/b/gaul-blobstore3/o/multipart-upload/compose
>  HTTP/1.1 failed with response: HTTP/1.1 400 Bad Request; content: [{
>  "error": {
>   "errors": [
>{
> "domain": "global",
> "reason": "required",
> "message": "You must provide at least one source component."
>}
>   ],
>   "code": 400,
>   "message": "You must provide at least one source component."
>  }
> }
> ]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (JCLOUDS-1345) testMetadata test is failing if we use ApacheHCHttpCommandExecutorServiceModule

2017-09-21 Thread Chaithanya Ganta (JIRA)
Chaithanya Ganta created JCLOUDS-1345:
-

 Summary: testMetadata test is failing if we use 
ApacheHCHttpCommandExecutorServiceModule
 Key: JCLOUDS-1345
 URL: https://issues.apache.org/jira/browse/JCLOUDS-1345
 Project: jclouds
  Issue Type: Bug
  Components: jclouds-blobstore
Reporter: Chaithanya Ganta


testMetadata (in BaseBlobIntegrationTest) test is failing if we use 
ApacheHCHttpCommandExecutorServiceModule, passing with 
JavaUrlHttpCommandExecutorServiceModule.

Command used to run test:
mvn integration-test -pl :azureblob -Plive -Dtest.azureblob.identity="" 
-Dtest.azureblob.credential="" -Dtest=AzureBlobIntegrationLiveTest#testMetadata


java.lang.AssertionError: application/unknown
at 
org.jclouds.blobstore.integration.internal.BaseBlobIntegrationTest.validateMetadata(BaseBlobIntegrationTest.java:1388)
at 
org.jclouds.blobstore.integration.internal.BaseBlobIntegrationTest.testMetadata(BaseBlobIntegrationTest.java:872)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:696)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:882)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1189)
at 
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (JCLOUDS-1345) testMetadata test is failing if we use ApacheHCHttpCommandExecutorServiceModule

2017-09-21 Thread Chaithanya Ganta (JIRA)

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

Chaithanya Ganta commented on JCLOUDS-1345:
---

Jclouds creates response payloads only if response input stream is not null. 
For "HEAD" requests in case of JavaUrlHttpCommandExecutorService response input 
stream (connection.getInputStream()) is not null (although it doesn't have any 
content), whereas it is null for ApacheHCHttpCommandExecutorService 
(apacheResponse.getEntity()) which is causing this test failure.

> testMetadata test is failing if we use 
> ApacheHCHttpCommandExecutorServiceModule
> ---
>
> Key: JCLOUDS-1345
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1345
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Reporter: Chaithanya Ganta
>
> testMetadata (in BaseBlobIntegrationTest) test is failing if we use 
> ApacheHCHttpCommandExecutorServiceModule, passing with 
> JavaUrlHttpCommandExecutorServiceModule.
> Command used to run test:
> mvn integration-test -pl :azureblob -Plive -Dtest.azureblob.identity="" 
> -Dtest.azureblob.credential="" 
> -Dtest=AzureBlobIntegrationLiveTest#testMetadata
> java.lang.AssertionError: application/unknown
> at 
> org.jclouds.blobstore.integration.internal.BaseBlobIntegrationTest.validateMetadata(BaseBlobIntegrationTest.java:1388)
> at 
> org.jclouds.blobstore.integration.internal.BaseBlobIntegrationTest.testMetadata(BaseBlobIntegrationTest.java:872)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:696)
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:882)
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1189)
> at 
> org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124)
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Comment Edited] (JCLOUDS-1345) testMetadata test is failing if we use ApacheHCHttpCommandExecutorServiceModule

2017-09-21 Thread Chaithanya Ganta (JIRA)

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

Chaithanya Ganta edited comment on JCLOUDS-1345 at 9/21/17 11:46 AM:
-

Jclouds is creating response payloads only if response input stream is not 
null. For "HEAD" requests in case of JavaUrlHttpCommandExecutorService response 
input stream (connection.getInputStream()) is not null (although it doesn't 
have any content), whereas it is null for ApacheHCHttpCommandExecutorService 
(apacheResponse.getEntity()) which is causing the difference in the behaviour.


was (Author: chaitanya.n...@gmail.com):
Jclouds creates response payloads only if response input stream is not null. 
For "HEAD" requests in case of JavaUrlHttpCommandExecutorService response input 
stream (connection.getInputStream()) is not null (although it doesn't have any 
content), whereas it is null for ApacheHCHttpCommandExecutorService 
(apacheResponse.getEntity()) which is causing this test failure.

> testMetadata test is failing if we use 
> ApacheHCHttpCommandExecutorServiceModule
> ---
>
> Key: JCLOUDS-1345
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1345
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Reporter: Chaithanya Ganta
>
> testMetadata (in BaseBlobIntegrationTest) test is failing if we use 
> ApacheHCHttpCommandExecutorServiceModule, passing with 
> JavaUrlHttpCommandExecutorServiceModule.
> Command used to run test:
> mvn integration-test -pl :azureblob -Plive -Dtest.azureblob.identity="" 
> -Dtest.azureblob.credential="" 
> -Dtest=AzureBlobIntegrationLiveTest#testMetadata
> java.lang.AssertionError: application/unknown
> at 
> org.jclouds.blobstore.integration.internal.BaseBlobIntegrationTest.validateMetadata(BaseBlobIntegrationTest.java:1388)
> at 
> org.jclouds.blobstore.integration.internal.BaseBlobIntegrationTest.testMetadata(BaseBlobIntegrationTest.java:872)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:696)
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:882)
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1189)
> at 
> org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124)
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)