Skip to content

Commit

Permalink
* NEW [parquet] rename parquet_conf to conf_parquet.
Browse files Browse the repository at this point in the history
  • Loading branch information
xinyi-xs authored and JaylinYu committed Dec 17, 2023
1 parent 41d46c3 commit 871b6d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 1 addition & 3 deletions include/nng/supplemental/nanolib/parquet.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
extern "C" {
#endif

typedef conf_parquet parquet_conf;

typedef struct {
uint32_t *keys;
uint8_t **darray;
Expand All @@ -21,7 +19,7 @@ typedef struct {
parquet_object *parquet_object_alloc(uint32_t *keys, uint8_t **darray,
uint32_t *dsize, uint32_t size, nng_aio *aio);
int parquet_write_batch_async(parquet_object *elem);
int parquet_write_launcher(parquet_conf *conf);
int parquet_write_launcher(conf_parquet *conf);

const char *parquet_find(uint32_t key);
const char **parquet_find_span(uint32_t key, uint32_t offset, uint32_t *size);
Expand Down
10 changes: 5 additions & 5 deletions src/supplemental/nanolib/parquet/parquet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ create_directory(const std::string &directory_path)
}

static char *
get_file_name(parquet_conf *conf)
get_file_name(conf_parquet *conf)
{
char *dir = conf->dir;
char *prefix = conf->file_name_prefix;
Expand All @@ -67,7 +67,7 @@ get_file_name(parquet_conf *conf)
}

static char *
get_file_name_v2(parquet_conf *conf, parquet_object *object)
get_file_name_v2(conf_parquet *conf, parquet_object *object)
{
uint32_t key_start = object->keys[0];
uint32_t key_end = object->keys[object->size - 1];
Expand Down Expand Up @@ -209,7 +209,7 @@ parquet_write_loop(void *config)
log_error("parquet conf is NULL");
}

parquet_conf *conf = (parquet_conf *) config;
conf_parquet *conf = (conf_parquet *) config;
if (!directory_exists(conf->dir)) {
if (!create_directory(conf->dir)) {
log_error("Failed to create directory %s", conf->dir);
Expand Down Expand Up @@ -283,7 +283,7 @@ parquet_write_loop_v2(void *config)
log_error("parquet conf is NULL");
}

parquet_conf *conf = (parquet_conf *) config;
conf_parquet *conf = (conf_parquet *) config;
if (!directory_exists(conf->dir)) {
if (!create_directory(conf->dir)) {
log_error("Failed to create directory %s", conf->dir);
Expand Down Expand Up @@ -339,7 +339,7 @@ parquet_write_loop_v2(void *config)
}

int
parquet_write_launcher(parquet_conf *conf)
parquet_write_launcher(conf_parquet *conf)
{
INIT_QUEUE(parquet_queue);
INIT_QUEUE(parquet_file_queue);
Expand Down

0 comments on commit 871b6d8

Please sign in to comment.