astoreAvro 数据存储

联合创作 · 2023-10-01

astore 是基于 Akka 开发的 Avro 数据存储,持久化功能还在开发中。

脚本示例(要求 JDK 1.8)

function onNameUpdated() {
    var age = record.get("age");
    what_is(age);

    what_is(http_get);
    var http_get_result = http_get.apply("http://localhost:8080/ping");
    java.lang.Thread.sleep(1000);
    what_is(http_get_result.value());

    what_is(http_post);
    var http_post_result = http_post.apply("http://localhost:8080/personinfo/put/2/age", "888");
    java.lang.Thread.sleep(1000);
    what_is(http_post_result.value());

    for (i = 0; i < fields.length; i++) {
        var field = fields[i];
        what_is(field._1);
        what_is(field._2);
    }
}

function what_is(value) {
    print(id + ": " + value);
}

onNameUpdated()
浏览 8
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报