[
https://issues.apache.org/jira/browse/HIVE-25933?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
lkl updated HIVE-25933:
-----------------------
Component/s: HiveServer2
(was: Query Planning)
(was: Query Processor)
> 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: HiveServer2
> Affects Versions: 2.3.5, 2.3.7, 2.3.8
> Reporter: lkl
> Priority: Major
>
> modify the class Hive.java, the method is getAllTableObjects ,materialized
> view is not used for hive2
> {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.10#820010)