HUE-9116 [hive] Check if destination empty before export data to hdfs

Review Request #14706 — Created Jan. 9, 2020 and updated

yingc
hue
master
HUE-9116
johan, ranade, romain, weixia
commit f58482d40995fe2ffaf46bc601e863958648c0b2 (HEAD -> master, origin/ying-test6)
Author: Ying Chen <yingchen@cloudera.com>
Date:   Thu Jan 9 15:24:20 2020 -0800

    HUE-9116 [hive] Check if destination empty before export data to hdfs

:100644 100644 68b87468f5... 0d705c5d6a... M    desktop/libs/notebook/src/notebook/api.py
:100644 100644 33d2dd89bf... fdc75db0e6... M    desktop/libs/notebook/src/notebook/tests.py
added notebook.tests:TestNotebookApiMocked.test_export_result
  • 0
  • 0
  • 4
  • 0
  • 4
Description From Last Updated
romain
  1. Move to the top level? Does it still allow non existing path?

    (and easier to add a mock test also)

  2. Check at the top level instead?
    https://github.com/cloudera/hue/blob/master/desktop/libs/notebook/src/notebook/api.py#L775

    (so that we handle all the connectors in one place)

  3. 1

    if not fs.exists() or ... also needed?

    (if the full path does not exist yet)

    2

    len(self.request.fs.listdir_stats(destination)) > 0:

    -->

    self.request.fs.listdir_stats(destination):

  4. 
      
yingc
romain
  1. 
      
  2. desktop/libs/notebook/src/notebook/api.py (Diff revision 2)
     
     
     

    We should allow new destinations (e.g. it could be a subfolder in your home)? (IIRC this is valid in CTAS), so would remove this check.

  3. 
      
yingc
Review request changed
Loading...