summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt3
-rw-r--r--src/inc_internal/t_topk.h2
-rw-r--r--src/swarmkv.c1
-rw-r--r--src/t_topk.c1
4 files changed, 6 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4424204..9451a7e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -8,7 +8,7 @@ message(STATUS "SwarmKV, Version: ${SWARMKV_VERSION}")
add_definitions(-D_GNU_SOURCE)
add_definitions(-fPIC)
set(SWARMKV_SRC swarmkv.c swarmkv_store.c swarmkv_sync.c swarmkv_api.c
- t_string.c t_set.c t_token_bucket.c t_hash.c
+ t_string.c t_set.c t_token_bucket.c t_hash.c t_topk.c
swarmkv_common.c swarmkv_message.c swarmkv_net.c swarmkv_keyspace.c swarmkv_utils.c
swarmkv_monitor.c future_promise.cpp)
@@ -18,6 +18,7 @@ set(LIB_SOURCE_FILES
${PROJECT_SOURCE_DIR}/deps/cJSON/cJSON.c
${PROJECT_SOURCE_DIR}/deps/base64/base64.c
${PROJECT_SOURCE_DIR}/deps/xxhash/xxhash.c
+ ${PROJECT_SOURCE_DIR}/deps/minheap/heap.c
${PROJECT_SOURCE_DIR}/deps/timeout/timeout.c
${PROJECT_SOURCE_DIR}/deps/log/log.c)
diff --git a/src/inc_internal/t_topk.h b/src/inc_internal/t_topk.h
index 9e0c371..95af9cd 100644
--- a/src/inc_internal/t_topk.h
+++ b/src/inc_internal/t_topk.h
@@ -1,4 +1,6 @@
+#pragma once
#include "swarmkv_common.h"
+#include "swarmkv_cmd_spec.h"
// TOPKREV key K [width] [depth] [decay rate]
enum cmd_exec_result topkrev_command(struct swarmkv_module *mod_store, const struct swarmkv_cmd *cmd, const node_t *accessing_node, struct swarmkv_reply **reply);
diff --git a/src/swarmkv.c b/src/swarmkv.c
index a3f8ff6..6b31b7e 100644
--- a/src/swarmkv.c
+++ b/src/swarmkv.c
@@ -16,6 +16,7 @@
#include "t_set.h"
#include "t_token_bucket.h"
#include "t_hash.h"
+#include "t_topk.h"
#include "swarmkv_message.h"
#include "swarmkv_net.h"
diff --git a/src/t_topk.c b/src/t_topk.c
index 558d22b..1d22278 100644
--- a/src/t_topk.c
+++ b/src/t_topk.c
@@ -182,4 +182,5 @@ enum cmd_exec_result topklist_command(struct swarmkv_module *mod_store, const st
enum cmd_exec_result topkquery_command(struct swarmkv_module *mod_store, const struct swarmkv_cmd *cmd, const node_t *accessing_node, struct swarmkv_reply **reply)
{
// TODO
+ return FINISHED;
} \ No newline at end of file