Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCS offload operation error #7402

Closed
gaoran10 opened this issue Jun 30, 2020 · 0 comments · Fixed by #7400 or #7435
Closed

GCS offload operation error #7402

gaoran10 opened this issue Jun 30, 2020 · 0 comments · Fixed by #7400 or #7435
Labels
type/bug The PR fixed a bug or issue reported a bug

Comments

@gaoran10
Copy link
Contributor

gaoran10 commented Jun 30, 2020

Describe the bug
The GCS offload operation is not working well in Pulsar 2.5.2 and 2.6.0, and it's ok in Pulsar 2.5.1.

To Reproduce
Steps to reproduce the behavior:

  1. Offload data by GCS driver.
  2. See the error log.
SEVERE: Error parsing input: null
java.lang.NullPointerException
	at org.jclouds.json.internal.NullFilteringTypeAdapterFactories$MapTypeAdapter.read(NullFilteringTypeAdapterFactories.java:319)
	at org.jclouds.json.internal.NullFilteringTypeAdapterFactories$MapTypeAdapter.read(NullFilteringTypeAdapterFactories.java:287)
	at org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:275)
	at org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:187)
	at com.google.gson.Gson.fromJson(Gson.java:888)
	at com.google.gson.Gson.fromJson(Gson.java:853)
	at org.jclouds.json.internal.GsonWrapper.fromJson(GsonWrapper.java:55)
	at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:82)
	at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:76)
	at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:61)
	at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:41)
	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:86)
	at com.sun.proxy.$Proxy82.composeObjects(Unknown Source)
	at org.jclouds.googlecloudstorage.blobstore.GoogleCloudStorageBlobStore.completeMultipartUpload(GoogleCloudStorageBlobStore.java:405)
	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.$Proxy80.completeMultipartUpload(Unknown Source)
	at org.apache.bookkeeper.mledger.offload.jcloud.impl.BlobStoreManagedLedgerOffloader.lambda$offload$4(BlobStoreManagedLedgerOffloader.java:463)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
	at java.util.concurrent.FutureTask.run(FutureTask.java)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)




java.util.concurrent.ExecutionException: org.jclouds.http.HttpResponseException: Error parsing input: null
{statusCode=200, message=OK, headers={Alt-Svc=[h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-25=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"], Server=[UploadServer], ETag=[CJqtx5TtqeoCEAE=], X-GUploader-UploadID=[AAANsUmvovukkc5rtoafAhiNOnn2wTXoK6qub8xX1a_S2I8wN_3RfqhyswUdhEKTkMMo67j0HfxVf6e70Nzs-YPjrrQ], Vary=[X-Origin, Origin], Pragma=[no-cache], Date=[Tue, 30 Jun 2020 15:28:08 GMT]}, payload=[content=true, contentMetadata=[cacheControl=no-cache, no-store, max-age=0, must-revalidate, contentDisposition=null, contentEncoding=null, contentLanguage=null, contentLength=951, contentMD5=null, contentType=application/json; charset=UTF-8, expires=Mon Jan 01 08:00:00 CST 1990], written=false, isSensitive=false]}

	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
	at org.apache.bookkeeper.mledger.offload.jcloud.impl.BlobStoreManagedLedgerOffloaderTest.testHappyCase(BlobStoreManagedLedgerOffloaderTest.java:141)
	at org.apache.bookkeeper.mledger.offload.jcloud.impl.BlobStoreManagedLedgerOffloaderTest_$$_jvstb34_0._d16testHappyCase(BlobStoreManagedLedgerOffloaderTest_$$_jvstb34_0.java)
	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.powermock.modules.testng.internal.PowerMockTestNGMethodHandler.invoke(PowerMockTestNGMethodHandler.java:50)
	at org.apache.bookkeeper.mledger.offload.jcloud.impl.BlobStoreManagedLedgerOffloaderTest_$$_jvstb34_0.testHappyCase(BlobStoreManagedLedgerOffloaderTest_$$_jvstb34_0.java)
	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:124)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:583)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:719)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:989)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
	at org.testng.TestRunner.privateRun(TestRunner.java:648)
	at org.testng.TestRunner.run(TestRunner.java:505)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
	at org.testng.SuiteRunner.run(SuiteRunner.java:364)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
	at org.testng.TestNG.runSuites(TestNG.java:1049)
	at org.testng.TestNG.run(TestNG.java:1017)
	at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
	at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:110)
Caused by: org.jclouds.http.HttpResponseException: Error parsing input: null
{statusCode=200, message=OK, headers={Alt-Svc=[h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-25=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"], Server=[UploadServer], ETag=[CJqtx5TtqeoCEAE=], X-GUploader-UploadID=[AAANsUmvovukkc5rtoafAhiNOnn2wTXoK6qub8xX1a_S2I8wN_3RfqhyswUdhEKTkMMo67j0HfxVf6e70Nzs-YPjrrQ], Vary=[X-Origin, Origin], Pragma=[no-cache], Date=[Tue, 30 Jun 2020 15:28:08 GMT]}, payload=[content=true, contentMetadata=[cacheControl=no-cache, no-store, max-age=0, must-revalidate, contentDisposition=null, contentEncoding=null, contentLanguage=null, contentLength=951, contentMD5=null, contentType=application/json; charset=UTF-8, expires=Mon Jan 01 08:00:00 CST 1990], written=false, isSensitive=false]}
	at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:67)
	at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:41)
	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:86)
	at com.sun.proxy.$Proxy82.composeObjects(Unknown Source)
	at org.jclouds.googlecloudstorage.blobstore.GoogleCloudStorageBlobStore.completeMultipartUpload(GoogleCloudStorageBlobStore.java:405)
	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.$Proxy80.completeMultipartUpload(Unknown Source)
	at org.apache.bookkeeper.mledger.offload.jcloud.impl.BlobStoreManagedLedgerOffloader.lambda$offload$4(BlobStoreManagedLedgerOffloader.java:463)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
	at java.util.concurrent.FutureTask.run(FutureTask.java)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
	at org.jclouds.json.internal.NullFilteringTypeAdapterFactories$MapTypeAdapter.read(NullFilteringTypeAdapterFactories.java:319)
	at org.jclouds.json.internal.NullFilteringTypeAdapterFactories$MapTypeAdapter.read(NullFilteringTypeAdapterFactories.java:287)
	at org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:275)
	at org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:187)
	at com.google.gson.Gson.fromJson(Gson.java:888)
	at com.google.gson.Gson.fromJson(Gson.java:853)
	at org.jclouds.json.internal.GsonWrapper.fromJson(GsonWrapper.java:55)
	at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:82)
	at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:76)
	at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:61)
	... 28 more

Expected behavior
Offload operation was a success.

Desktop (please complete the following information):

  • OS: MacOS
@gaoran10 gaoran10 added the type/bug The PR fixed a bug or issue reported a bug label Jun 30, 2020
@jiazhai jiazhai reopened this Jul 3, 2020
jiazhai pushed a commit that referenced this issue Jul 5, 2020
Fixes #7402 

### Motivation

Currently, the GCS offload error is still existing. In jclouds `2.2.0` and `2.2.1`, it only shaded the package [`com.google.gson.internal`](https://github.com/apache/jclouds/blob/master/gson/gson-shaded/pom.xml#L70), and in the class  [`org.jclouds.json.internal.NullFilteringTypeAdapterFactories`](https://github.com/apache/jclouds/blob/master/core/src/main/java/org/jclouds/json/internal/NullFilteringTypeAdapterFactories.java#L319) the shaded class `org.jclouds.json.gson.internal.JsonReaderInternalAccess` will be initialized by `com.google.gson.stream.JsonReader` which is in jclouds, the Pulsar include the same class `com.google.gson.stream.JsonReader` and when Pulsar broker start it will be loaded before  jclouds's, so this will cause the `org.jclouds.json.gson.internal.JsonReaderInternalAccess` can't be initialized successfully, and occurs NPE. 




### Modifications

Shaded the jclouds to make the class `org.jclouds.json.gson.internal.JsonReaderInternalAccess` could be initialized normally.
deltasquare4 pushed a commit to pandio-com/pulsar that referenced this issue Jul 30, 2020
Fixes apache#7402

Currently, the GCS offload error is still existing. In jclouds `2.2.0` and `2.2.1`, it only shaded the package [`com.google.gson.internal`](https://github.com/apache/jclouds/blob/master/gson/gson-shaded/pom.xml#L70), and in the class  [`org.jclouds.json.internal.NullFilteringTypeAdapterFactories`](https://github.com/apache/jclouds/blob/master/core/src/main/java/org/jclouds/json/internal/NullFilteringTypeAdapterFactories.java#L319) the shaded class `org.jclouds.json.gson.internal.JsonReaderInternalAccess` will be initialized by `com.google.gson.stream.JsonReader` which is in jclouds, the Pulsar include the same class `com.google.gson.stream.JsonReader` and when Pulsar broker start it will be loaded before  jclouds's, so this will cause the `org.jclouds.json.gson.internal.JsonReaderInternalAccess` can't be initialized successfully, and occurs NPE.

Shaded the jclouds to make the class `org.jclouds.json.gson.internal.JsonReaderInternalAccess` could be initialized normally.
huangdx0726 pushed a commit to huangdx0726/pulsar that referenced this issue Aug 24, 2020
Fixes apache#7402 

### Motivation

Currently, the GCS offload error is still existing. In jclouds `2.2.0` and `2.2.1`, it only shaded the package [`com.google.gson.internal`](https://github.com/apache/jclouds/blob/master/gson/gson-shaded/pom.xml#L70), and in the class  [`org.jclouds.json.internal.NullFilteringTypeAdapterFactories`](https://github.com/apache/jclouds/blob/master/core/src/main/java/org/jclouds/json/internal/NullFilteringTypeAdapterFactories.java#L319) the shaded class `org.jclouds.json.gson.internal.JsonReaderInternalAccess` will be initialized by `com.google.gson.stream.JsonReader` which is in jclouds, the Pulsar include the same class `com.google.gson.stream.JsonReader` and when Pulsar broker start it will be loaded before  jclouds's, so this will cause the `org.jclouds.json.gson.internal.JsonReaderInternalAccess` can't be initialized successfully, and occurs NPE. 




### Modifications

Shaded the jclouds to make the class `org.jclouds.json.gson.internal.JsonReaderInternalAccess` could be initialized normally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
2 participants