# Import schema from a HugeGraph instancebuilder.import_schema(from_hugegraph="test_graph").print_result()# Import schema from user-defined schemabuilder.import_schema(from_user_defined="xxx").print_result()# Import schema from an extraction resultbuilder.import_schema(from_extraction="xxx").print_result()
提取三元组:使用 extract_triples 方法从文本中提取三元组。
TEXT="Meet Sarah, a 30-year-old attorney, and her roommate, James, whom she's shared a home with since 2010."builder.extract_triples(TEXT).print_result()
首先点击 Initialize HugeGraph test data 按钮,初始化 HugeGraph 数据。
然后点击 Retrieval augmented generation 按钮,生成问题的答案。
4.1.2 通过代码构建 Graph RAG
完整代码
graph_rag=GraphRAG()result=(graph_rag.extract_keyword(text="Tell me about Al Pacino.").print_result().query_graph_for_rag(max_deep=2,max_items=30).print_result().synthesize_answer().print_result().run(verbose=True))
extract_keyword: 提取关键词, 并进行近义词扩展
graph_rag.extract_keyword(text="Tell me about Al Pacino.").print_result()
另外,如果我们希望能够在一个文件中管理除了 server 之外的其他 Hugegraph 相关的实例,我们也可以使用 docker-compose完成部署,使用命令 docker-compose up -d,(当然只配置 server 也是可以的)以下是一个样例的 docker-compose.yml:
推荐使用 release tag(如 1.2.0) 以获取稳定版。使用 latest tag 可以使用开发中的最新功能。
3.2 下载 tar 包
# use the latest version, here is 1.2.0 for examplewget https://downloads.apache.org/incubator/hugegraph/{version}/apache-hugegraph-incubating-{version}.tar.gz
tar zxf *hugegraph*.tar.gz
# download toolchain package, it includes loader + tool + hubble, please check the latest version (here is 1.2.0)wget https://downloads.apache.org/incubator/hugegraph/1.2.0/apache-hugegraph-toolchain-incubating-1.2.0.tar.gz
tar zxf *hugegraph-*.tar.gz
# enter the tool's packagecd *hugegraph*/*tool*
backend=hbaseserializer=hbase# hbase backend confighbase.hosts=localhosthbase.port=2181# Note: recommend to modify the HBase partition number by the actual/env data amount & RS amount before init store# it may influence the loading speed a lot#hbase.enable_partition=true#hbase.vertex_partitions=10#hbase.edge_partitions=30
初始化数据库(第一次启动时或在 conf/graphs/ 下手动添加了新配置时需要进行初始化)
cd *hugegraph-${version}bin/init-store.sh
启动 server
bin/start-hugegraph.sh
Starting HugeGraphServer...
Connecting to HugeGraphServer (http://127.0.0.1:8080/graphs)....OK
backend=mysqlserializer=mysqlstore=hugegraph# mysql backend configjdbc.driver=com.mysql.cj.jdbc.Driverjdbc.url=jdbc:mysql://127.0.0.1:3306jdbc.username=jdbc.password=jdbc.reconnect_max_times=3jdbc.reconnect_interval=3jdbc.ssl_mode=false
初始化数据库(第一次启动时或在 conf/graphs/ 下手动添加了新配置时需要进行初始化)
cd *hugegraph-${version}bin/init-store.sh
启动 server
bin/start-hugegraph.sh
Starting HugeGraphServer...
Connecting to HugeGraphServer (http://127.0.0.1:8080/graphs)....OK
version:'3'services:server:image:hugegraph/hugegraphcontainer_name:serverports:- 8080:8080hubble:image:hugegraph/hubblecontainer_name:hubbleports:- 8088:8088loader:image:hugegraph/loadercontainer_name:loader# mount your own data here# volumes:# - /path/to/data/file:/loader/file
wget https://downloads.apache.org/incubator/hugegraph/{version}/apache-hugegraph-toolchain-incubating-{version}.tar.gz
tar zxf *hugegraph*.tar.gz
2.3 克隆源码编译安装
克隆最新版本的 HugeGraph-Loader 源码包:
# 1. get from githubgit clone https://github.com/apache/hugegraph-toolchain.git
# 2. get from direct url (please choose the **latest release** version)wget https://downloads.apache.org/incubator/hugegraph/{version}/apache-hugegraph-toolchain-incubating-{version}-src.tar.gz
// 创建一些属性
schema.propertyKey("name").asText().ifNotExist().create();schema.propertyKey("age").asInt().ifNotExist().create();schema.propertyKey("city").asText().ifNotExist().create();schema.propertyKey("date").asText().ifNotExist().create();schema.propertyKey("price").asDouble().ifNotExist().create();// 创建 person 顶点类型,其拥有三个属性:name, age, city,主键是 name
schema.vertexLabel("person").properties("name","age","city").primaryKeys("name").ifNotExist().create();// 创建 software 顶点类型,其拥有两个属性:name, price,主键是 name
schema.vertexLabel("software").properties("name","price").primaryKeys("name").ifNotExist().create();// 创建 knows 边类型,这类边是从 person 指向 person 的
schema.edgeLabel("knows").sourceLabel("person").targetLabel("person").ifNotExist().create();// 创建 created 边类型,这类边是从 person 指向 software 的
schema.edgeLabel("created").sourceLabel("person").targetLabel("software").ifNotExist().create();
生产环境推荐使用 release tag(如 1.2.0) 稳定版。使用 latest tag 默认对应 master 最新代码。
2.2 下载 toolchain 二进制包
hubble项目在toolchain项目中,首先下载toolchain的 tar 包
wget https://downloads.apache.org/incubator/hugegraph/{version}/apache-hugegraph-toolchain-incubating-{version}.tar.gz
tar -xvf apache-hugegraph-toolchain-incubating-{version}.tar.gz
cd apache-hugegraph-toolchain-incubating-{version}.tar.gz/apache-hugegraph-hubble-incubating-{version}
运行hubble
bin/start-hubble.sh
随后我们可以看到
starting HugeGraphHubble ..............timed out with http status 5022023-08-30 20:38:34 [main][INFO ] o.a.h.HugeGraphHubble [] - Starting HugeGraphHubble v1.0.0 on cpu05 with PID xxx (~/apache-hugegraph-toolchain-incubating-1.0.0/apache-hugegraph-hubble-incubating-1.0.0/lib/hubble-be-1.0.0.jar started by $USER in ~/apache-hugegraph-toolchain-incubating-1.0.0/apache-hugegraph-hubble-incubating-1.0.0)...
2023-08-30 20:38:38 [main][INFO ] c.z.h.HikariDataSource [] - hugegraph-hubble-HikariCP - Start completed.
2023-08-30 20:38:41 [main][INFO ] o.a.c.h.Http11NioProtocol [] - Starting ProtocolHandler ["http-nio-0.0.0.0-8088"]2023-08-30 20:38:41 [main][INFO ] o.a.h.HugeGraphHubble [] - Started HugeGraphHubble in 7.379 seconds (JVM running for 8.499)
# 1. get from githubgit clone https://github.com/apache/hugegraph-toolchain.git
# 2. get from direct (e.g. here is 1.0.0, please choose the latest version)wget https://downloads.apache.org/incubator/hugegraph/1.0.0/apache-hugegraph-toolchain-incubating-1.0.0-src.tar.gz
deploy命令中有可选参数 -u,提供时会使用指定的下载地址替代默认下载地址下载 tar 包,并且将地址写入~/hugegraph-download-url-prefix文件中;之后如果不指定地址时,会优先从~/hugegraph-download-url-prefix指定的地址下载 tar 包;如果 -u 和~/hugegraph-download-url-prefix都没有时,会从默认下载地址进行下载
3.8 具体命令参数
各子命令的具体参数如下:
Usage: hugegraph [options][command][command options] Options:
--graph
Name of graph
Default: hugegraph
--password
Password of user
--timeout
Connection timeout
Default: 30 --trust-store-file
The path of client truststore file used when https protocol is enabled
--trust-store-password
The password of the client truststore file used when the https protocol
is enabled
--url
The URL of HugeGraph-Server
Default: http://127.0.0.1:8080
--user
Name of user
Commands:
graph-list List all graphs
Usage: graph-list
graph-get Get graph info
Usage: graph-get
graph-clear Clear graph schema and data
Usage: graph-clear [options] Options:
* --confirm-message, -c
Confirm message of graph clear is "I'm sure to delete all data".
(Note: include "") graph-mode-set Set graph mode
Usage: graph-mode-set [options] Options:
* --graph-mode, -m
Graph mode, include: [NONE, RESTORING, MERGING] Possible Values: [NONE, RESTORING, MERGING, LOADING] graph-mode-get Get graph mode
Usage: graph-mode-get
task-list List tasks
Usage: task-list [options] Options:
--limit
Limit number, no limit if not provided
Default: -1
--status
Status of task
task-get Get task info
Usage: task-get [options] Options:
* --task-id
Task id
Default: 0 task-delete Delete task
Usage: task-delete [options] Options:
* --task-id
Task id
Default: 0 task-cancel Cancel task
Usage: task-cancel [options] Options:
* --task-id
Task id
Default: 0 task-clear Clear completed tasks
Usage: task-clear [options] Options:
--force
Force to clear all tasks, cancel all uncompleted tasks firstly,
and delete all completed tasks
Default: false gremlin-execute Execute Gremlin statements
Usage: gremlin-execute [options] Options:
--aliases, -a
Gremlin aliases, valid format is: 'key1=value1,key2=value2...' Default: {} --bindings, -b
Gremlin bindings, valid format is: 'key1=value1,key2=value2...' Default: {} --file, -f
Gremlin Script file to be executed, UTF-8 encoded, exclusive to
--script
--language, -l
Gremlin script language
Default: gremlin-groovy
--script, -s
Gremlin script to be executed, exclusive to --file
gremlin-schedule Execute Gremlin statements as asynchronous job
Usage: gremlin-schedule [options] Options:
--bindings, -b
Gremlin bindings, valid format is: 'key1=value1,key2=value2...' Default: {} --file, -f
Gremlin Script file to be executed, UTF-8 encoded, exclusive to
--script
--language, -l
Gremlin script language
Default: gremlin-groovy
--script, -s
Gremlin script to be executed, exclusive to --file
backup Backup graph schema/data. If directory is on HDFS, use -D to
set HDFS params. For exmaple:
-Dfs.default.name=hdfs://localhost:9000
Usage: backup [options] Options:
--all-properties
All properties to be backup flag
Default: false --compress
compress flag
Default: true --directory, -d
Directory of graph schema/data, default is './{graphname}' in
local file system or '{fs.default.name}/{graphname}' in HDFS
--format
File format, valid is [json, text] Default: json
--huge-types, -t
Type of schema/data. Concat with ','if more than one. 'all' means
all vertices, edges and schema, in other words, 'all' equals with
'vertex,edge,vertex_label,edge_label,property_key,index_label' Default: [PROPERTY_KEY, VERTEX_LABEL, EDGE_LABEL, INDEX_LABEL, VERTEX, EDGE] --label
Vertex or edge label, only valid when type is vertex or edge
--log, -l
Directory of log
Default: ./logs
--properties
Vertex or edge properties to backup, only valid when type is
vertex or edge
Default: [] --retry
Retry times, default is 3 Default: 3 --split-size, -s
Split size of shard
Default: 1048576 -D
HDFS config parameters
Syntax: -Dkey=value
Default: {} schedule-backup Schedule backup task
Usage: schedule-backup [options] Options:
--backup-num
The number of latest backups to keep
Default: 3 * --directory, -d
The directory of backups stored
--interval
The interval of backup, format is: "a b c d e". 'a' means minute
(0 - 59), 'b' means hour (0 - 23), 'c' means day of month (1 -
31), 'd' means month (1 - 12), 'e' means day of week (0 - 6)(Sunday=0), "*" means all
Default: "0 0 * * *" dump Dump graph to files
Usage: dump [options] Options:
--directory, -d
Directory of graph schema/data, default is './{graphname}' in
local file system or '{fs.default.name}/{graphname}' in HDFS
--formatter, -f
Formatter to customize format of vertex/edge
Default: JsonFormatter
--log, -l
Directory of log
Default: ./logs
--retry
Retry times, default is 3 Default: 3 --split-size, -s
Split size of shard
Default: 1048576 -D
HDFS config parameters
Syntax: -Dkey=value
Default: {} restore Restore graph schema/data. If directory is on HDFS, use -D to
set HDFS params if needed. For
exmaple:-Dfs.default.name=hdfs://localhost:9000
Usage: restore [options] Options:
--clean
Whether to remove the directory of graph data after restored
Default: false --directory, -d
Directory of graph schema/data, default is './{graphname}' in
local file system or '{fs.default.name}/{graphname}' in HDFS
--huge-types, -t
Type of schema/data. Concat with ','if more than one. 'all' means
all vertices, edges and schema, in other words, 'all' equals with
'vertex,edge,vertex_label,edge_label,property_key,index_label' Default: [PROPERTY_KEY, VERTEX_LABEL, EDGE_LABEL, INDEX_LABEL, VERTEX, EDGE] --log, -l
Directory of log
Default: ./logs
--retry
Retry times, default is 3 Default: 3 -D
HDFS config parameters
Syntax: -Dkey=value
Default: {} migrate Migrate graph
Usage: migrate [options] Options:
--directory, -d
Directory of graph schema/data, default is './{graphname}' in
local file system or '{fs.default.name}/{graphname}' in HDFS
--graph-mode, -m
Mode used when migrating to target graph, include: [RESTORING,
MERGING] Default: RESTORING
Possible Values: [NONE, RESTORING, MERGING, LOADING] --huge-types, -t
Type of schema/data. Concat with ','if more than one. 'all' means
all vertices, edges and schema, in other words, 'all' equals with
'vertex,edge,vertex_label,edge_label,property_key,index_label' Default: [PROPERTY_KEY, VERTEX_LABEL, EDGE_LABEL, INDEX_LABEL, VERTEX, EDGE] --keep-local-data
Whether to keep the local directory of graph data after restored
Default: false --log, -l
Directory of log
Default: ./logs
--retry
Retry times, default is 3 Default: 3 --split-size, -s
Split size of shard
Default: 1048576 --target-graph
The name of target graph to migrate
Default: hugegraph
--target-password
The password of target graph to migrate
--target-timeout
The timeout to connect target graph to migrate
Default: 0 --target-trust-store-file
The trust store file of target graph to migrate
--target-trust-store-password
The trust store password of target graph to migrate
--target-url
The url of target graph to migrate
Default: http://127.0.0.1:8081
--target-user
The username of target graph to migrate
-D
HDFS config parameters
Syntax: -Dkey=value
Default: {} deploy Install HugeGraph-Server and HugeGraph-Studio
Usage: deploy [options] Options:
* -p
Install path of HugeGraph-Server and HugeGraph-Studio
-u
Download url prefix path of HugeGraph-Server and HugeGraph-Studio
* -v
Version of HugeGraph-Server and HugeGraph-Studio
start-all Start HugeGraph-Server and HugeGraph-Studio
Usage: start-all [options] Options:
* -p
Install path of HugeGraph-Server and HugeGraph-Studio
* -v
Version of HugeGraph-Server and HugeGraph-Studio
clear Clear HugeGraph-Server and HugeGraph-Studio
Usage: clear [options] Options:
* -p
Install path of HugeGraph-Server and HugeGraph-Studio
stop-all Stop HugeGraph-Server and HugeGraph-Studio
Usage: stop-all
help Print usage
Usage: help
kubectl get pod -n hugegraph-computer-operator-system
NAME READY STATUS RESTARTS AGE
hugegraph-computer-operator-controller-manager-58c5545949-jqvzl 1/1 Running 0 15h
hugegraph-computer-operator-etcd-28lm67jxk5 1/1 Running 0 15h
cat <<EOF | kubectl apply --filename -apiVersion:hugegraph.apache.org/v1kind:HugeGraphComputerJobmetadata:namespace:hugegraph-computer-operator-systemname:&jobNamepagerank-samplespec:jobId:*jobNamealgorithmName:page_rankimage:hugegraph/hugegraph-computer:latest# algorithm image urljarFile:/hugegraph/hugegraph-computer/algorithm/builtin-algorithm.jar# algorithm jar pathpullPolicy:AlwaysworkerCpu:"4"workerMemory:"4Gi"workerInstances:5computerConf:job.partitions_count:"20"algorithm.params_class:org.apache.hugegraph.computer.algorithm.centrality.pagerank.PageRankParamshugegraph.url:http://${hugegraph-server-host}:${hugegraph-server-port}# hugegraph server urlhugegraph.name:hugegraph# hugegraph graph nameEOF
3.2.6 显示作业
kubectl get hcjob/pagerank-sample -n hugegraph-computer-operator-system
NAME JOBID JOBSTATUS
pagerank-sample pagerank-sample RUNNING
3.2.7 显示节点日志
# Show the master logkubectl logs -l component=pagerank-sample-master -n hugegraph-computer-operator-system
# Show the worker logkubectl logs -l component=pagerank-sample-worker -n hugegraph-computer-operator-system
# Show diagnostic log of a job# 注意: 诊断日志仅在作业失败时存在,并且只会保存一小时。kubectl get event --field-selector reason=ComputerJobFailed --field-selector involvedObject.name=pagerank-sample -n hugegraph-computer-operator-system
3.2.8 显示作业的成功事件
NOTE: it will only be saved for one hour
kubectl get event --field-selector reason=ComputerJobSucceed --field-selector involvedObject.name=pagerank-sample -n hugegraph-computer-operator-system
importjava.io.IOException;importjava.util.Iterator;importjava.util.List;importorg.apache.hugegraph.driver.GraphManager;importorg.apache.hugegraph.driver.GremlinManager;importorg.apache.hugegraph.driver.HugeClient;importorg.apache.hugegraph.driver.SchemaManager;importorg.apache.hugegraph.structure.constant.T;importorg.apache.hugegraph.structure.graph.Edge;importorg.apache.hugegraph.structure.graph.Path;importorg.apache.hugegraph.structure.graph.Vertex;importorg.apache.hugegraph.structure.gremlin.Result;importorg.apache.hugegraph.structure.gremlin.ResultSet;publicclassSingleExample{publicstaticvoidmain(String[]args)throwsIOException{// If connect failed will throw a exception.HugeClienthugeClient=HugeClient.builder("http://localhost:8080","hugegraph").build();SchemaManagerschema=hugeClient.schema();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();schema.vertexLabel("person").properties("name","age","city").primaryKeys("name").ifNotExist().create();schema.vertexLabel("software").properties("name","lang","price").primaryKeys("name").ifNotExist().create();schema.indexLabel("personByCity").onV("person").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();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").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();GraphManagergraph=hugeClient.graph();Vertexmarko=graph.addVertex(T.LABEL,"person","name","marko","age",29,"city","Beijing");Vertexvadas=graph.addVertex(T.LABEL,"person","name","vadas","age",27,"city","Hongkong");Vertexlop=graph.addVertex(T.LABEL,"software","name","lop","lang","java","price",328);Vertexjosh=graph.addVertex(T.LABEL,"person","name","josh","age",32,"city","Beijing");Vertexripple=graph.addVertex(T.LABEL,"software","name","ripple","lang","java","price",199);Vertexpeter=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);GremlinManagergremlin=hugeClient.gremlin();System.out.println("==== Path ====");ResultSetresultSet=gremlin.gremlin("g.V().outE().path()").execute();Iterator<Result>results=resultSet.iterator();results.forEachRemaining(result->{System.out.println(result.getObject().getClass());Objectobject=result.getObject();if(objectinstanceofVertex){System.out.println(((Vertex)object).id());}elseif(objectinstanceofEdge){System.out.println(((Edge)object).id());}elseif(objectinstanceofPath){List<Object>elements=((Path)object).objects();elements.forEach(element->{System.out.println(element.getClass());System.out.println(element);});}else{System.out.println(object);}});hugeClient.close();}}
4.3.2 BatchExample
importjava.util.ArrayList;importjava.util.List;importorg.apache.hugegraph.driver.GraphManager;importorg.apache.hugegraph.driver.HugeClient;importorg.apache.hugegraph.driver.SchemaManager;importorg.apache.hugegraph.structure.graph.Edge;importorg.apache.hugegraph.structure.graph.Vertex;publicclassBatchExample{publicstaticvoidmain(String[]args){// If connect failed will throw a exception.HugeClienthugeClient=HugeClient.builder("http://localhost:8080","hugegraph").build();SchemaManagerschema=hugeClient.schema();schema.propertyKey("name").asText().ifNotExist().create();schema.propertyKey("age").asInt().ifNotExist().create();schema.propertyKey("lang").asText().ifNotExist().create();schema.propertyKey("date").asDate().ifNotExist().create();schema.propertyKey("price").asInt().ifNotExist().create();schema.vertexLabel("person").properties("name","age").primaryKeys("name").ifNotExist().create();schema.vertexLabel("person").properties("price").nullableKeys("price").append();schema.vertexLabel("software").properties("name","lang","price").primaryKeys("name").ifNotExist().create();schema.indexLabel("softwareByPrice").onV("software").by("price").range().ifNotExist().create();schema.edgeLabel("knows").link("person","person").properties("date").ifNotExist().create();schema.edgeLabel("created").link("person","software").properties("date").ifNotExist().create();schema.indexLabel("createdByDate").onE("created").by("date").secondary().ifNotExist().create();// get schema object by nameSystem.out.println(schema.getPropertyKey("name"));System.out.println(schema.getVertexLabel("person"));System.out.println(schema.getEdgeLabel("knows"));System.out.println(schema.getIndexLabel("createdByDate"));// list all schema objectsSystem.out.println(schema.getPropertyKeys());System.out.println(schema.getVertexLabels());System.out.println(schema.getEdgeLabels());System.out.println(schema.getIndexLabels());GraphManagergraph=hugeClient.graph();Vertexmarko=newVertex("person").property("name","marko").property("age",29);Vertexvadas=newVertex("person").property("name","vadas").property("age",27);Vertexlop=newVertex("software").property("name","lop").property("lang","java").property("price",328);Vertexjosh=newVertex("person").property("name","josh").property("age",32);Vertexripple=newVertex("software").property("name","ripple").property("lang","java").property("price",199);Vertexpeter=newVertex("person").property("name","peter").property("age",35);EdgemarkoKnowsVadas=newEdge("knows").source(marko).target(vadas).property("date","2016-01-10");EdgemarkoKnowsJosh=newEdge("knows").source(marko).target(josh).property("date","2013-02-20");EdgemarkoCreateLop=newEdge("created").source(marko).target(lop).property("date","2017-12-10");EdgejoshCreateRipple=newEdge("created").source(josh).target(ripple).property("date","2017-12-10");EdgejoshCreateLop=newEdge("created").source(josh).target(lop).property("date","2009-11-11");EdgepeterCreateLop=newEdge("created").source(peter).target(lop).property("date","2017-03-24");List<Vertex>vertices=newArrayList<>();vertices.add(marko);vertices.add(vadas);vertices.add(lop);vertices.add(josh);vertices.add(ripple);vertices.add(peter);List<Edge>edges=newArrayList<>();edges.add(markoKnowsVadas);edges.add(markoKnowsJosh);edges.add(markoCreateLop);edges.add(joshCreateRipple);edges.add(joshCreateLop);edges.add(peterCreateLop);vertices=graph.addVertices(vertices);vertices.forEach(vertex->System.out.println(vertex));edges=graph.addEdges(edges,false);edges.forEach(edge->System.out.println(edge));hugeClient.close();}}