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

Sample file for --data-import #51

Open
choijon5 opened this issue Apr 11, 2018 · 3 comments
Open

Sample file for --data-import #51

choijon5 opened this issue Apr 11, 2018 · 3 comments

Comments

@choijon5
Copy link

choijon5 commented Apr 11, 2018

I'd like to verify the output data of a Memcached server (using --data-verify) using binary protocol. The --data-verify flag requires to import a file using --data-import.
I've tried creating a file following the structure described in README.import, but I keep getting an error.
Would someone be able to provide a sample file for --data-import, and what the expected output of memtier_benchmark would be when running --data-verify with the file?

@choijon5
Copy link
Author

choijon5 commented Apr 11, 2018

By gdb'ing through the code, I was able to create a file that is read in properly. The file has to be structured in the exact format that Memtier expects, including spaces, so a sample file with the README would really help in my opinion. Now, I'm not really sure what to make of the results though. My very simple object file has the following:
dumpflags, time, exptime, nbytes, nsuffix, it_flags, clsid, nkey, key, data 0, 0, 10, 4, 4, 0, 1, 1, a, 11
Now, when I run 1 get command, I see:
Reading keys from memcached_simple.csv... 1 keys read. Performing data verification... Data verification completed: 0 keys verified successfuly. 0 keys failed.

When I run 1 set command, I see:
Reading keys from memcached_simple.csv... 1 keys read. Performing data verification... error: key [a]: expected [11], got [Not found] Data verification completed: 0 keys verified successfuly. 1 keys failed.

Does this mean that when I run 1 set, it writes to memcached then reads it back to verify the value? Not sure why it's getting "Not found"...

@choijon5
Copy link
Author

I'm answering myself again, but I figured it out. First you need to run sets only without --verify-only, which actually writes to the cache, then you run sets only again with --verify-only, which verifies that the written data matches what's in the object file. I'm curious why gets don't work with --verify-only though. It's a bit counter-intuitive that only sets can be used.

@Upasana2101
Copy link

I generated the file in the same format by referring to yours. Below is an example of the first few entries.

dumpflags, time, exptime, nbytes, nsuffix, it_flags, clsid, nkey, key, data
0, 0, 0, 200, 200, 0, 1, 200, sqjbmtzgladigkgckqxhqvkvnvcdrctjfqvsfnkwcocgagwvfbsbpadxxirdnkfexzifhmqxriaqvwiwxegholwgheabfqdhvxyqquaoxqrcebhjlvvsurgofgaapmqgyvtngtfkhiowfezfsjsyspzdffaojbwwqombzlvwhqqxdschnjgcjtgfmdxmvpmujreflbvc, ddcihrvrhfykwaprhhoxrgqcgcekmxkfkptrkhsvptkgnxqrazainyabxdkznmsgrpsgyeuxzkdopkpioevdmifibezsdhvglfjfojctdrxwlosunongwfpwrsuklfxrkneovbbhkspbmpsqloczpjzoiumspoxhtrqttsyhbrqgbhmibpdzpkboxrpshnylickresgq
0, 0, 0, 200, 200, 0, 1, 200, voaidlhyacrsxwurfwbdharbcuiotsaabyjhohqrperazwfialssbekpdhjujsfosvqvdtkvdocghakxqfxpbjrlpacixygnforgvpkojbylonzynvnezmhenlkmmerisipveqfrefpmgmnumtwtckdvlklegtcmygibekvktjmikqvobepdrdahcvildjprbgtlowam, fujwzhpvjutlhxycaivguimukkkhtvvkwktbtuhthudapksgynusznwnbaarjjqtdroukejmcgfdjzcerfjbbaoclgattmokezeeooptggpqdwagcltwqhbdnhsyxstxfdsgoemsbnbjyjgtmnklklhvjspsxbcnaffsofxrlxzgjwppdjyaioonzzxbhrsydivfmlkf

I want to insert these as key value pairs using memcache_text.
I am using the following command:
memtier_benchmark -p 11211 -P memcache_text -t 4 -n 100 –ratio 1000:0 -c 25 -x 5 --data-import=key.csv

But I am getting this error-
key.csv:2: error parsing item values.

Do you know anything about this?

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

No branches or pull requests

2 participants