HUE-9089 [hive] Add progress update from HIVE_CLI_SERVICE_PROTOCOL_V10

Review Request #14550 — Created Nov. 27, 2019 and submitted

jgauthier
hue
master
HUE-9089
hue
jgauthier, johan, ranade, romain, weixia, yingc
commit 39edae6589934573868951b9f2d0b591979cdb85
Author: Jean-Francois Desjeans Gauthier <jf.desjeans.gauthier@gmail.com>
Date:   Wed Nov 27 13:51:53 2019 -0800

    HUE-9089 [hive] Add progress update from HIVE_CLI_SERVICE_PROTOCOL_V10

:100644 100644 2cc301ecaa... 88360a7154... M	desktop/core/src/desktop/js/apps/notebook/snippet.js
:100644 100644 f2ccd28dd8... 653508339e... M	desktop/libs/notebook/src/notebook/api.py
:100644 100644 5568537d35... d28838ad59... M	desktop/libs/notebook/src/notebook/connectors/hiveserver2.py


  • 0
  • 0
  • 1
  • 1
  • 2
Description From Last Updated
johan
  1. Ship It!
  2. I don't think status and progress belongs in the handle, but if you want to move it there you'd also have to change the execute endpoints to set it initially. self.status should then be changed to a computed and return the status value from the handle.

    $.extend is a bit nasty as it hides the intention and takes more effort to debug. I can't tell from this why the handle needs progressed_percentage.

    If it's just the status attribute it reads better with:

    if (data.query_status) {
    self.result.handle().status = data.query_status.status;
    }

  3. Nit: if (typeof ...

    1. typeof is tricky:
      typeof NaN === 'number' // true
      typeof new Number(0) === 'object' // true

  4. 
      
jgauthier
Review request changed

Status: Closed (submitted)

Loading...