Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

KVCache will truncate keys in the key map #110

Closed
Sahasrara opened this issue Mar 18, 2016 · 4 comments
Closed

KVCache will truncate keys in the key map #110

Sahasrara opened this issue Mar 18, 2016 · 4 comments

Comments

@Sahasrara
Copy link

    final Function<Value, String> keyExtractor = new Function<Value, String>() {
        @Override
        public String apply(Value input) {
            return input.getKey().substring(rootPath.length() + 1); **<---**
        }
    };

This guy needs to be changed so that it doesn't truncate key names. It might be cool if it ignored trailing slashes. Maybe something like this, but less dumb:

Set incomingKey = new HashSet(Arrays.asList(input.getKey().split("/")));
Set rootKey = new HashSet(Arrays.asList(rootPath.split("/")));
incomingKey.removeAll(rootKey);
return incomingKey.iterator().next();

@rickfast
Copy link
Owner

I'll fix this this week.

@Sahasrara
Copy link
Author

thanks!

@rickfast
Copy link
Owner

rickfast commented Apr 2, 2016

Fixed by 9f42980

@rickfast rickfast closed this as completed Apr 2, 2016
@Sahasrara
Copy link
Author

Dope, thanks!

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

No branches or pull requests

2 participants