Если я использую jclouds с опцией multipart () для загрузки файла в b2, я получаю сообщение об ошибке, как показано ниже
Exception in thread "main" java.lang.IllegalArgumentException: large files must have at least 2 parts
at org.jclouds.b2.handlers.ParseB2ErrorFromJsonContent.refineException(ParseB2ErrorFromJsonContent.java:45)
at org.jclouds.b2.handlers.ParseB2ErrorFromJsonContent.handleError(ParseB2ErrorFromJsonContent.java:58)
at org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65)
at org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:138)
at org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:107)
at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:91)
at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:74)
at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:45)
at org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
at com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
at com.sun.proxy.$Proxy57.finishLargeFile(Unknown Source)
at org.jclouds.b2.blobstore.B2BlobStore.completeMultipartUpload(B2BlobStore.java:356)
at org.jclouds.blobstore.internal.BaseBlobStore.putMultipartBlob(BaseBlobStore.java:376)
at org.jclouds.blobstore.internal.BaseBlobStore.putMultipartBlob(BaseBlobStore.java:347)
at org.jclouds.b2.blobstore.B2BlobStore.putBlob(B2BlobStore.java:233)
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 com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37)
at com.sun.proxy.$Proxy41.putBlob(Unknown Source)
at b2.NewMain.runMain(NewMain.java:76)
at b2.NewMain.main(NewMain.java:48)
Caused by: org.jclouds.b2.B2ResponseException: request POST https://api.backblazeb2.com/b2api/v1/b2_finish_large_file HTTP/1.1 failed with code 400, error: B2Error{code=bad_request, message=large files must have at least 2 parts, status=400}
... 22 more
Код, который я использую, похож на следующий
PayloadBlobBuilder blobBuilder = blobStore.blobBuilder(remoteFileName)
.payload(payload)
.contentLength(payload.size());
Blob blob = blobBuilder.build();
String eTag = blobStore.putBlob(containerName, blob, multipart());
Тот же код для того же файла работает для aws-s3, google-cloud-storage, azureblob.Я использую jclouds 2.1.1 .Это известная проблема.