Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 1.6.0版本hubble,顶点大于1个时,执行g.V() 前端会报错 #340

Open
1 task done
hanshuai9307 opened this issue Jan 5, 2022 · 12 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@hanshuai9307
Copy link

Bug Type (问题类型)

exception / error (异常报错)

Before submit

Environment (环境信息)

  • Server Version: v0.12.0
  • Hubble Version: v1.6.0
  • Data Size: xx vertices, xx edges
    image

Expected & Actual behavior (期望与实际表现)

期望:执行g.v(),返回正常数据

Vertex/Edge example (问题点 / 边数据举例)

No response

Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)

No response

@hanshuai9307 hanshuai9307 added the bug Something isn't working label Jan 5, 2022
@imbajin
Copy link
Contributor

imbajin commented Jan 6, 2022

我这边没有暂时复现成功, 你那边可以试试marko 之类的测试数据, 或者给一下你那边查询失败的测试数据么?
image

两个数据集都没有出现.

image

或者你那边有0.11版的 server 么, 低版本也会出现这个提示报错么, 还是只有0.12的 server 有

@hanshuai9307
Copy link
Author

下面同样的数据在0.11的server+1.5的hubble查询正常,在0.12的server+1.6的hubble就会有这个问题
package com.example.hugegraphdemo.example;

/**

  • ClassName:SingleExample
  • Package:com.example.hugegraphdemo.util
  • Description:
  • @Date:2021/7/13 15:30
  • @Aurhor: HS
    */

import java.io.IOException;
import java.util.Iterator;
import java.util.List;

import com.baidu.hugegraph.driver.GraphManager;
import com.baidu.hugegraph.driver.GremlinManager;
import com.baidu.hugegraph.driver.HugeClient;
import com.baidu.hugegraph.driver.SchemaManager;
import com.baidu.hugegraph.structure.constant.T;
import com.baidu.hugegraph.structure.graph.Edge;
import com.baidu.hugegraph.structure.graph.Path;
import com.baidu.hugegraph.structure.graph.Vertex;
import com.baidu.hugegraph.structure.gremlin.Result;
import com.baidu.hugegraph.structure.gremlin.ResultSet;

public class SingleExample {

public static void main(String[] args) throws IOException {
    // If connect failed will throw a exception.
    HugeClient hugeClient = HugeClient.builder("http://192.168.xxx.xx:8080",
            "hugegraph")
            .build();
    hugeClient.graphs().clearGraph("hugegraph","I'm sure to delete all data");
    //元数据
    SchemaManager schema = hugeClient.schema();
    //PropertyKey(属性类型)用来规范顶点和边的属性的约束,暂不支持定义属性的属性。
    schema.propertyKey("name").asText().ifNotExist().create();
    schema.propertyKey("age").asInt().ifNotExist().create();
    schema.propertyKey("city").asText().ifNotExist().create();
    schema.propertyKey("weight").asDouble().ifNotExist().create();
    schema.propertyKey("lang").asText().ifNotExist().create();
    schema.propertyKey("date").asDate().ifNotExist().create();
    schema.propertyKey("price").asInt().ifNotExist().create();
    //VertexLabel(顶点类型)用来定义顶点类型,描述顶点的约束信息:
    schema.vertexLabel("person")
            //定义顶点的属性,传入的参数是 PropertyKey 的 name
            .properties("name", "age", "city","name", "age", "city")
            .primaryKeys("name")
            .ifNotExist()
            .create();

    schema.vertexLabel("software")
            .properties("name", "lang", "price")
            .primaryKeys("name")
            .ifNotExist()
            .create();
    //IndexLabel(索引标签)用来定义索引类型,描述索引的约束信息,主要是为了方便查询。
    schema.indexLabel("personByCity")
            .onV("person")//VertexLabel
            .by("city")
            .secondary()
            .ifNotExist()
            .create();

    schema.indexLabel("personByAgeAndCity")
            .onV("person")
            .by("age", "city")
            .secondary()
            .ifNotExist()
            .create();

    schema.indexLabel("softwareByPrice")
            .onV("software")
            .by("price")
            .range()
            .ifNotExist()
            .create();
    //EdgeLabel(边类型)用来定义边类型,描述边的约束信息。
    schema.edgeLabel("knows")
            .sourceLabel("person")
            .targetLabel("person")
            .properties("date", "weight")
            .ifNotExist()
            .create();

    schema.edgeLabel("created")
            .sourceLabel("person").targetLabel("software")
            .properties("date", "weight")
            .ifNotExist()
            .create();

    schema.indexLabel("createdByDate")
            .onE("created")//EdgeLabel
            .by("date")
            .secondary()
            .ifNotExist()
            .create();

    schema.indexLabel("createdByWeight")
            .onE("created")
            .by("weight")
            .range()
            .ifNotExist()
            .create();

    schema.indexLabel("knowsByWeight")
            .onE("knows")
            .by("weight")
            .range()
            .ifNotExist()
            .create();
    //图数据
    GraphManager graph = hugeClient.graph();
        Vertex marko = graph.addVertex(T.label, "person", "name", "marko",
            "age", 29, "city", "Beijing");
    Vertex vadas = graph.addVertex(T.label, "person", "name", "vadas",
            "age", 27, "city", "Hongkong");
    Vertex lop = graph.addVertex(T.label, "software", "name", "lop",
            "lang", "java", "price", 328);
    Vertex josh = graph.addVertex(T.label, "person", "name", "josh",
            "age", 32, "city", "Beijing");
    Vertex ripple = graph.addVertex(T.label, "software", "name", "ripple",
            "lang", "java", "price", 199);
    Vertex peter = graph.addVertex(T.label, "person", "name", "peter",
            "age", 35, "city", "Shanghai");

    marko.addEdge("knows", vadas, "date", "2016-01-10", "weight", 0.5);
    marko.addEdge("knows", josh, "date", "2013-02-20", "weight", 1.0);
    marko.addEdge("created", lop, "date", "2017-12-10", "weight", 0.4);
    josh.addEdge("created", lop, "date", "2009-11-11", "weight", 0.4);
    josh.addEdge("created", ripple, "date", "2017-12-10", "weight", 1.0);
    peter.addEdge("created", lop, "date", "2017-03-24", "weight", 0.2);

    GremlinManager gremlin = hugeClient.gremlin();
    System.out.println("==== Path ====");
    //ResultSet resultSet = gremlin.gremlin("g.V().outE().path()").execute();
    ResultSet resultSet = gremlin.gremlin("g.V(\"1:josh\").out(\"created\").in().out(\"knows\")").execute();
    Iterator<Result> results = resultSet.iterator();
    results.forEachRemaining(result -> {
        System.out.println(result.getObject().getClass());
        Object object = result.getObject();
        if (object instanceof Vertex) {
            System.out.println("============Vertex============"+((Vertex) object).id());
        } else if (object instanceof Edge) {
            System.out.println("============Edge============"+((Edge) object).id());
        } else if (object instanceof Path) {
            List<Object> elements = ((Path) object).objects();
            elements.forEach(element -> {
                System.out.println(element.getClass());
                System.out.println("============element============"+element);
            });
        } else {
            System.out.println("============object============"+object);
        }
    });

    hugeClient.close();
}

}

微信截图_20220106161254

正常

@imbajin
Copy link
Contributor

imbajin commented Jan 6, 2022

似乎是一样的测试数据. 这样你先clear 清空 0.12的图, 然后直接在 hubble 界面执行下面的语句一键导入 (不需要走 java-client)

然后看看能否复现, 这样操作的步骤完全一致, 避免有环境不同. (下面的语句直接一次性粘贴到 hubble 执行即可, 数据也有了)

graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);graph.schema().propertyKey('name').asText().ifNotExist().create();graph.schema().propertyKey('age').asInt().ifNotExist().create();graph.schema().propertyKey('city').asText().ifNotExist().create();graph.schema().propertyKey('weight').asDouble().ifNotExist().create();graph.schema().propertyKey('lang').asText().ifNotExist().create();graph.schema().propertyKey('date').asText().ifNotExist().create();graph.schema().propertyKey('price').asInt().ifNotExist().create();graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').nullableKeys('age').ifNotExist().create();graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').nullableKeys('price').ifNotExist().create();graph.schema().indexLabel('personByCity').onV('person').by('city').secondary().ifNotExist().create();graph.schema().indexLabel('personByAge').onV('person').by('age').range().ifNotExist().create();graph.schema().indexLabel('softwareByPrice').onV('software').by('price').range().ifNotExist().create();graph.schema().edgeLabel('knows').multiTimes().sourceLabel('person').targetLabel('person').properties('date', 'weight').sortKeys('date').nullableKeys('weight').ifNotExist().create();graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'weight').nullableKeys('weight').ifNotExist().create();graph.schema().indexLabel('createdByDate').onE('created').by('date').secondary().ifNotExist().create();graph.schema().indexLabel('createdByWeight').onE('created').by('weight').range().ifNotExist().create();graph.schema().indexLabel('knowsByWeight').onE('knows').by('weight').range().ifNotExist().create();marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing');vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong');lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328);josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing');ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199);peter = graph.addVertex(T.label, 'person', 'name', 'peter', 'age', 35, 'city', 'Shanghai');marko.addEdge('knows', vadas, 'date', '20160110', 'weight', 0.5);marko.addEdge('knows', josh, 'date', '20130220', 'weight', 1.0);marko.addEdge('created', lop, 'date', '20171210', 'weight', 0.4);josh.addEdge('created', lop, 'date', '20091111', 'weight', 0.4);josh.addEdge('created', ripple, 'date', '20171210', 'weight', 1.0);peter.addEdge('created', lop, 'date', '20170324', 'weight', 0.2);

另外, 麻烦看看你提示报错的地方时 (v.1.6), hubble 的日志或者是 server 的日志里是否有相关报错信息, 以及前端的http 请求返回里是否有相关报错 (有可以截图一下蟹蟹)

@hanshuai9307
Copy link
Author

22

111111

@imbajin
Copy link
Contributor

imbajin commented Jan 6, 2022

多谢, 这个是按上面发你的 schema 语句执行之后复现的么? 还是你之前 client 方式导入的, 可以补充一下

另外执行语句前最好能把图清空一下, 避免干扰

@hanshuai9307
Copy link
Author

image
hubble不支持一次执行这么长的语句吧

@hanshuai9307
Copy link
Author

原来的图数据已清,按照前面按上面发的 schema 语句执行之后,还是能复现
image

@imbajin
Copy link
Contributor

imbajin commented Jan 7, 2022

多谢反馈, 语句我们这边执行都是正常的, 我们再看看, 你那有其他的机器或环境也可以试试换一个看看.

@hanshuai9307
Copy link
Author

hanshuai9307 commented Jan 7, 2022 via email

@imbajin
Copy link
Contributor

imbajin commented Jan 7, 2022

对了, 你能看看报错的时候 0.12 的 server 那边日志里有任何报错提示么. 另外, 你试试用 1.6 的 hubble 链接 0.11 的 server 看看, 是否会出现报错 (直接链接就行)

这样缩小一下异常导致的范围

@hanshuai9307
Copy link
Author

hanshuai9307 commented Jan 7, 2022 via email

@imbajin
Copy link
Contributor

imbajin commented Jan 7, 2022

github 的邮件回复好像不能正确显示附件, 有空的时候可以 PC 端 attach 一下, github 现在支持传入文件包了. (或者用 gist 附带也可以) 那看起来应该是 server 这边的问题, 可能 hubble 只是转发了一下错误

不过奇怪的是, 我用社区的 0.12.0 rocksdb 后端, 默认一键初始化启动, 然后导数据没法复现, 你那边后端是有区别么?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants