Skip to content

Commit

Permalink
Merge pull request #979 from jubatus/fix-850
Browse files Browse the repository at this point in the history
use broadcast distribution logic for classifier set_label API (fix #850)
  • Loading branch information
rimms committed Apr 22, 2015
2 parents 8e0cf2f + 5c1292f commit d58f57b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion jubatus/server/server/classifier.idl
Expand Up @@ -70,7 +70,7 @@ service classifier {
#- - True if this function appends label successfully.
#-
#- Append new label with no datum
#@random #@update #@pass
#@broadcast #@update #@pass
bool set_label(0: string new_label)

#@broadcast #@update #@all_and
Expand Down
6 changes: 4 additions & 2 deletions jubatus/server/server/classifier_proxy.cpp
@@ -1,4 +1,4 @@
// This file is auto-generated from classifier.idl(0.6.4-33-gcc8d7ca) with jenerator version 0.6.4-104-g3698e11/gintenlabo-fix-956
// This file is auto-generated from classifier.idl(0.6.4-33-gcc8d7ca) with jenerator version 0.6.4-104-g3698e11/develop
// *** DO NOT EDIT ***

#include <map>
Expand All @@ -22,7 +22,9 @@ int run_proxy(int argc, char* argv[]) {
k.register_async_random<std::vector<std::vector<estimate_result> >,
std::vector<jubatus::core::fv_converter::datum> >("classify");
k.register_async_random<std::vector<std::string> >("get_labels");
k.register_async_random<bool, std::string>("set_label");
k.register_async_broadcast<bool, std::string>("set_label",
jubatus::util::lang::function<bool(bool, bool)>(
&jubatus::server::framework::pass<bool>));
k.register_async_broadcast<bool>("clear",
jubatus::util::lang::function<bool(bool, bool)>(
&jubatus::server::framework::all_and));
Expand Down

0 comments on commit d58f57b

Please sign in to comment.