[ 
https://issues.apache.org/jira/browse/HIVE-26407?focusedWorklogId=801879&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-801879
 ]

ASF GitHub Bot logged work on HIVE-26407:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 19/Aug/22 07:13
            Start Date: 19/Aug/22 07:13
    Worklog Time Spent: 10m 
      Work Description: deniskuzZ commented on code in PR #3489:
URL: https://github.com/apache/hive/pull/3489#discussion_r949875186


##########
ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestWorker.java:
##########
@@ -1026,6 +1026,31 @@ public void testFindNextCompactThrowsTException() throws 
Exception {
     verify(msc, times(0)).markFailed(any());
   }
 
+  @Test
+  public void testDoesNotGatherStatsIfCompactionFails() throws Exception {
+    StatsUpdater statsUpdater = Mockito.spy(StatsUpdater.class);

Review Comment:
   no need for spy here, simple mock is what we need





Issue Time Tracking
-------------------

    Worklog Id:     (was: 801879)
    Time Spent: 3.5h  (was: 3h 20m)

> Do not collect statistics if the compaction fails
> -------------------------------------------------
>
>                 Key: HIVE-26407
>                 URL: https://issues.apache.org/jira/browse/HIVE-26407
>             Project: Hive
>          Issue Type: Test
>          Components: Hive
>            Reporter: Zsolt Miskolczi
>            Assignee: Zsolt Miskolczi
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> It can still compute statistics, even if compaction fails.
> if (computeStats) \{
>   StatsUpdater.gatherStats(ci, conf, runJobAsSelf(ci.runAs) ? ci.runAs : 
> t1.getOwner(),
>           CompactorUtil.getCompactorJobQueueName(conf, ci, t1));
> }



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to