Skip to content

Upgrade Presto version to 332 #7194

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

Merged
merged 4 commits into from
Jun 14, 2020
Merged

Upgrade Presto version to 332 #7194

merged 4 commits into from
Jun 14, 2020

Conversation

ebyhr
Copy link
Contributor

@ebyhr ebyhr commented Jun 7, 2020

Fixes #6605

Motivation

  • Resolve different package between prestosql and prestodb.

Modifications

  • Upgrade Presto version to 332. Although the latest version is 334, version >= 333 requires Java 11.

@merlimat merlimat requested a review from jerrypeng June 8, 2020 01:04
@sijie sijie requested review from codelipenghui and jiazhai June 8, 2020 01:20
@sijie sijie added this to the 2.7.0 milestone Jun 8, 2020
@sijie sijie added the area/sql Pulsar SQL related features label Jun 8, 2020
@ebyhr ebyhr changed the title Upgrade Presto version to 334 Upgrade Presto version to 332 Jun 8, 2020
@dionjansen
Copy link

dionjansen commented Jun 8, 2020

@ebyhr tested this out using prestosql:presto:329 as a base image. I'm getting the following error when I start the coordinator:

2020-06-08T08:16:40.693Z	INFO	main	io.prestosql.metadata.StaticCatalogStore	-- Loading catalog etc/catalog/pulsar.properties --
2020-06-08T08:16:41.084Z	ERROR	main	io.prestosql.server.PrestoServer	error during validation of PulsarConnectorConfig{brokerServiceUrl='http://pulsar-proxy.pulsar2.svc.cluster.local'}
javax.validation.ValidationException: error during validation of PulsarConnectorConfig{brokerServiceUrl='http://pulsar-proxy.pulsar2.svc.cluster.local'}
	at org.apache.bval.jsr.ClassValidator.unrecoverableValidationError(ClassValidator.java:594)
	at org.apache.bval.jsr.ClassValidator.validate(ClassValidator.java:144)
	at io.airlift.configuration.ConfigurationFactory.validate(ConfigurationFactory.java:414)
	at io.airlift.configuration.ConfigurationFactory.build(ConfigurationFactory.java:387)
	at io.airlift.configuration.ConfigurationFactory.build(ConfigurationFactory.java:317)
	at io.airlift.configuration.ConfigurationProvider.get(ConfigurationProvider.java:67)
	at io.airlift.configuration.ConfigurationFactory.validateRegisteredConfigurationProvider(ConfigurationFactory.java:230)
	at io.airlift.bootstrap.Bootstrap.initialize(Bootstrap.java:202)
	at org.apache.pulsar.sql.presto.PulsarConnectorFactory.create(PulsarConnectorFactory.java:68)
	at io.prestosql.connector.ConnectorManager.createConnector(ConnectorManager.java:341)
	at io.prestosql.connector.ConnectorManager.createCatalog(ConnectorManager.java:203)
	at io.prestosql.connector.ConnectorManager.createCatalog(ConnectorManager.java:195)
	at io.prestosql.connector.ConnectorManager.createCatalog(ConnectorManager.java:181)
	at io.prestosql.metadata.StaticCatalogStore.loadCatalog(StaticCatalogStore.java:88)
	at io.prestosql.metadata.StaticCatalogStore.loadCatalogs(StaticCatalogStore.java:68)
	at io.prestosql.server.PrestoServer.run(PrestoServer.java:129)
	at io.prestosql.$gen.Presto_329____20200608_081627_1.run(Unknown Source)
	at io.prestosql.server.PrestoServer.main(PrestoServer.java:72)
Caused by: java.lang.IllegalArgumentException: java.lang.reflect.InvocationTargetException
	at org.apache.bval.util.MethodAccess.get(MethodAccess.java:93)
	at org.apache.bval.BeanValidationContext.getPropertyValue(BeanValidationContext.java:170)
	at org.apache.bval.jsr.GroupValidationContextImpl.getValidatedValue(GroupValidationContextImpl.java:294)
	at org.apache.bval.jsr.ConstraintValidation.validateGroupContext(ConstraintValidation.java:229)
	at org.apache.bval.jsr.ConstraintValidation.validate(ConstraintValidation.java:144)
	at org.apache.bval.util.ValidationHelper.validateProperty(ValidationHelper.java:234)
	at org.apache.bval.jsr.ClassValidator.validateBean(ClassValidator.java:462)
	at org.apache.bval.jsr.ClassValidator.validateBeanNet(ClassValidator.java:409)
	at org.apache.bval.jsr.ClassValidator.validateBeanWithGroups(ClassValidator.java:154)
	at org.apache.bval.jsr.ClassValidator.validate(ClassValidator.java:142)
	... 16 more
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.apache.bval.util.MethodAccess.get(MethodAccess.java:89)
	... 25 more
Caused by: java.lang.LinkageError: ClassCastException: attempting to castjar:file:/usr/lib/presto/lib/javax.ws.rs-api-2.1.jar!/javax/ws/rs/client/ClientBuilder.class to jar:file:/usr/lib/presto/plugin/pulsar-presto-connector/javax.ws.rs-api-2.1.jar!/javax/ws/rs/client/ClientBuilder.class
	at javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:105)
	at org.apache.pulsar.client.admin.PulsarAdmin.<init>(PulsarAdmin.java:174)
	at org.apache.pulsar.client.admin.internal.PulsarAdminBuilderImpl.build(PulsarAdminBuilderImpl.java:45)
	at org.apache.pulsar.sql.presto.PulsarConnectorConfig.getPulsarAdmin(PulsarConnectorConfig.java:397)
	... 30 more
2020-06-08T08:16:41.092Z	INFO	Thread-82	io.airlift.bootstrap.LifeCycleManager	Life cycle stopping...
2020-06-08T08:16:41.093Z	INFO	Thread-81	io.airlift.bootstrap.LifeCycleManager	Life cycle stopping...
2020-06-08T08:16:41.099Z	INFO	Thread-81	io.airlift.bootstrap.LifeCycleManager	Life cycle stopping...
2020-06-08T08:16:41.099Z	INFO	Thread-81	io.airlift.bootstrap.LifeCycleManager	Life cycle stopped.
2020-06-08T08:16:41.105Z	INFO	Thread-82	io.airlift.bootstrap.LifeCycleManager	Life cycle stopped.

My catalog properties are configured as follows:

# name of the connector to be displayed in the catalog
connector.name=pulsar
# the url of Pulsar broker service
pulsar.broker-service-url=http://pulsar-proxy.pulsar2.svc.cluster.local
# URI of Zookeeper cluster
pulsar.zookeeper-uri=pulsar-zookeeper.pulsar2.svc.cluster.local:2181
# minimum number of entries to read at a single time
pulsar.max-entry-read-batch-size=100
# default number of splits to use per query
pulsar.target-num-splits=2

fyi I have a Presto cluster using prestodb that connects fine to my pulsar cluster

edit: updated link of docker version 334 --> 329 that corresponded the stacktrace.

@findepi
Copy link
Member

findepi commented Jun 8, 2020

tested this out using prestosql:presto:334 as a base image. I'm getting the following error when I start the coordinator:

@dionjansen the stacktrace matches Presto 329. Can you attach the stacktrace for Presto 324 as well?

@dionjansen
Copy link

@dionjansen the stacktrace matches Presto 329. Can you attach the stacktrace for Presto 324 as well?

@findepi a yes I posted the Stacktrace for 329 (I updated my original comment), did you mean Presto 324 or 334 (latest)?

This is the error I got for the latest version of Presto 334 (that is: prestosql/presto:334)

2020-06-08T08:55:52.396Z	INFO	main	org.apache.zookeeper.ClientCnxn	zookeeper.request.timeout value is 0. feature enabled=
2020-06-08T08:55:52.413Z	INFO	main-SendThread(pulsar-zookeeper.pulsar2.svc.cluster.local:2181)	org.apache.zookeeper.ClientCnxn	Opening socket connection to server pulsar-zookeeper.pulsar2.svc.cluster.local/192.168.127.51:2181. Will not attempt to authenticate using SASL (unknown error)
2020-06-08T08:55:52.414Z	INFO	main-SendThread(pulsar-zookeeper.pulsar2.svc.cluster.local:2181)	org.apache.zookeeper.ClientCnxn	Socket connection established, initiating session, client: /192.168.96.14:51884, server: pulsar-zookeeper.pulsar2.svc.cluster.local/192.168.127.51:2181
2020-06-08T08:55:52.422Z	INFO	main-SendThread(pulsar-zookeeper.pulsar2.svc.cluster.local:2181)	org.apache.zookeeper.ClientCnxn	Session establishment complete on server pulsar-zookeeper.pulsar2.svc.cluster.local/192.168.127.51:2181, sessionid = 0x200000249b2009e, negotiated timeout = 10000
2020-06-08T08:55:52.425Z	INFO	main-EventThread	org.apache.bookkeeper.zookeeper.ZooKeeperWatcherBase	ZooKeeper client is connected now.
2020-06-08T08:55:52.459Z	INFO	main	org.apache.bookkeeper.meta.MetadataDrivers	BookKeeper metadata driver manager initialized
2020-06-08T08:55:52.460Z	INFO	main	org.apache.bookkeeper.meta.MetadataDrivers	BookKeeper metadata driver manager initialized
2020-06-08T08:55:52.460Z	INFO	main	org.apache.bookkeeper.meta.MetadataDrivers	BookKeeper metadata driver manager initialized
2020-06-08T08:55:52.463Z	INFO	main	org.apache.bookkeeper.meta.zk.ZKMetadataDriverBase	Initialize zookeeper metadata driver with external zookeeper client : ledgersRootPath = /ledgers.
2020-06-08T08:55:52.513Z	ERROR	main	org.apache.bookkeeper.client.RackawareEnsemblePlacementPolicyImpl	Failed to initialize DNS Resolver org.apache.bookkeeper.net.ScriptBasedMapping, used default subnet resolver : java.lang.RuntimeException: No network topology script is found when using script based DNS resolver.
2020-06-08T08:55:52.519Z	INFO	main	org.apache.bookkeeper.client.RackawareEnsemblePlacementPolicyImpl	Initialize rackaware ensemble placement policy @ <Bookie:192.168.96.14:0> @ /default-rack : org.apache.bookkeeper.client.TopologyAwareEnsemblePlacementPolicy$DefaultResolver.
2020-06-08T08:55:52.519Z	INFO	main	org.apache.bookkeeper.client.RackawareEnsemblePlacementPolicyImpl	Not weighted
2020-06-08T08:55:52.522Z	INFO	main	org.apache.bookkeeper.client.BookKeeper	Weighted ledger placement is not enabled
2020-06-08T08:55:52.544Z	INFO	BookKeeperClientScheduler-OrderedScheduler-0-0	org.apache.bookkeeper.net.NetworkTopologyImpl	Adding a new node: /default-rack/pulsar-bookie-3.pulsar-bookie.pulsar2.svc.cluster.local:3181
2020-06-08T08:55:52.545Z	INFO	BookKeeperClientScheduler-OrderedScheduler-0-0	org.apache.bookkeeper.net.NetworkTopologyImpl	Adding a new node: /default-rack/pulsar-bookie-2.pulsar-bookie.pulsar2.svc.cluster.local:3181
2020-06-08T08:55:52.546Z	INFO	BookKeeperClientScheduler-OrderedScheduler-0-0	org.apache.bookkeeper.net.NetworkTopologyImpl	Adding a new node: /default-rack/pulsar-bookie-1.pulsar-bookie.pulsar2.svc.cluster.local:3181
2020-06-08T08:55:52.547Z	INFO	BookKeeperClientScheduler-OrderedScheduler-0-0	org.apache.bookkeeper.net.NetworkTopologyImpl	Adding a new node: /default-rack/pulsar-bookie-0.pulsar-bookie.pulsar2.svc.cluster.local:3181
2020-06-08T08:55:52.571Z	INFO	main	org.apache.bookkeeper.mledger.impl.EntryCacheManager	Initialized managed-ledger entry cache of 0.0 Mb
2020-06-08T08:55:52.622Z	INFO	main	org.apache.pulsar.sql.presto.PulsarConnectorCache	No ledger offloader configured, using NULL instance
2020-06-08T08:55:52.626Z	INFO	main	io.prestosql.metadata.StaticCatalogStore	-- Added catalog pulsar using connector pulsar --
2020-06-08T08:55:52.628Z	INFO	main	io.prestosql.security.AccessControlManager	Using system access control allow-all
2020-06-08T08:55:52.676Z	INFO	main	io.prestosql.server.Server	======== SERVER STARTED ========
2020-06-08T08:56:00.986Z	INFO	Thread-72	io.airlift.bootstrap.LifeCycleManager	JVM is shutting down, cleaning up

@findepi
Copy link
Member

findepi commented Jun 8, 2020

@dionjansen with 324, did the following

LifeCycleManager	JVM is shutting down, cleaning up

happen by itself, or did you initiate it?

there seems to be no exception logged and Presto thought the catalog was correct initiated (Added catalog pulsar using connector pulsar)

@dionjansen
Copy link

dionjansen commented Jun 8, 2020

@dionjansen with 324, did the following

LifeCycleManager	JVM is shutting down, cleaning up

happen by itself, or did you initiate it?

You are right I am using a deployment that uses a readinessProbe GET /v1/cluster which worked for Presto 329 but not the Pulsar 334. I'm guessing this changed but is unrelated to the connector as you said.

So I removed the probes for now and I got a bit further.

I managed to see the catalog for pulsar, trying to view the schemas I get the following error:

presto> show schemas from pulsar;
Query 20200608_161718_00006_brt9t failed: Cannot cast org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory to org.glassfish.jersey.internal.inject.InjectionManagerFactory

Logs in the coordinator:

2020-06-08T16:17:42.018Z	DEBUG	dispatcher-query-12	io.prestosql.security.AccessControl	Invocation of checkCanSetUser(principal=Optional.empty, userName='presto') succeeded in 24.98us
2020-06-08T16:17:42.018Z	DEBUG	dispatcher-query-12	io.prestosql.security.AccessControl	Invocation of checkCanExecuteQuery(identity=Identity{user='presto', groups=[], roles={}, extraCredentials=[]}) succeeded in 17.10us
2020-06-08T16:17:42.019Z	DEBUG	dispatcher-query-11	io.prestosql.execution.QueryStateMachine	Query 20200608_161741_00007_brt9t is QUEUED
2020-06-08T16:17:42.020Z	DEBUG	Query-20200608_161741_00007_brt9t-211	io.prestosql.security.AccessControl	Invocation of checkCanShowSchemas(context=io.prestosql.security.SecurityContext@50677ca5, catalogName='pulsar') succeeded in 163.13us
2020-06-08T16:17:42.020Z	DEBUG	dispatcher-query-10	io.prestosql.execution.QueryStateMachine	Query 20200608_161741_00007_brt9t is WAITING_FOR_RESOURCES
2020-06-08T16:17:42.021Z	DEBUG	Query-20200608_161741_00007_brt9t-211	io.prestosql.security.AccessControl	Invocation of getColumnMasks(context=io.prestosql.security.SecurityContext@50677ca5, tableName=pulsar.information_schema.schemata, columnName='catalog_name', type=varchar) succeeded in 329.72us
2020-06-08T16:17:42.021Z	DEBUG	Query-20200608_161741_00007_brt9t-211	io.prestosql.security.AccessControl	Invocation of getColumnMasks(context=io.prestosql.security.SecurityContext@50677ca5, tableName=pulsar.information_schema.schemata, columnName='schema_name', type=varchar) succeeded in 46.56us
2020-06-08T16:17:42.021Z	DEBUG	Query-20200608_161741_00007_brt9t-211	io.prestosql.security.AccessControl	Invocation of getRowFilters(context=io.prestosql.security.SecurityContext@50677ca5, tableName=pulsar.information_schema.schemata) succeeded in 18.91us
2020-06-08T16:17:42.022Z	DEBUG	Query-20200608_161741_00007_brt9t-211	io.prestosql.security.AccessControl	Invocation of checkCanSelectFromColumns(context=io.prestosql.security.SecurityContext@50677ca5, tableName=pulsar.information_schema.schemata, columnNames=[schema_name]) succeeded in 30.50us
2020-06-08T16:17:42.022Z	DEBUG	dispatcher-query-7	io.prestosql.execution.QueryStateMachine	Query 20200608_161741_00007_brt9t is DISPATCHING
2020-06-08T16:17:42.032Z	DEBUG	dispatcher-query-14	io.prestosql.execution.QueryStateMachine	Query 20200608_161741_00007_brt9t is PLANNING
2020-06-08T16:17:42.044Z	DEBUG	query-execution-6	io.prestosql.execution.StageStateMachine	Stage 20200608_161741_00007_brt9t.0 is PLANNED
2020-06-08T16:17:42.044Z	DEBUG	query-execution-9	io.prestosql.execution.StageStateMachine	Stage 20200608_161741_00007_brt9t.1 is PLANNED
2020-06-08T16:17:42.045Z	DEBUG	query-execution-9	io.prestosql.execution.StageStateMachine	Stage 20200608_161741_00007_brt9t.2 is PLANNED
2020-06-08T16:17:42.053Z	DEBUG	dispatcher-query-14	io.prestosql.execution.QueryStateMachine	Query 20200608_161741_00007_brt9t is STARTING
2020-06-08T16:17:42.055Z	DEBUG	query-execution-5	io.prestosql.execution.StageStateMachine	Stage 20200608_161741_00007_brt9t.1 is SCHEDULING
2020-06-08T16:17:42.056Z	DEBUG	task-notification-2	io.prestosql.execution.TaskStateMachine	Task 20200608_161741_00007_brt9t.2.0 is RUNNING
2020-06-08T16:17:42.060Z	DEBUG	query-execution-7	io.prestosql.execution.StageStateMachine	Stage 20200608_161741_00007_brt9t.1 is SCHEDULED
2020-06-08T16:17:42.060Z	DEBUG	dispatcher-query-11	io.prestosql.execution.QueryStateMachine	Query 20200608_161741_00007_brt9t is RUNNING
2020-06-08T16:17:42.061Z	DEBUG	query-execution-6	io.prestosql.execution.StageStateMachine	Stage 20200608_161741_00007_brt9t.2 is SCHEDULING
2020-06-08T16:17:42.069Z	DEBUG	query-execution-6	io.prestosql.execution.StageStateMachine	Stage 20200608_161741_00007_brt9t.0 is SCHEDULED
2020-06-08T16:17:42.070Z	DEBUG	query-execution-10	io.prestosql.execution.StageStateMachine	Stage 20200608_161741_00007_brt9t.0 is SCHEDULING
2020-06-08T16:17:42.071Z	DEBUG	query-execution-6	io.prestosql.execution.StageStateMachine	Stage 20200608_161741_00007_brt9t.2 is SCHEDULED
2020-06-08T16:17:42.073Z	DEBUG	query-execution-6	io.prestosql.execution.StageStateMachine	Stage 20200608_161741_00007_brt9t.1 is RUNNING
2020-06-08T16:17:42.073Z	DEBUG	Task-20200608_161741_00007_brt9t.2.0-221	io.prestosql.execution.executor.TaskExecutor	Task scheduled 20200608_161741_00007_brt9t.2.0
2020-06-08T16:17:42.077Z	DEBUG	query-execution-6	io.prestosql.execution.StageStateMachine	Stage 20200608_161741_00007_brt9t.2 is RUNNING
2020-06-08T16:17:42.078Z	DEBUG	query-execution-6	io.prestosql.execution.StageStateMachine	Stage 20200608_161741_00007_brt9t.0 is RUNNING
2020-06-08T16:17:42.080Z	DEBUG	20200608_161741_00007_brt9t.2.0-0-97	io.prestosql.connector.informationschema.InformationSchemaPageSourceProvider	Building information schema table (queryId=20200608_161741_00007_brt9t; tableHandle=InformationSchemaTableHandle{catalogName=pulsar, table=SCHEMATA, prefixes=[pulsar.*.*], limit=OptionalLong.empty})
2020-06-08T16:17:42.082Z	ERROR	SplitRunner-0-97	io.prestosql.execution.executor.TaskExecutor	Error processing Split 20200608_161741_00007_brt9t.2.0-0 io.prestosql.connector.informationschema.InformationSchemaSplit@6b3dc5a0 (start = 2.343828815321054E9, wall = 6 ms, cpu = 0 ms, wait = 1 ms, calls = 1)
java.lang.ClassCastException: Cannot cast org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory to org.glassfish.jersey.internal.inject.InjectionManagerFactory
	at java.base/java.lang.Class.cast(Class.java:3605)
	at org.glassfish.jersey.internal.ServiceFinder$LazyObjectIterator.hasNext(ServiceFinder.java:714)
	at org.glassfish.jersey.internal.inject.Injections.lookupService(Injections.java:112)
	at org.glassfish.jersey.internal.inject.Injections.lookupInjectionManagerFactory(Injections.java:97)
	at org.glassfish.jersey.internal.inject.Injections.createInjectionManager(Injections.java:68)
	at org.glassfish.jersey.client.ClientConfig$State.initRuntime(ClientConfig.java:432)
	at org.glassfish.jersey.internal.util.collection.Values$LazyValueImpl.get(Values.java:341)
	at org.glassfish.jersey.client.ClientConfig.getRuntime(ClientConfig.java:826)
	at org.glassfish.jersey.client.ClientRequest.getConfiguration(ClientRequest.java:285)
	at org.glassfish.jersey.client.JerseyInvocation.validateHttpMethodAndEntity(JerseyInvocation.java:143)
	at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:112)
	at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:108)
	at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:99)
	at org.glassfish.jersey.client.JerseyInvocation$AsyncInvoker.method(JerseyInvocation.java:706)
	at org.glassfish.jersey.client.JerseyInvocation$AsyncInvoker.get(JerseyInvocation.java:566)
	at org.apache.pulsar.client.admin.internal.BaseResource.asyncGetRequest(BaseResource.java:168)
	at org.apache.pulsar.client.admin.internal.TenantsImpl.getTenantsAsync(TenantsImpl.java:64)
	at org.apache.pulsar.client.admin.internal.TenantsImpl.getTenants(TenantsImpl.java:50)
	at org.apache.pulsar.sql.presto.PulsarMetadata.listSchemaNames(PulsarMetadata.java:117)
	at io.prestosql.metadata.MetadataManager.listSchemaNames(MetadataManager.java:295)
	at io.prestosql.metadata.MetadataListing.listSchemas(MetadataListing.java:80)
	at io.prestosql.metadata.MetadataListing.listSchemas(MetadataListing.java:75)
	at io.prestosql.connector.informationschema.InformationSchemaPageSource.addSchemataRecords(InformationSchemaPageSource.java:303)
	at io.prestosql.connector.informationschema.InformationSchemaPageSource.buildPages(InformationSchemaPageSource.java:217)
	at io.prestosql.connector.informationschema.InformationSchemaPageSource.getNextPage(InformationSchemaPageSource.java:175)
	at io.prestosql.operator.TableScanOperator.getOutput(TableScanOperator.java:301)
	at io.prestosql.operator.Driver.processInternal(Driver.java:379)
	at io.prestosql.operator.Driver.lambda$processFor$8(Driver.java:283)
	at io.prestosql.operator.Driver.tryWithLock(Driver.java:675)
	at io.prestosql.operator.Driver.processFor(Driver.java:276)
	at io.prestosql.execution.SqlTaskExecution$DriverSplitRunner.processFor(SqlTaskExecution.java:1075)
	at io.prestosql.execution.executor.PrioritizedSplitRunner.process(PrioritizedSplitRunner.java:163)
	at io.prestosql.execution.executor.TaskExecutor$TaskRunner.run(TaskExecutor.java:484)
	at io.prestosql.$gen.Presto_334____20200608_161239_2.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)


2020-06-08T16:17:42.091Z	DEBUG	task-notification-1	io.prestosql.execution.TaskStateMachine	Task 20200608_161741_00007_brt9t.2.0 is FAILED
2020-06-08T16:17:42.101Z	ERROR	remote-task-callback-32	io.prestosql.execution.StageStateMachine	Stage 20200608_161741_00007_brt9t.2 failed
java.lang.ClassCastException: Cannot cast org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory to org.glassfish.jersey.internal.inject.InjectionManagerFactory
	at java.base/java.lang.Class.cast(Class.java:3605)
	at org.glassfish.jersey.internal.ServiceFinder$LazyObjectIterator.hasNext(ServiceFinder.java:714)
	at org.glassfish.jersey.internal.inject.Injections.lookupService(Injections.java:112)
	at org.glassfish.jersey.internal.inject.Injections.lookupInjectionManagerFactory(Injections.java:97)
	at org.glassfish.jersey.internal.inject.Injections.createInjectionManager(Injections.java:68)
	at org.glassfish.jersey.client.ClientConfig$State.initRuntime(ClientConfig.java:432)
	at org.glassfish.jersey.internal.util.collection.Values$LazyValueImpl.get(Values.java:341)
	at org.glassfish.jersey.client.ClientConfig.getRuntime(ClientConfig.java:826)
	at org.glassfish.jersey.client.ClientRequest.getConfiguration(ClientRequest.java:285)
	at org.glassfish.jersey.client.JerseyInvocation.validateHttpMethodAndEntity(JerseyInvocation.java:143)
	at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:112)
	at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:108)
	at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:99)
	at org.glassfish.jersey.client.JerseyInvocation$AsyncInvoker.method(JerseyInvocation.java:706)
	at org.glassfish.jersey.client.JerseyInvocation$AsyncInvoker.get(JerseyInvocation.java:566)
	at org.apache.pulsar.client.admin.internal.BaseResource.asyncGetRequest(BaseResource.java:168)
	at org.apache.pulsar.client.admin.internal.TenantsImpl.getTenantsAsync(TenantsImpl.java:64)
	at org.apache.pulsar.client.admin.internal.TenantsImpl.getTenants(TenantsImpl.java:50)
	at org.apache.pulsar.sql.presto.PulsarMetadata.listSchemaNames(PulsarMetadata.java:117)
	at io.prestosql.metadata.MetadataManager.listSchemaNames(MetadataManager.java:295)
	at io.prestosql.metadata.MetadataListing.listSchemas(MetadataListing.java:80)
	at io.prestosql.metadata.MetadataListing.listSchemas(MetadataListing.java:75)
	at io.prestosql.connector.informationschema.InformationSchemaPageSource.addSchemataRecords(InformationSchemaPageSource.java:303)
	at io.prestosql.connector.informationschema.InformationSchemaPageSource.buildPages(InformationSchemaPageSource.java:217)
	at io.prestosql.connector.informationschema.InformationSchemaPageSource.getNextPage(InformationSchemaPageSource.java:175)
	at io.prestosql.operator.TableScanOperator.getOutput(TableScanOperator.java:301)
	at io.prestosql.operator.Driver.processInternal(Driver.java:379)
	at io.prestosql.operator.Driver.lambda$processFor$8(Driver.java:283)
	at io.prestosql.operator.Driver.tryWithLock(Driver.java:675)
	at io.prestosql.operator.Driver.processFor(Driver.java:276)
	at io.prestosql.execution.SqlTaskExecution$DriverSplitRunner.processFor(SqlTaskExecution.java:1075)
	at io.prestosql.execution.executor.PrioritizedSplitRunner.process(PrioritizedSplitRunner.java:163)
	at io.prestosql.execution.executor.TaskExecutor$TaskRunner.run(TaskExecutor.java:484)
	at io.prestosql.$gen.Presto_334____20200608_161239_2.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)


2020-06-08T16:17:42.102Z	DEBUG	query-execution-6	io.prestosql.execution.StageStateMachine	Stage 20200608_161741_00007_brt9t.2 is FAILED
2020-06-08T16:17:42.102Z	DEBUG	dispatcher-query-11	io.prestosql.execution.QueryStateMachine	Query 20200608_161741_00007_brt9t is FAILED
2020-06-08T16:17:42.102Z	DEBUG	query-execution-6	io.prestosql.execution.QueryStateMachine	Query 20200608_161741_00007_brt9t failed
java.lang.ClassCastException: Cannot cast org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory to org.glassfish.jersey.internal.inject.InjectionManagerFactory
	at java.base/java.lang.Class.cast(Class.java:3605)
	at org.glassfish.jersey.internal.ServiceFinder$LazyObjectIterator.hasNext(ServiceFinder.java:714)
	at org.glassfish.jersey.internal.inject.Injections.lookupService(Injections.java:112)
	at org.glassfish.jersey.internal.inject.Injections.lookupInjectionManagerFactory(Injections.java:97)
	at org.glassfish.jersey.internal.inject.Injections.createInjectionManager(Injections.java:68)
	at org.glassfish.jersey.client.ClientConfig$State.initRuntime(ClientConfig.java:432)
	at org.glassfish.jersey.internal.util.collection.Values$LazyValueImpl.get(Values.java:341)
	at org.glassfish.jersey.client.ClientConfig.getRuntime(ClientConfig.java:826)
	at org.glassfish.jersey.client.ClientRequest.getConfiguration(ClientRequest.java:285)
	at org.glassfish.jersey.client.JerseyInvocation.validateHttpMethodAndEntity(JerseyInvocation.java:143)
	at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:112)
	at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:108)
	at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:99)
	at org.glassfish.jersey.client.JerseyInvocation$AsyncInvoker.method(JerseyInvocation.java:706)
	at org.glassfish.jersey.client.JerseyInvocation$AsyncInvoker.get(JerseyInvocation.java:566)
	at org.apache.pulsar.client.admin.internal.BaseResource.asyncGetRequest(BaseResource.java:168)
	at org.apache.pulsar.client.admin.internal.TenantsImpl.getTenantsAsync(TenantsImpl.java:64)
	at org.apache.pulsar.client.admin.internal.TenantsImpl.getTenants(TenantsImpl.java:50)
	at org.apache.pulsar.sql.presto.PulsarMetadata.listSchemaNames(PulsarMetadata.java:117)
	at io.prestosql.metadata.MetadataManager.listSchemaNames(MetadataManager.java:295)
	at io.prestosql.metadata.MetadataListing.listSchemas(MetadataListing.java:80)
	at io.prestosql.metadata.MetadataListing.listSchemas(MetadataListing.java:75)
	at io.prestosql.connector.informationschema.InformationSchemaPageSource.addSchemataRecords(InformationSchemaPageSource.java:303)
	at io.prestosql.connector.informationschema.InformationSchemaPageSource.buildPages(InformationSchemaPageSource.java:217)
	at io.prestosql.connector.informationschema.InformationSchemaPageSource.getNextPage(InformationSchemaPageSource.java:175)
	at io.prestosql.operator.TableScanOperator.getOutput(TableScanOperator.java:301)
	at io.prestosql.operator.Driver.processInternal(Driver.java:379)
	at io.prestosql.operator.Driver.lambda$processFor$8(Driver.java:283)
	at io.prestosql.operator.Driver.tryWithLock(Driver.java:675)
	at io.prestosql.operator.Driver.processFor(Driver.java:276)
	at io.prestosql.execution.SqlTaskExecution$DriverSplitRunner.processFor(SqlTaskExecution.java:1075)
	at io.prestosql.execution.executor.PrioritizedSplitRunner.process(PrioritizedSplitRunner.java:163)
	at io.prestosql.execution.executor.TaskExecutor$TaskRunner.run(TaskExecutor.java:484)
	at io.prestosql.$gen.Presto_334____20200608_161239_2.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)


2020-06-08T16:17:42.103Z	DEBUG	query-execution-9	io.prestosql.execution.StageStateMachine	Stage 20200608_161741_00007_brt9t.0 is ABORTED
2020-06-08T16:17:42.104Z	DEBUG	query-execution-10	io.prestosql.execution.StageStateMachine	Stage 20200608_161741_00007_brt9t.1 is ABORTED
2020-06-08T16:17:42.106Z	DEBUG	Task-20200608_161741_00007_brt9t.2.0-187	io.prestosql.execution.executor.TaskExecutor	Task finished or failed 20200608_161741_00007_brt9t.2.0
2020-06-08T16:17:42.127Z	DEBUG	http-worker-193	io.prestosql.execution.SqlTask	Aborting task 20200608_161741_00007_brt9t.2.0 output 0
2020-06-08T16:17:42.132Z	DEBUG	http-worker-110	io.prestosql.execution.SqlTask	Aborting task 20200608_161741_00007_brt9t.2.0 output 1
2020-06-08T16:17:42.166Z	INFO	dispatcher-query-14	io.prestosql.event.QueryMonitor	TIMELINE: Query 20200608_161741_00007_brt9t :: Transaction:[fdf1f9b7-ea1b-41da-8d36-fd42ce03a312] :: elapsed 83ms :: planning 26ms :: waiting 2ms :: scheduling 35ms :: running 10ms :: finishing 12ms :: begin 2020-06-08T16:17:42.019Z :: end 2020-06-08T16:17:42.102Z

@findepi
Copy link
Member

findepi commented Jun 9, 2020

@dionjansen thanks for the update

It could be that Pulsar would benefit from ClassLoaderSafeConnectorMetadata wrapper around PulsarMetadata.

Copy link
Member

@sijie sijie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great change. Thank you for the contribution!

@jiazhai
Copy link
Member

jiazhai commented Jun 11, 2020

/pulsarbot run-failure-checks

Copy link
Contributor

@codelipenghui codelipenghui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ebyhr would you please take a look at the failed license check

@ebyhr
Copy link
Contributor Author

ebyhr commented Jun 11, 2020

@codelipenghui Thanks for your comment. Fixed license check failure.

@dionjansen
Copy link

@ebyhr not sure if this is still relevant, but if you'd like me to test this build let me know!

@srkukarni srkukarni merged commit 5d02c70 into apache:master Jun 14, 2020
@ebyhr ebyhr deleted the prestosql branch June 17, 2020 09:46
@enriched
Copy link

@dionjansen Were you able to resolve the issues with the ClassCastExceptions? I seem to be running into that same issue when trying to add the pulsar-connector to a presto deployment running v332 of prestosql

@dionjansen
Copy link

@enriched I kind of let this go and postponed using prestosql for now. I was using the 2.6.0 release (I'm not sure this PR was included in that though). This is the Dockerfile I was using to test this out:

ARG PRESTO_VERSION=336
FROM prestosql/presto:$PRESTO_VERSION
ARG PULSAR_MIRROR="https://archive.apache.org/dist/pulsar"
ARG PULSAR_VERSION="2.6.0"
ARG PULSAR_BIN="${PULSAR_MIRROR}/pulsar-${PULSAR_VERSION}/apache-pulsar-${PULSAR_VERSION}-bin.tar.gz"
ARG PULSAR_OFFLOADERS_BIN="${PULSAR_MIRROR}/pulsar-${PULSAR_VERSION}/apache-pulsar-offloaders-${PULSAR_VERSION}-bin.tar.gz"
ARG PRESTO_HOME="/usr/lib/presto"
USER root
RUN yum -y -q update \
    && yum -y -q install wget \
    # Install pulsar presto connector
    && wget --quiet $PULSAR_BIN \
    && tar xzf apache-pulsar-${PULSAR_VERSION}-bin.tar.gz \
    && rm -rf apache-pulsar-${PULSAR_VERSION}-bin.tar.gz \
    && mv apache-pulsar-${PULSAR_VERSION}/lib/presto/plugin/pulsar-presto-connector $PRESTO_HOME/plugin \
    && rm -rf apache-pulsar-${PULSAR_VERSION} \
    # Install offloaders
    && wget --quiet $PULSAR_OFFLOADERS_BIN \
    && tar xzf apache-pulsar-offloaders-${PULSAR_VERSION}-bin.tar.gz \
    && rm -rf apache-pulsar-offloaders-${PULSAR_VERSION}-bin.tar.gz \
    && mv apache-pulsar-offloaders-${PULSAR_VERSION}/offloaders $PRESTO_HOME/offloaders \
    && rm -rf apache-pulsar-offloaders-${PULSAR_VERSION} \
    # Cleanup
    && yum -q clean all
EXPOSE 8080
USER presto:presto
ENV LANG en_US.UTF-8
CMD ["/usr/lib/presto/bin/run-presto"]

huangdx0726 pushed a commit to huangdx0726/pulsar that referenced this pull request Aug 24, 2020
* Upgrade Presto version to 332

* Update LICENSE file in pulsar-sql module

* Wrap ClassLoaderSafeConnectorMetadata around PulsarMetadata

* Update LICENSE file in pulsar-sql module
jiazhai pushed a commit to jiazhai/pulsar that referenced this pull request Aug 26, 2020
* Upgrade Presto version to 332

* Update LICENSE file in pulsar-sql module

* Wrap ClassLoaderSafeConnectorMetadata around PulsarMetadata

* Update LICENSE file in pulsar-sql module
(cherry picked from commit 5d02c70)
@gaoran10
Copy link
Contributor

@dionjansen Hi, please take a look at this PR #7898, the problem you met was fixed.

wolfstudy added a commit that referenced this pull request Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sql Pulsar SQL related features release/2.6.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support prestosql not prestodb
10 participants