[ 
https://issues.apache.org/jira/browse/HIVE-25933?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

lkl updated HIVE-25933:
-----------------------
    Fix Version/s: 3.1.2
                   3.1.1

> when hive has 10w+ tables ,hs2 will start for a long time,because hs2 will 
> load all table as materialized view with single thread,this is sensitive for 
> online task
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-25933
>                 URL: https://issues.apache.org/jira/browse/HIVE-25933
>             Project: Hive
>          Issue Type: Improvement
>          Components: Query Planning, Query Processor
>    Affects Versions: 2.3.5, 2.3.7, 2.3.8
>            Reporter: lkl
>            Priority: Major
>             Fix For: 3.1.1, 3.1.2
>
>
> modify the class Hive.java, the method is getAllTableObjects
> {code:java}
> /**
>  * Get all tables for the specified database.
>  * @param dbName
>  * @return List of table names
>  * @throws HiveException
>  */
> public List<Table> getAllTableObjects(String dbName) throws HiveException {
>   try {
>     List<String> tableNames = getMSC().getAllTables(dbName);
>     if(tableNames.size()>1){
>       tableNames = tableNames.subList(0,1);
>     }
>     return Lists.transform(getMSC().getTableObjectsByName(dbName,tableNames),
>             new 
> com.google.common.base.Function<org.apache.hadoop.hive.metastore.api.Table, 
> Table>() {
>               @Override
>               public Table apply(org.apache.hadoop.hive.metastore.api.Table 
> table) {
>                 return new Table(table);
>               }
>             }
>     );
>   } catch (Exception e) {
>     throw new HiveException(e);
>   }
> } {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to