Skip to content

Conversation

@ishnagy
Copy link

@ishnagy ishnagy commented Oct 21, 2025

What changes were proposed in this pull request?

I am proposing to remove the tight dependency coupling between hive-exec and hadoop-yarn-registry (to address HIVE-29284).

Why are the changes needed?

hive-exec pulls in hadoop-yarn-registry as a direct dependency, but registry classes are only used for building a local resource map for LLAP. This map can be built without the actual class instances getting loaded, using class name literals only. Removing hadoop-yarn-registry as a direct dependency will prevent pulling in its whole transitive dependency tree when one only wants to use hive-exec functionality without LLAP. (e.g apache spark)

Does this PR introduce any user-facing change?

No

How was this patch tested?

This patch will be tested by the pre merge tests executed for this pull request.

@deniskuzZ
Copy link
Member

hadoop-yarn-registry is also not needed for clusters managed by Kubernetes.

}

private void addJarLRByClassName(ClassLoader loader, String className, final Map<String, LocalResource> lrMap) throws IOException {
String jarPath = Utilities.jarFinderGetJar(loader, className);
Copy link
Member

@deniskuzZ deniskuzZ Oct 22, 2025

Choose a reason for hiding this comment

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

can we do this instead:

Class<?> clazz = Class.forName(className, true, Utilities.getSessionSpecifiedClassLoader())
addJarLRByClass(clazz, lrMap)

addJarLRByClass(LlapProtocolClientProxy.class, commonLocalResources);
addJarLRByClass(RegistryOperations.class, commonLocalResources);
addJarLRByClassName(
getClass().getClassLoader(),
Copy link
Member

Choose a reason for hiding this comment

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

why pass the classloader and not init it directly inside the addJarLRByClassName?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants