Manno15 commented on pull request #1958:
URL: https://github.com/apache/accumulo/pull/1958#issuecomment-792948215


   After doing more investigating, I am leaning towards the side of keeping the 
use of `ZooQueueLock` as is and not trying to refactor it to use `ZooLock`. 
Instead, I'd rather alter the validation and sorting process of the locks. In 
`AdminUtil` (which is called from the Fate Print command) we call 
`ZooLock.validateAndSortChildrenByLockPrefix`. This expects the lock prefix to 
only be zLock which is where the warning is coming from. If the goal of this 
function is just to validate and sort the locks then I think broadening its use 
case by accepting different lock prefixes can solve this issue while not 
forcing every lock to look like ZooLocks. I would do this by moving out this 
function into a utility class or in its own class. Then, whichever class needs 
to validate/sort locks can call it and either pass in the expected lock prefix 
or pull from a list of valid ones. This is under the assumption that we want to 
keep other lock classes like `ZooQueueLock`/`DistributedReadWriteLock` (wh
 ich can have different prefixes) and not convert everything to `ZooLock`. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to