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

Update to Java 17 #9876

Closed
8 tasks done
martint opened this issue Nov 4, 2021 · 10 comments · Fixed by #13200
Closed
8 tasks done

Update to Java 17 #9876

martint opened this issue Nov 4, 2021 · 10 comments · Fixed by #13200
Labels
roadmap Top level issues for major efforts in the project

Comments

@martint
Copy link
Member

martint commented Nov 4, 2021

@martint martint added the roadmap Top level issues for major efforts in the project label Nov 4, 2021
@wendigo
Copy link
Contributor

wendigo commented Nov 19, 2021

There are couple of things that are still not working on JDK 17:

  • Apache Phoenix/Phoenix5 - DistributedQueryRunner is not starting properly due to some problems with starting testing HBase
  • Apache Phoenix5 products tests:
2021-11-19T14:35:13.8059947Z presto-master       | 2021-11-19T20:20:13.797+0545	WARN	main	org.apache.hadoop.hbase.util.UnsafeAvailChecker	java.nio.Bits#unaligned() check failed.Unsafe based read/write of primitive types won't be used
2021-11-19T14:35:13.8063517Z presto-master       | java.lang.reflect.InaccessibleObjectException: Unable to make static boolean java.nio.Bits.unaligned() accessible: module java.base does not "opens java.nio" to unnamed module @30942f54
2021-11-19T14:35:13.8066721Z presto-master       | 	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
2021-11-19T14:35:13.8070051Z presto-master       | 	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
2021-11-19T14:35:13.8075323Z presto-master       | 	at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
2021-11-19T14:35:13.8080007Z presto-master       | 	at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
2021-11-19T14:35:13.8083145Z presto-master       | 	at org.apache.hadoop.hbase.util.UnsafeAvailChecker.<clinit>(UnsafeAvailChecker.java:161)
2021-11-19T14:35:13.8086245Z presto-master       | 	at org.apache.hadoop.hbase.util.Bytes.<clinit>(Bytes.java:134)
2021-11-19T14:35:13.8089046Z presto-master       | 	at org.apache.hadoop.hbase.io.encoding.DataBlockEncoding.<init>(DataBlockEncoding.java:72)
2021-11-19T14:35:13.8092021Z presto-master       | 	at org.apache.hadoop.hbase.io.encoding.DataBlockEncoding.<clinit>(DataBlockEncoding.java:35)
2021-11-19T14:35:13.8094932Z presto-master       | 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2021-11-19T14:35:13.8097704Z presto-master       | 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
2021-11-19T14:35:13.8100755Z presto-master       | 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2021-11-19T14:35:13.8102658Z presto-master       | 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
2021-11-19T14:35:13.8104062Z presto-master       | 	at java.base/java.lang.Class.getEnumConstantsShared(Class.java:3837)
2021-11-19T14:35:13.8105776Z presto-master       | 	at java.base/java.lang.System$2.getEnumConstantsShared(System.java:2284)
2021-11-19T14:35:13.8107352Z presto-master       | 	at java.base/java.util.EnumSet.getUniverse(EnumSet.java:408)
2021-11-19T14:35:13.8108623Z presto-master       | 	at java.base/java.util.EnumSet.noneOf(EnumSet.java:111)
2021-11-19T14:35:13.8109784Z presto-master       | 	at java.base/java.util.EnumSet.allOf(EnumSet.java:132)
2021-11-19T14:35:13.8111658Z presto-master       | 	at io.trino.spi.session.PropertyMetadata.enumProperty(PropertyMetadata.java:265)
2021-11-19T14:35:13.8113699Z presto-master       | 	at io.trino.spi.session.PropertyMetadata.enumProperty(PropertyMetadata.java:260)
2021-11-19T14:35:13.8115708Z presto-master       | 	at io.trino.plugin.phoenix5.PhoenixTableProperties.<init>(PhoenixTableProperties.java:122)
2021-11-19T14:35:13.8118806Z presto-master       | 	at io.trino.plugin.phoenix5.PhoenixTableProperties$$FastClassByGuice$$23205674.GUICE$TRAMPOLINE(<generated>)
2021-11-19T14:35:13.8121206Z presto-master       | 	at io.trino.plugin.phoenix5.PhoenixTableProperties$$FastClassByGuice$$23205674.apply(<generated>)
2021-11-19T14:35:13.8124660Z presto-master       | 	at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:82)
2021-11-19T14:35:13.8147315Z presto-master       | 	at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
2021-11-19T14:35:13.8151152Z presto-master       | 	at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:33)
2021-11-19T14:35:13.8154351Z presto-master       | 	at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:98)
2021-11-19T14:35:13.8156861Z presto-master       | 	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:109)
2021-11-19T14:35:13.8159209Z presto-master       | 	at io.airlift.bootstrap.LifeCycleModule.provision(LifeCycleModule.java:54)
2021-11-19T14:35:13.8161596Z presto-master       | 	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:117)
2021-11-19T14:35:13.8165646Z presto-master       | 	at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:66)
2021-11-19T14:35:13.8169055Z presto-master       | 	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:93)
2021-11-19T14:35:13.8171285Z presto-master       | 	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:296)
2021-11-19T14:35:13.8174182Z presto-master       | 	at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:60)
2021-11-19T14:35:13.8177378Z presto-master       | 	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
2021-11-19T14:35:13.8180072Z presto-master       | 	at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169)
2021-11-19T14:35:13.8182376Z presto-master       | 	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
2021-11-19T14:35:13.8185770Z presto-master       | 	at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:213)
2021-11-19T14:35:13.8189243Z presto-master       | 	at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:186)
2021-11-19T14:35:13.8192089Z presto-master       | 	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:113)
2021-11-19T14:35:13.8194258Z presto-master       | 	at com.google.inject.Guice.createInjector(Guice.java:87)
2021-11-19T14:35:13.8195588Z presto-master       | 	at io.airlift.bootstrap.Bootstrap.initialize(Bootstrap.java:275)
2021-11-19T14:35:13.8198162Z presto-master       | 	at io.trino.plugin.phoenix5.PhoenixConnectorFactory.create(PhoenixConnectorFactory.java:71)
2021-11-19T14:35:13.8200447Z presto-master       | 	at io.trino.connector.ConnectorManager.createConnector(ConnectorManager.java:375)
2021-11-19T14:35:13.8202638Z presto-master       | 	at io.trino.connector.ConnectorManager.createCatalog(ConnectorManager.java:219)
2021-11-19T14:35:13.8204583Z presto-master       | 	at io.trino.connector.ConnectorManager.createCatalog(ConnectorManager.java:211)
2021-11-19T14:35:13.8206752Z presto-master       | 	at io.trino.connector.ConnectorManager.createCatalog(ConnectorManager.java:197)
2021-11-19T14:35:13.8209357Z presto-master       | 	at io.trino.metadata.StaticCatalogStore.loadCatalog(StaticCatalogStore.java:88)
2021-11-19T14:35:13.8211443Z presto-master       | 	at io.trino.metadata.StaticCatalogStore.loadCatalogs(StaticCatalogStore.java:68)
2021-11-19T14:35:13.8213405Z presto-master       | 	at io.trino.server.Server.doStart(Server.java:125)
2021-11-19T14:35:13.8214423Z presto-master       | 	at io.trino.server.Server.lambda$start$0(Server.java:78)
2021-11-19T14:35:13.8215549Z presto-master       | 	at io.trino.$gen.Trino_51d1323____20211119_143443_1.run(Unknown Source)
2021-11-19T14:35:13.8216446Z presto-master       | 	at io.trino.server.Server.start(Server.java:78)

@wendigo
Copy link
Contributor

wendigo commented Nov 19, 2021

Fix for Pinot test assertion: #10009

@wendigo
Copy link
Contributor

wendigo commented Nov 19, 2021

#10010

@robd003
Copy link

robd003 commented Jan 7, 2022

Also seeing crashing on the CLI side with Java 17 #10505

Looks like this can be fixed with #10177

@mosabua
Copy link
Member

mosabua commented Jan 15, 2022

We should check all JDBC drivers that they support Java 17. In the recent update for the SQL Server I submitted I found out that the Java 17 support on that driver is only a preview at the moment.

https://search.maven.org/artifact/com.microsoft.sqlserver/mssql-jdbc

I filed microsoft/mssql-jdbc#1732 to find out more .

Update from MS team .. they plan a release for late Jan/early Feb. I will stay in the loop and send a PR when the new version arrived.

@wendigo
Copy link
Contributor

wendigo commented Feb 23, 2022

#10004 resolves some outstanding problems with Phoenix tests on JDK17 but there is some bug that makes tests failing.

See repro (run with Phoenix4 query runner):

trino:system> use phoenix.tpch;
trino:tpch> select * from orders limit 1;
 orderkey | custkey | orderstatus | totalprice | orderdate  | orderpriority |      clerk      | shippriority | comment
----------+---------+-------------+------------+------------+---------------+-----------------+--------------+---------
    21218 |     152 | O           |   28083.35 | 1997-06-18 | 1-URGENT      | Clerk#000000910 |            0 | NULL
(1 row)

trino:tpch> select orderkey,custkey,orderstatus,totalprice,orderdate,orderpriority,clerk,comment from orders limit 1;
 orderkey | custkey | orderstatus | totalprice | orderdate  | orderpriority |      clerk      |                         comment
----------+---------+-------------+------------+------------+---------------+-----------------+----------------------------------------------------------
        2 |     781 | O           |   38426.09 | 1996-12-01 | 1-URGENT      | Clerk#000000880 |  foxes. pending accounts at the pending, silent asymptot

comment column is null.

@hashhar
Copy link
Member

hashhar commented Feb 23, 2022

Isn't this expected? LIMIT without an ORDER BY will be non-deterministic for most connectors, specially those which generate multiple splits.

(Also you have shippriority missing in the 2nd SELECT query).

@wendigo
Copy link
Contributor

wendigo commented Feb 23, 2022

comment column is never null ;-)

@wendigo
Copy link
Contributor

wendigo commented Feb 23, 2022

I've found it finally. This was due to reflective access to java.nio.Bits.unaligned that controls the logic of how to read data from buffers.

@wendigo
Copy link
Contributor

wendigo commented Jul 7, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
roadmap Top level issues for major efforts in the project
Development

Successfully merging a pull request may close this issue.

5 participants