Uploaded image for project: 'SW'
  1. SW-569

pysparkling: h2o on exit does not shut down cleanly

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.18, 2.1.17, 2.2.3
    • Component/s: None
    • Labels:
      None

      Description

      When we shutdown h2o as part of a pysparkling shell exit, all kinds of exceptions are logged to the console which can potentially cause the application to unnecessarily warn the user even though the application successfully completed.

      >>> exit()
      H2O session _sid_833c closed.
      /home/H2O/sparkling-water-2.1.16/py/build/dist/h2o_pysparkling_2.1-2.1.16.zip/pysparkling/context.py:151: UserWarning: Stopping H2OContext. (Restarting H2O is not yet fully supported...) 
      Error in atexit._run_exitfuncs:
      Traceback (most recent call last):
       File "/opt/pythonz/pythons/CPython-2.7.5/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
       func(*targs, **kargs)
       File "/home/H2O/sparkling-water-2.1.16/py/build/dist/h2o_pysparkling_2.1-2.1.16.zip/pysparkling/context.py", line 140, in <lambda>
       atexit.register(lambda: h2o_context.stop_with_jvm())
       File "/home/H2O/sparkling-water-2.1.16/py/build/dist/h2o_pysparkling_2.1-2.1.16.zip/pysparkling/context.py", line 147, in stop_with_jvm
       self.stop()
       File "/home/H2O/sparkling-water-2.1.16/py/build/dist/h2o_pysparkling_2.1-2.1.16.zip/pysparkling/context.py", line 152, in stop
       Initializer.clean_temp_dir()
       File "/home/H2O/sparkling-water-2.1.16/py/build/dist/h2o_pysparkling_2.1-2.1.16.zip/pysparkling/initializer.py", line 81, in clean_temp_dir
       shutil.rmtree(Initializer.__extracted_jar_dir)
       File "/opt/pythonz/pythons/CPython-2.7.5/lib/python2.7/shutil.py", line 239, in rmtree
       onerror(os.listdir, path, sys.exc_info())
       File "/opt/pythonz/pythons/CPython-2.7.5/lib/python2.7/shutil.py", line 237, in rmtree
       names = os.listdir(path)
      OSError: [Errno 2] No such file or directory: '/tmp/tmpWCvXCm'
      Error in sys.exitfunc:
      

        Attachments

          Activity

            People

            • Assignee:
              Kuba Jakub Hava
              Reporter:
              nidhi Nidhi Mehta
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: