Comments (4)
Note that we should revisit this issue for the refactor milestone.
from cogstack-pipeline.
OK let's take a look at this tomorrow. AFAIK closing after the batch doesn't sound like the right behaviour
from cogstack-pipeline.
cc/ @HeglerTissot
from cogstack-pipeline.
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)
- Add support for PDF Form Parsing HOT 1
- [Feature] Support arbitrary parameter for SQL INSERT statement for jdbc_out
- Default for scheduler.rate does not follow the cron syntax HOT 1
- Post-processing of bio yodie result HOT 1
- De-Identification
- Test LSTM OCR Engine in Tesseract HOT 4
- ElasticsearchRest Client will fail silently if index contains invalid character HOT 2
- PDF and Thumbnail generation will fail if Tika throws length warning
- Unable to index Docman Documents HOT 5
- Tika_deid not working since ES Upgrade HOT 6
- Add PDF Table Extraction using Tabula
- Cogstack docker download issues HOT 6
- Refactor the build process HOT 1
- add Nginx proxy to the stack for basic Auth
- Mechanism to prevent stale CogStack structured data in Elasticsearch HOT 1
- Refactor Integration and acceptance tests HOT 1
- Can we add more than one elastic search hosts in the config ? HOT 4
- fix: read from filesystem or object-store
- Unable to view links on confluence HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cogstack-pipeline.