Git Product home page Git Product logo

Comments (10)

mmalohlava avatar mmalohlava commented on May 28, 2024

Hi @king1402 ,

right now we do not support stopping of H2O services. If you are interested you can make PR to deal with this issue.

from sparkling-water.

king1402 avatar king1402 commented on May 28, 2024

thanks very much
could you tell me What PR means

from sparkling-water.

mmalohlava avatar mmalohlava commented on May 28, 2024

Ahh, sorry, PR means pull requests. It is common way how to contribute into open-source projects.

from sparkling-water.

lev112 avatar lev112 commented on May 28, 2024

Looking at the h2o code, it will be difficult, as h2o use a lot of static variables

Any suggestions on a workaround for this?
it is very difficult to write unit tests for sparkling water since usually each suite will create it's own spark context, but the h2o context can only be created once

from sparkling-water.

mmalohlava avatar mmalohlava commented on May 28, 2024

Hi @lev112

yup, we are working on that and iterating H2O's API - and we appreciate any feedback!

Regarding your questions - there are two kinds of tests:

  1. sharing SparkContext and H2OContext: for example here: https://github.com/h2oai/sparkling-water/blob/master/core/src/test/scala/org/apache/spark/rdd/H2OSchemaRDDTest.scala

  2. each test needs a fresh H2OContext. In this case you have to implement test suite per test and make sure that your testing framework forks a new JVM for each test suite: see https://github.com/h2oai/sparkling-water/blob/master/examples/src/integTest/scala/water/sparkling/itest/local/RegularExamplesSuite.scala

Let me know if it works for you!

from sparkling-water.

lev112 avatar lev112 commented on May 28, 2024

hi @mmalohlava

thanks for your response.

for 1, I'm sharing context between tests in a test class, but there are a few different test class that are used,

for 2, I'm running the tests in intellij, and as far as I can tell, forking tests is not supported

looking forward for any changes in that area

from sparkling-water.

mmalohlava avatar mmalohlava commented on May 28, 2024

Hi @lev112

for 1., you should use one context per test class right now

for 2, i normally setup configuration in the following way:
image

from sparkling-water.

jakubhava avatar jakubhava commented on May 28, 2024

We are iterating H2O code to support stopping H2O inside a single JVM, right now H2O can't be fully stopped in a single JVM

from sparkling-water.

rajasekaran-d avatar rajasekaran-d commented on May 28, 2024

Any update on this problem

from sparkling-water.

jakubhava avatar jakubhava commented on May 28, 2024

No update so far

from sparkling-water.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.