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

HIVE-21563: Improve Table#getEmptyTable performance by disabling registerAllFunctionsOnce #2251

Merged
merged 1 commit into from
May 7, 2021

Conversation

wangyum
Copy link
Member

@wangyum wangyum commented May 6, 2021

What changes were proposed in this pull request?

Improve Table#getEmptyTable performance by disabling registerAllFunctionsOnce.

Why are the changes needed?

Table#getEmptyTable do not need registerAllFunctionsOnce . The stack trace:

  at org.apache.hadoop.hive.ql.exec.Registry.registerGenericUDF(Registry.java:177)
  at org.apache.hadoop.hive.ql.exec.Registry.registerGenericUDF(Registry.java:170)
  at org.apache.hadoop.hive.ql.exec.FunctionRegistry.<clinit>(FunctionRegistry.java:209)
  at org.apache.hadoop.hive.ql.metadata.Hive.reloadFunctions(Hive.java:247)
  at org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:231)
  at org.apache.hadoop.hive.ql.metadata.Hive.<init>(Hive.java:388)
  at org.apache.hadoop.hive.ql.metadata.Hive.create(Hive.java:332)
  at org.apache.hadoop.hive.ql.metadata.Hive.getInternal(Hive.java:312)
  at org.apache.hadoop.hive.ql.metadata.Hive.get(Hive.java:288)
  at org.apache.hadoop.hive.ql.session.SessionState.setAuthorizerV2Config(SessionState.java:913)
  at org.apache.hadoop.hive.ql.session.SessionState.setupAuth(SessionState.java:877)
  at org.apache.hadoop.hive.ql.session.SessionState.getAuthenticator(SessionState.java:1479)
  at org.apache.hadoop.hive.ql.session.SessionState.getUserFromAuthenticator(SessionState.java:1150)
  at org.apache.hadoop.hive.ql.metadata.Table.getEmptyTable(Table.java:180)

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Existing test.

@wangyum
Copy link
Member Author

wangyum commented May 6, 2021

cc @sunchao

Copy link
Member

@sunchao sunchao left a comment

Choose a reason for hiding this comment

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

Thanks @wangyum ! LGTM pending on CI.

@sunchao sunchao merged commit 2b196f1 into apache:master May 7, 2021
@wangyum wangyum deleted the HIVE-21563 branch May 7, 2021 05:58
udaynpusa pushed a commit to mapr/hive that referenced this pull request Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants