You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/12/13 17:43:39 UTC

[GitHub] [hive] sourabh912 opened a new pull request #2868: HIVE-25800: Improvement in loadDynamicPartitions() to not load all partitions from HMS for managed table

sourabh912 opened a new pull request #2868:
URL: https://github.com/apache/hive/pull/2868


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/Hive/HowToContribute
     2. Ensure that you have created an issue on the Hive project JIRA: https://issues.apache.org/jira/projects/HIVE/summary
     3. Ensure you have added or run the appropriate tests for your PR: 
     4. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP]HIVE-XXXXX:  Your PR title ...'.
     5. Be sure to keep the PR description updated to reflect all changes.
     6. Please write your PR title to summarize what this PR proposes.
     7. If possible, provide a concise example to reproduce the issue for a faster review.
   
   -->
   
   ### What changes were proposed in this pull request?
   HIVE-20661 added an improvement in loadDynamicPartitions() api in Hive.java to not add partitions one
   by one in HMS. It used to fetch all the existing partitions for a table from HMS and compare that with
   dynamic partitions list to decide old and new partitions to be added to HMS (in batches). The call to
   fetch all partitions has introduced a performance regression for tables with large number of
   partitions (of the order of 100K).
   
   This is fixed for external tables in HIVE-25178. However for ACID tables there is an open Jira HIVE-25187.
   Until we have an appropriate fix in HIVE-25187,we can skip fetching all partitions. Instead, in the
   threadPool which loads each partition individually,call getPartition() to check if the partition already
   exists in HMS or not. This will introduce additional getPartition() call for every partition to be loaded
   dynamically but does not fetch all existing partitions for a table anymore.
   
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   Since it is an improvement in existing logic, therefore relying on existing tests. 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] sourabh912 closed pull request #2868: HIVE-25800: Improvement in loadDynamicPartitions() to not load all partitions from HMS for managed table

Posted by GitBox <gi...@apache.org>.
sourabh912 closed pull request #2868:
URL: https://github.com/apache/hive/pull/2868


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] sourabh912 commented on pull request #2868: HIVE-25800: Improvement in loadDynamicPartitions() to not load all partitions from HMS for managed table

Posted by GitBox <gi...@apache.org>.
sourabh912 commented on pull request #2868:
URL: https://github.com/apache/hive/pull/2868#issuecomment-992718239


   @lcspinter @rbalamohan @nrg4878 : Please review and provide your feedback. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] sourabh912 commented on pull request #2868: HIVE-25800: Improvement in loadDynamicPartitions() to not load all partitions from HMS for managed table

Posted by GitBox <gi...@apache.org>.
sourabh912 commented on pull request #2868:
URL: https://github.com/apache/hive/pull/2868#issuecomment-993883393


   @kgyrtkirk : Please review and provide your feedback.  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] nrg4878 commented on pull request #2868: HIVE-25800: Improvement in loadDynamicPartitions() to not load all partitions from HMS for managed table

Posted by GitBox <gi...@apache.org>.
nrg4878 commented on pull request #2868:
URL: https://github.com/apache/hive/pull/2868#issuecomment-998020648


   Fix has been merged. Please close the PR


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] sourabh912 commented on pull request #2868: HIVE-25800: Improvement in loadDynamicPartitions() to not load all partitions from HMS for managed table

Posted by GitBox <gi...@apache.org>.
sourabh912 commented on pull request #2868:
URL: https://github.com/apache/hive/pull/2868#issuecomment-994630787


   The following test is failing and it seems unrelated to the patch. I have triggered the run again:
   
   ```
   org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: MetaException(message:org.apache.hadoop.hive.serde2.SerDeException Caught exception while initializing the SqlSerDe)
    at org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:1301)
    at org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:1306)
    at org.apache.hadoop.hive.ql.ddl.table.create.CreateTableOperation.createTableNonReplaceMode(CreateTableOperation.java:140)
    at org.apache.hadoop.hive.ql.ddl.table.create.CreateTableOperation.execute(CreateTableOperation.java:98)
    at org.apache.hadoop.hive.ql.ddl.DDLTask.execute(DDLTask.java:84)
    at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:212)
    at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:105)
    at org.apache.hadoop.hive.ql.Executor.launchTask(Executor.java:365)
    at org.apache.hadoop.hive.ql.Executor.launchTasks(Executor.java:338)
    at org.apache.hadoop.hive.ql.Executor.runTasks(Executor.java:249)
    at org.apache.hadoop.hive.ql.Executor.execute(Executor.java:110)
    at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:348)
    at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:204)
    at org.apache.hadoop.hive.ql.Driver.run(Driver.java:153)
    at org.apache.hadoop.hive.ql.Driver.run(Driver.java:148)
    at org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:164)
    at org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:230)
    at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:256)
    at org.apache.hadoop.hive.cli.CliDriver.processCmd1(CliDriver.java:201)
    at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:127)
    at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:422)
    at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:353)
    at org.apache.hadoop.hive.ql.QTestUtil.executeClientInternal(QTestUtil.java:726)
    at org.apache.hadoop.hive.ql.QTestUtil.executeClient(QTestUtil.java:696)
    at org.apache.hadoop.hive.cli.control.CoreCliDriver.runTest(CoreCliDriver.java:114)
    at org.apache.hadoop.hive.cli.control.CliAdapter.runTest(CliAdapter.java:157)
    at org.apache.hadoop.hive.cli.split8.TestMiniLlapLocalCliDriver.testCliDriver(TestMiniLlapLocalCliDriver.java:62)
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] sourabh912 commented on pull request #2868: HIVE-25800: Improvement in loadDynamicPartitions() to not load all partitions from HMS for managed table

Posted by GitBox <gi...@apache.org>.
sourabh912 commented on pull request #2868:
URL: https://github.com/apache/hive/pull/2868#issuecomment-1004743262


   Thank you @lcspinter for the approval and @nrg4878 for merging it. Commit merged to master: https://github.com/apache/hive/commit/63c6d8ba70dfa59e791e1e49f44629c22fb41b7f


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org