当前位置:网站首页>Integration of ongdb graph database and spark
Integration of ongdb graph database and spark
2022-07-04 16:40:00 【Ma Chao's blog】
Quickly explore graph data and graph calculation
Graph computing is the study of anything in the objective world and the relationship between things , Make a complete description of it 、 A technique of calculation and analysis . Graph computation depends on the underlying graph data model , Calculate and analyze on the basis of graph data model Spark Is a very popular and mature and stable computing engine . The following article starts from ONgDB And Spark Start of integration 【 Use TensorFlow The scheme of analyzing graph data with equal depth learning framework is beyond the scope of this paper , Only from the field of graph database Spark The integration of is a popular solution , You can do some calculation and pre training of basic map data and submit it to TensorFlow】, Introduce the specific integration implementation scheme . Downloading the source code of the case project can help novices quickly start exploring , No need to step on the pit . The general process is first Spark Cluster integration diagram database plug-in , Then use specific API Build graph data analysis code .
stay Spark Cluster installation neo4j-spark plug-in unit
- Download components
https://github.com/ongdb-contrib/neo4j-spark-connector/releases/tag/2.4.1-M1
- Download components on spark Installation directory jars Folder
E:\software\ongdb-spark\spark-2.4.0-bin-hadoop2.7\jars
The basic component depends on information
- Version information
Spark 2.4.0 http://archive.apache.org/dist/spark/spark-2.4.0/
ONgDB 3.5.x
Neo4j-Java-Driver 1.7.5
Scala 2.11
JDK 1.8
hadoop-2.7.7
https://mirrors.tuna.tsinghua.edu.cn/apache/hadoop/common/
neo4j-spark-connector-full-2.4.1-M1 https://github.com/neo4j-contrib/neo4j-spark-connector
- Download the installation package for
hadoop-2.7.7
spark-2.4.0-bin-hadoop2.7
winutils
neo4j-spark-connector-full-2.4.1-M1 【 hold jar Put the bag in spark/jars Folder 】
scala-2.11.12
Create test data
UNWIND range(1,100) as id
CREATE (p:Person {id:id}) WITH collect(p) as people
UNWIND people as p1
UNWIND range(1,10) as friend
WITH p1, people[(p1.id + friend) % size(people)] as p2
CREATE (p1)-[:KNOWS {years: abs(p2.id - p2.id)}]->(p2)
FOREACH (x in range(1,1000000) | CREATE (:Person {name:"name"+x, age: x%100}));
UNWIND range(1,1000000) as x
MATCH (n),(m) WHERE id(n) = x AND id(m)=toInt(rand()*1000000)
CREATE (n)-[:KNOWS]->(m);
remarks
- Case project 【 To avoid stepping on this under the pit Java-Scala The mixed case project can be referred to 】
https://github.com/ongdb-contrib/ongdb-spark-java-scala-example
If there is a problem downloading the dependent package, please check whether the following website can be downloaded normally Spark dependent JAR package
http://dl.bintray.com/spark-packages/maven
- Screenshot of case project 【 Start locally before use Spark】
- Please read the original text for the installation of relevant components and other references
边栏推荐
- 函數式接口,方法引用,Lambda實現的List集合排序小工具
- Using celery in projects
- What encryption algorithm is used for the master password of odoo database?
- MFC implementation of ACM basic questions encoded by the number of characters
- Working group and domain analysis of Intranet
- Application and Optimization Practice of redis in vivo push platform
- What is torch NN?
- Variable cannot have type 'void'
- ~88 running people practice
- 基于check-point实现图数据构建任务
猜你喜欢
[North Asia data recovery] a database data recovery case where the partition where the database is located is unrecognized due to the RAID disk failure of HP DL380 server
[tutorial] yolov5_ DeepSort_ The whole process of pytoch target tracking and detection
Communication mode based on stm32f1 single chip microcomputer
Common knowledge of unity Editor Extension
TypeError: list indices must be integers or slices, not str
L1-072 scratch lottery
DIY a low-cost multi-functional dot matrix clock!
How to decrypt worksheet protection password in Excel file
Actual combat | use composite material 3 in application
The new generation of domestic ORM framework sagacity sqltoy-5.1.25 release
随机推荐
Using celery in projects
[tutorial] yolov5_ DeepSort_ The whole process of pytoch target tracking and detection
Redis: SDS source code analysis
Recommend 10 excellent mongodb GUI tools
Function test - knowledge points and common interview questions
Detailed process of DC-2 range construction and penetration practice (DC range Series)
Hair growth shampoo industry Research Report - market status analysis and development prospect forecast
Accounting regulations and professional ethics [11]
Principle and general steps of SQL injection
Intranet penetrating FRP: hidden communication tunnel technology
一图看懂ThreadLocal
PR FAQ: how to set PR vertical screen sequence?
Opencv learning -- arithmetic operation of image of basic operation
@EnableAspectAutoJAutoProxy_ Exposeproxy property
Explore mongodb - mongodb compass installation, configuration and usage introduction | mongodb GUI
After the eruption of Tonga volcano, we analyzed the global volcanic distribution and found that the area with the most volcanoes is here!
Application of clock wheel in RPC
话里话外:流程图绘制初级:六大常见错误
Interface test - knowledge points and common interview questions
ECCV 2022放榜了:1629篇论文中选,录用率不到20%