Skip to content

Add hdp3.1-hive, hdp3.1-hive-kerberized and centos7-oj8-openldap#57

Merged
tdcmeehan merged 1 commit into
prestodb:masterfrom
unidevel:hive4
Jul 15, 2025
Merged

Add hdp3.1-hive, hdp3.1-hive-kerberized and centos7-oj8-openldap#57
tdcmeehan merged 1 commit into
prestodb:masterfrom
unidevel:hive4

Conversation

@unidevel

@unidevel unidevel commented Mar 27, 2025

Copy link
Copy Markdown
Contributor

This PR added the following images:

cherry-picked a commit from trino to get hdp3.1-hive files

https://github.com/trinodb/docker-images/tree/master/archived/hdp3.1-hive

Mac with M chips

Please setup the environment before building the images

# bash/zsh
export DOCKER_DEFAULT_PLATFORM=linux/amd64

# fish
set -gx DOCKER_DEFAULT_PLATFORM linux/amd64

brew install docker-credential-helper
docker login

hive4.0-hive

(Note: HADOOP_VERSION=3.4.1 & HIVE_VERSION=4.0.1)

To build the image

make prestodb/centos7-oj8@local
make prestodb/hive4.0-hive

hdp3.1-hive

To build the image

make prestodb/centos7-oj8@local
make prestodb/hdp3.1-hive

hdp3.1-hive-kerberized

make prestodb/centos7-oj8@local
make prestodb/hdp3.1-hive-kerberized

centos7-oj8-openldap

make prestodb/centos7-oj8@local
make prestodb/centos7-oj8-openldap

@unidevel unidevel requested a review from wanglinsong March 28, 2025 21:33
@unidevel unidevel marked this pull request as ready for review March 31, 2025 09:53
@unidevel unidevel marked this pull request as draft April 2, 2025 10:13
@imjalpreet imjalpreet requested review from aaneja and imjalpreet April 2, 2025 14:23
@unidevel unidevel closed this Apr 2, 2025
@unidevel unidevel reopened this Apr 2, 2025
@linux-foundation-easycla

linux-foundation-easycla Bot commented Apr 3, 2025

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: unidevel / name: Li Zhou (7e4f3aa)

@unidevel unidevel changed the title Add hive4.0-hive Add hive4.0-hive and hdp3.1-hive Apr 3, 2025
Comment thread prestodb/hdp3.1-hive/build.log Outdated
Comment thread prestodb/hdp3.1-hive/Dockerfile Outdated
FROM prestodb/centos7-oj8:unlabelled

# Change default timezone
RUN ln -snf "/usr/share/zoneinfo/Asia/Kathmandu" /etc/localtime && echo "Asia/Kathmandu" > /etc/timezone

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This comes from its original file, I'll remove later

Comment thread prestodb/hdp3.1-hive/Dockerfile Outdated
Comment thread prestodb/hive4.0-hive/Dockerfile Outdated
Comment thread prestodb/hive4.0-hive/files/etc/hadoop-init.d/init-hdfs.sh Outdated
Comment thread prestodb/hive4.0-hive/files/etc/hadoop-init.d/set-aws-creds.sh Outdated
Comment thread prestodb/hive4.0-hive/files/root/entrypoint.sh Outdated
Comment thread prestodb/hive4.0-hive/files/root/setup.sh Outdated
Comment thread prestodb/hive4.0-hive/files/opt/hive/conf/hive-env.sh Outdated
@unidevel

unidevel commented Apr 3, 2025

Copy link
Copy Markdown
Contributor Author

@wanglinsong Most of the files are copied from old version, I'll make it work first, then refactor the files.

@unidevel unidevel changed the title Add hive4.0-hive and hdp3.1-hive Add hive4.0-hive, hdp3.1-hive and hdp3.1-hive-kerberized Apr 3, 2025
@unidevel unidevel force-pushed the hive4 branch 2 times, most recently from 85f85d5 to aaf2676 Compare April 4, 2025 14:15
@wanglinsong

Copy link
Copy Markdown
Member

You still need the CLA Authorization.

@unidevel

Copy link
Copy Markdown
Contributor Author

You still need the CLA Authorization.

Fixed by adding the co-author

@unidevel unidevel marked this pull request as ready for review April 23, 2025 20:26
@unidevel unidevel requested a review from wanglinsong April 23, 2025 20:26

@imjalpreet imjalpreet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@unidevel We have one more image centos6-oj8-openldap which is used in Presto, should we upgrade it as well to centos7?

@unidevel

Copy link
Copy Markdown
Contributor Author

@imjalpreet I'll investigate.

@unidevel

unidevel commented May 1, 2025

Copy link
Copy Markdown
Contributor Author

@unidevel unidevel changed the title Add hive4.0-hive, hdp3.1-hive and hdp3.1-hive-kerberized Add hive4.0-hive, hdp3.1-hive, hdp3.1-hive-kerberized and centos7-oj8-openldap May 1, 2025
@unidevel unidevel requested a review from imjalpreet May 1, 2025 10:48
Comment thread prestodb/hdp3.1-hive-kerberized/files/etc/hive/conf/hive-site.xml

@imjalpreet imjalpreet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@unidevel thanks for the PR, I successfully ran the Presto integration tests using the hive4.0-hive, hdp3.1-hive, and hdp3.1-hive-kerberized images. However, I encountered issues with the centos7-oj8-openldap image.

The Presto server fails to start when using that image, which suggests there may be a problem with the LDAP setup or a certificate issue.

For reference, here is a sample run with centos7-oj8-openldap image: https://github.com/prestodb/presto/actions/runs/15119301841/job/42498832069?pr=25143

@imjalpreet

Copy link
Copy Markdown
Member

Error message:

presto-master-1  | 1 error
presto-master-1  | 
presto-master-1  | ======================
presto-master-1  | Full classname legend:
presto-master-1  | ======================
presto-master-1  | AuthenticationNotSupportedException: "javax.naming.AuthenticationNotSupportedException"
presto-master-1  | LdapAuthenticator:                   "com.facebook.presto.password.ldap.LdapAuthenticator"
presto-master-1  | LdapAuthenticatorFactory:            "com.facebook.presto.password.ldap.LdapAuthenticatorFactory"
presto-master-1  | ========================
presto-master-1  | End of classname legend:
presto-master-1  | ========================
presto-master-1  | 
presto-master-1  | 	at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:576)
presto-master-1  | 	at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:190)
presto-master-1  | 	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:113)
presto-master-1  | 	at com.google.inject.Guice.createInjector(Guice.java:87)
presto-master-1  | 	at com.facebook.airlift.bootstrap.Bootstrap.initialize(Bootstrap.java:263)
presto-master-1  | 	at com.facebook.presto.password.ldap.LdapAuthenticatorFactory.create(LdapAuthenticatorFactory.java:49)
presto-master-1  | 	at com.facebook.presto.server.security.PasswordAuthenticatorManager.loadPasswordAuthenticator(PasswordAuthenticatorManager.java:75)
presto-master-1  | 	at com.facebook.presto.server.PrestoServer.run(PrestoServer.java:183)
presto-master-1  | 	at com.facebook.presto.server.PrestoServer.main(PrestoServer.java:96)
presto-master-1  | Caused by: java.lang.RuntimeException: javax.naming.AuthenticationNotSupportedException: [LDAP: error code 48 - anonymous bind disallowed]
presto-master-1  | 	at com.facebook.presto.password.ldap.LdapAuthenticator.checkEnvironment(LdapAuthenticator.java:184)
presto-master-1  | 	at com.facebook.presto.password.ldap.LdapAuthenticator.<init>(LdapAuthenticator.java:79)
presto-master-1  | 	at com.facebook.presto.password.ldap.LdapAuthenticator$$FastClassByGuice$$1807621.GUICE$TRAMPOLINE(<generated>)
presto-master-1  | 	at com.facebook.presto.password.ldap.LdapAuthenticator$$FastClassByGuice$$1807621.apply(<generated>)
presto-master-1  | 	at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:82)
presto-master-1  | 	at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
presto-master-1  | 	at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:33)
presto-master-1  | 	at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:98)
presto-master-1  | 	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:109)
presto-master-1  | 	at com.facebook.airlift.bootstrap.LifeCycleModule.provision(LifeCycleModule.java:54)
presto-master-1  | 	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:117)
presto-master-1  | 	at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:66)
presto-master-1  | 	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:93)
presto-master-1  | 	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:300)
presto-master-1  | 	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
presto-master-1  | 	at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169)
presto-master-1  | 	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
presto-master-1  | 	at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:213)
presto-master-1  | 	at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:186)
presto-master-1  | 	... 7 more
presto-master-1  | Caused by: javax.naming.AuthenticationNotSupportedException: [LDAP: error code 48 - anonymous bind disallowed]
presto-master-1  | 	at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3252)
presto-master-1  | 	at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3207)
presto-master-1  | 	at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2993)
presto-master-1  | 	at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2907)
presto-master-1  | 	at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:347)
presto-master-1  | 	at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxFromUrl(LdapCtxFactory.java:229)
presto-master-1  | 	at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:189)
presto-master-1  | 	at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:247)
presto-master-1  | 	at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:154)
presto-master-1  | 	at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:84)
presto-master-1  | 	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:695)
presto-master-1  | 	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
presto-master-1  | 	at javax.naming.InitialContext.init(InitialContext.java:244)
presto-master-1  | 	at javax.naming.InitialContext.<init>(InitialContext.java:216)
presto-master-1  | 	at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:101)
presto-master-1  | 	at com.facebook.presto.password.jndi.JndiUtils.createDirContext(JndiUtils.java:30)
presto-master-1  | 	at com.facebook.presto.password.ldap.LdapAuthenticator.checkEnvironment(LdapAuthenticator.java:181)
presto-master-1  | 	... 25 more

@unidevel

Copy link
Copy Markdown
Contributor Author

@imjalpreet the openldap seems removed the anonymous bind after upgrade, I have to remove the bind_anon to make it work, but I think this may need to be addressed in the presto code.

#dn: cn=config
#changetype: modify
#add: olcDisallows
#olcDisallows: bind_anon

Comment on lines +1 to +4
#dn: cn=config
#changetype: modify
#add: olcDisallows
#olcDisallows: bind_anon

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed olcDisallows: bind_anon

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for looking into it, I will test with this change. Just to get some more idea, is this something that wasn't configured in the old centos6 image?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I triggered another run with the new image, the anonymous bind error is fixed, but there are a couple of other test failures related to keystore/truststore(https://github.com/prestodb/presto/actions/runs/15119301841/job/42634779349?pr=25143). I will investigate. Thank you for the temporary fix.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@imjalpreet I noticed the default jdk is zulu jdk 11 in centos7-oj8, I updated it to jdk 1.8.0. Since the openldap updated the keystore only for jdk 1.8.0 that may cause the case failed, you need update both centos7-oj8 and centos7-oj8-openldap to test

make prestodb/centos7-oj8@local
make prestodb/centos7-oj8-openldap

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Actually it was just a change in the error message, the tests passed after a small fix

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed the last commit since it is not necessary.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@unidevel I am also testing some Presto changes so that we can disable anonymous bind again. I will update you once I have verified my change.

Can you confirm if only these 4 lines need to be uncommented to disable anonymous bind or are there any other changes we will have to revert?

@unidevel unidevel Jul 8, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The commit include other changes => unidevel@bceb4de, you need rebuild the image centos7-oj8-openldap, then build hive4.0-hive.

Since the hive4.0-hive is removed from this PR, you can checkout my new branch https://github.com/unidevel/docker-images/tree/hive4.0-hive, to build the images

@imjalpreet imjalpreet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@unidevel, would you mind creating a separate PR for the hive4.0-hive image? We are ready to release the remaining images, but Hive needs a little bit more time.

@imjalpreet

Copy link
Copy Markdown
Member

Also, could we squash the commits into fewer commits, perhaps one per image, or in any way that you think makes the most sense?

@unidevel

unidevel commented Jul 4, 2025

Copy link
Copy Markdown
Contributor Author

Also, could we squash the commits into fewer commits, perhaps one per image, or in any way that you think makes the most sense?

Sure, will update later

@unidevel

unidevel commented Jul 7, 2025

Copy link
Copy Markdown
Contributor Author

squashed into one commit.

@unidevel unidevel requested a review from imjalpreet July 7, 2025 20:41
@unidevel unidevel changed the title Add hive4.0-hive, hdp3.1-hive, hdp3.1-hive-kerberized and centos7-oj8-openldap Add hdp3.1-hive, hdp3.1-hive-kerberized and centos7-oj8-openldap Jul 8, 2025
@unidevel

unidevel commented Jul 8, 2025

Copy link
Copy Markdown
Contributor Author

Removed hive4.0-hive

@imjalpreet imjalpreet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I’ve verified the latest images in this PR: prestodb/presto#24799, and everything looks good.

Just had a quick question, should we consider moving the release.yml and .gitignore changes into a separate commit?

Comment thread .github/workflows/release.yml Outdated
Comment thread .gitignore Outdated

@imjalpreet imjalpreet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, LGTM

@unidevel unidevel requested a review from tdcmeehan July 15, 2025 09:52
@imjalpreet

Copy link
Copy Markdown
Member

@tdcmeehan, could you please help merge this, too? thanks!

@tdcmeehan tdcmeehan merged commit 5753d00 into prestodb:master Jul 15, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants