ycsb load run elasticsearch



我正在尝试在ElasticSearch上运行基准测试软件yscb

我遇到的问题是加载后,数据似乎在清理过程中被删除。

我正在努力理解应该发生什么?

如果我注释掉清理,它仍然失败,因为它在"运行"阶段找不到索引。

有人可以解释一下YSCB应该发生什么吗?

我的意思是我认为它会有1. 加载阶段:加载 1,000,000 条记录2. 运行阶段:查询"加载阶段"加载的记录

谢谢

好的,

我在 YCSB 中运行 Couchbase 发现不应该删除数据。

查看 ElasticSearchClient 的 cleanup(),我认为没有理由删除文件(?

@Override
public void cleanup() throws DBException {
    if (!node.isClosed()) {
        client.close();
        node.stop();
        node.close();
    }
}

初始化如下:有什么原因不会在文件系统上持续存在吗?

public void init() throws DBException {
    // initialize OrientDB driver
    Properties props = getProperties();
    this.indexKey = props.getProperty("es.index.key", DEFAULT_INDEX_KEY);
    String clusterName = props.getProperty("cluster.name", DEFAULT_CLUSTER_NAME);
    Boolean newdb = Boolean.parseBoolean(props.getProperty("elasticsearch.newdb", "false"));
    Builder settings = settingsBuilder()
            .put("node.local", "true")
            .put("path.data", System.getProperty("java.io.tmpdir") + "/esdata")
            .put("discovery.zen.ping.multicast.enabled", "false")
            .put("index.mapping._id.indexed", "true")
            .put("index.gateway.type", "none")
            .put("gateway.type", "none")
            .put("index.number_of_shards", "1")
            .put("index.number_of_replicas", "0");

    //if properties file contains elasticsearch user defined properties
    //add it to the settings file (will overwrite the defaults).
    settings.put(props);
    System.out.println("ElasticSearch starting node = " + settings.get("cluster.name"));
    System.out.println("ElasticSearch node data path = " + settings.get("path.data"));
    node = nodeBuilder().clusterName(clusterName).settings(settings).node();
    node.start();
    client = node.client();
    if (newdb) {
        client.admin().indices().prepareDelete(indexKey).execute().actionGet();
        client.admin().indices().prepareCreate(indexKey).execute().actionGet();
    } else {
        boolean exists = client.admin().indices().exists(Requests.indicesExistsRequest(indexKey)).actionGet().isExists();
        if (!exists) {
            client.admin().indices().prepareCreate(indexKey).execute().actionGet();
        }
    }
}

谢谢

好的,

我发现如下

(非常感谢来自ElasticSearch-ers的任何帮助!!! 因为我显然做错了什么)

即使负载关闭,留下数据,"运行"仍然无法在启动时找到数据

ElasticSearch node data path = C:UsersPl_2AppDataLocalTemp/esdata
org.elasticsearch.action.NoShardAvailableActionException: [es.ycsb][0] No shard available for [[es.ycsb][usertable][user4283669858964623926]: routing [null]]
at org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.perform(TransportShardSingleOperationAction.java:140)
at org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.start(TransportShardSingleOperationAction.java:125)
at org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:72)
at org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:47)
at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:61)
at org.elasticsearch.client.node.NodeClient.execute(NodeClient.java:83)

github README 已更新。

看起来您需要使用以下方式指定:

-p path.home=<path to folder to persist data>

相关内容

  • 没有找到相关文章

最新更新