Giter Club home page Giter Club logo

Comments (4)

afolarin avatar afolarin commented on June 8, 2024 1

Note that we should revisit this issue for the refactor milestone.

from cogstack-pipeline.

afolarin avatar afolarin commented on June 8, 2024

OK let's take a look at this tomorrow. AFAIK closing after the batch doesn't sound like the right behaviour

from cogstack-pipeline.

afolarin avatar afolarin commented on June 8, 2024

cc/ @HeglerTissot

from cogstack-pipeline.

lrog avatar lrog commented on June 8, 2024

A provisional fix for the scheduler has been implemented in 56080d7 .

The general problem is that the ES REST Client (implemented in ESRestService) needs to be closed at the end of batch processing, otherwise the services and resources deinitialization process gets blocked. The @PreDestroy annotated method in ESRestService is not called automatically hence not releasing the resource.

The current workaround in the code (in JobCompleteNotificationListener::afterJob()) closes the ES REST client at the end of running a job and it works when running single jobs (SingleJobLauncher). However, when running scheduled jobs, the jobs are continuously executed, calling each time JobCompleteNotificationListener::afterJob(). Hence, when trying to write to ElasticSearch using ES REST Client for second time it will fail as the client has been already deinitialized (hence the exception mentioned by @jstuczyn ).

To overcome this issue, a simple fix was implemented -- re-initializing the ES REST client in JobCompleteNotificationListener::beforeJob() method, checking whether the client has been previously deinitialised.

However, this is just a quick fix, as ideally a slight refactoring of handling ES REST client and resources should be implemented.

from cogstack-pipeline.

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.