Created
October 11, 2016 08:16
-
-
Save TkrUdagawa/06799b1db0adb45c1969838bd9721bdb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import time | |
from jubatus.recommender.client import Recommender | |
from jubatus.common import Datum | |
interval_count = 512 | |
if __name__ == '__main__': | |
cli = Recommender("127.0.0.1", 9199, "my-cluster") | |
print("update_row") | |
for i in range(interval_count - 1): | |
cli.update_row("foo", Datum({"key-" + str(i): i})) | |
cli.update_row("hoge", Datum({"key-" + str(i): i})) | |
print("clear_row") | |
cli.clear_row("foo") # this update request triggers MIX | |
print("waiting for MIX to complete...") | |
time.sleep(3) | |
print("get_all_rows") | |
print(cli.get_all_rows()) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment