-
Notifications
You must be signed in to change notification settings - Fork 292
ARUHA-2328: added tmp script for removing locks of deleted subscriptions; #1057
base: master
Are you sure you want to change the base?
Conversation
|
||
int notExists = 0; | ||
for (int i = 0; i < locks.size(); i++) { | ||
System.out.println((i * 100 / (locks.size() - 1)) + "%"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Division by zero
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And it reports 100 before executing action
final String contextPath = "/staging"; | ||
|
||
final List<String> locks = zk.getChildren(contextPath + "/nakadi/locks", false); | ||
final List<String> subscriptions = zk.getChildren(contextPath + "/nakadi/subscriptions", false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10000 subscriptions, 100000 locks. It makes sense to use HashSet for subscriptions
But honestly - I don't care about this script, cause it will not be merged |
@antban I addressed all the terrible problems of this script; |
import java.util.List; | ||
import java.util.Set; | ||
|
||
public class SubscriptionLocksCleaner { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please document additional VM arguments that should be used to run this thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 |
@v-stepanov Are you still here? |
ARUHA-2328: added tmp script for removing locks of deleted subscriptions;