Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add the receiver stop function #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stupidxian
Copy link

When application is stoping , it will pop last a data from redis. It throws exception because it can't store the last data,and this data will lose. This commition has solved this bug in a way that stop the connect. It has a deficiencies.When stopd the connection ,it will throws ConnectException.

When application is stoping , it will pop last a data from redis. It throws exception because it can't store the last data,and this data will lose. This commition has solved this bug in a way that stop the connect. It has a deficiencies.When stopd the connection ,it will throws ConnectException.
@gkorland gkorland requested a review from fe2s April 30, 2019 12:56
Copy link
Collaborator

@fe2s fe2s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an old review that wasn't addressed earlier for some reason. Sorry for that.

@@ -29,28 +29,37 @@ private class RedisReceiver[T: ClassTag](keys: Array[String],
redisConfig: RedisConfig,
streamType: Class[T])
extends Receiver[T](storageLevel) {

var jedisConnect: Jedis = null
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There might be multiple different Jedis instances, one for each key. This variable refers only to the last one, so other connections will not be closed with onStop() method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants