docio_test.cc (818cce61) docio_test.cc (2534ac38)
1#include <stdio.h>
2#include <stdlib.h>
3#include <string.h>
4#include <pthread.h>
5
6#include "docio.h"
7#include "filemgr.h"
8#include "filemgr_ops_linux.h"

--- 26 unchanged lines hidden (view full) ---

35 char bodybuf[4096];
36 struct docio_object doc;
37 struct filemgr_config config;
38
39 doc.key = keybuf;
40 doc.meta = metabuf;
41 doc.body = bodybuf;
42
1#include <stdio.h>
2#include <stdlib.h>
3#include <string.h>
4#include <pthread.h>
5
6#include "docio.h"
7#include "filemgr.h"
8#include "filemgr_ops_linux.h"

--- 26 unchanged lines hidden (view full) ---

35 char bodybuf[4096];
36 struct docio_object doc;
37 struct filemgr_config config;
38
39 doc.key = keybuf;
40 doc.meta = metabuf;
41 doc.body = bodybuf;
42
43 memset(&config, 0, sizeof(config));
43 config.blocksize = blocksize;
44 config.ncacheblock = 1024;
45 r = system("rm -rf ./dummy");
46 file = filemgr_open("./dummy", get_linux_filemgr_ops(), config);
47 docio_init(&handle, file);
48
49 docsize = _set_doc(&doc, "this_is_key", "this_is_metadata", "this_is_body_lawiefjaawleif");
50 offset = docio_append_doc(&handle, &doc);

--- 46 unchanged lines hidden ---
44 config.blocksize = blocksize;
45 config.ncacheblock = 1024;
46 r = system("rm -rf ./dummy");
47 file = filemgr_open("./dummy", get_linux_filemgr_ops(), config);
48 docio_init(&handle, file);
49
50 docsize = _set_doc(&doc, "this_is_key", "this_is_metadata", "this_is_body_lawiefjaawleif");
51 offset = docio_append_doc(&handle, &doc);

--- 46 unchanged lines hidden ---