> On May 26, 2020, 11:48 p.m., Ashutosh Chauhan wrote:
> > standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/Msck.java
> > Lines 87-92 (original), 87-97 (patched)
> > <https://reviews.apache.org/r/72521/diff/1/?file=2232456#file2232456line87>
> >
> >     I don't follow how this is an improvement. new Configuration() which I 
> > assume is expensive call is still there.
> >     If anything, it appears that this change would make perf worse since 
> > earlier new Conf() was guarded by if (msc == null) so would have happened 
> > only once, but now will happen everytime.
> >     Can you explain how this change is more performant?
> 
> Rajesh Balamohan wrote:
>     This is because, it was creating this for every table.
>      
>     With the fix in "PartitionManagementTask::run", patch constructs this 
> conf only once and reuses it across tables. (i.e in Configuration msckConf = 
> Msck.getMsckConf(conf);)
> 
> Ashutosh Chauhan wrote:
>     But how? Msck.getMsckConf() constructs new Configuration() every time. 
> Also, it is invoked everytime for execute(). So, I still don't see it.

I meant run() invokes getMsckConf() for every table which in turns does new 
Configuration()


- Ashutosh


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72521/#review220874
-----------------------------------------------------------


On May 18, 2020, 12:53 a.m., Rajesh Balamohan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72521/
> -----------------------------------------------------------
> 
> (Updated May 18, 2020, 12:53 a.m.)
> 
> 
> Review request for hive, Ashutosh Chauhan and prasanthj.
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Msck.init for every table takes more CPU time than the actual table repair. 
> This was observed on a system which had lots of DB and tables.
> 
> 
> Diffs
> -----
> 
>   ql/src/java/org/apache/hadoop/hive/ql/ddl/misc/msck/MsckOperation.java 
> c05d699bd8 
>   
> ql/src/test/org/apache/hadoop/hive/ql/exec/TestMsckCreatePartitionsInBatches.java
>  7821f40a82 
>   
> ql/src/test/org/apache/hadoop/hive/ql/exec/TestMsckDropPartitionsInBatches.java
>  8be31128a1 
>   
> standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/Msck.java
>  f4e109d1b0 
>   
> standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/PartitionManagementTask.java
>  e4488f4709 
> 
> 
> Diff: https://reviews.apache.org/r/72521/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Rajesh Balamohan
> 
>

Reply via email to