0

I am using Mazerunner docker given by kenny Bastani to integrate neo4j and spark-graphx. I am able to process Movie graph that is given. Now I want to pull my own Twitter graph to Mazerunner docker. Can any one tell me how to pull a new graph to mazerunner docker. Thanks in advance.

-Narendra

Kenny Bastani
  • 3,268
  • 15
  • 20
Naren
  • 457
  • 2
  • 10
  • 19

1 Answers1

1

There are a few ways to do this. Normally you would be able to mount a volume from your Docker host as the data directory for Neo4j.

Unfortunately there is a defect in Neo4j 2.2 that prevents this. You can find more details here: https://github.com/kbastani/docker-neo4j/issues/4

In order to work around this issue you can copy your graph.db directory from your host machine to the docker-neo4j container.

Run the steps below from the terminal. After you've started HDFS and Mazerunner containers, then start the docker-neo4j container and replace the user specific information with your own, i.e. /Users/User/neo4j-community-2.2.1/data. After the container starts, you will have root access inside the container via the shell. Run the next two commands to copy your mounted host volume's graph.db directory (the database directory you are importing) to the local volume.

[ ~ ]$ docker run -ti -p 7474:7474 -v /Users/User/neo4j-community-2.2.1/data:/opt/data-copy --name graphdb --link mazerunner:mazerunner --link hdfs:hdfs kbastani/docker-neo4j /bin/bash

[ root@f4800317575d:/var/lib/neo4j ]$ cp -r /opt/data-copy/graph.db /opt/data

[ root@f4800317575d:/var/lib/neo4j ]$ bin/neo4j start

Keep in mind that you'll need to copy the container's /opt/data directory back to the host system in order to make sure it is safe.

Hopefully the Neo4j 2.2 issue will be resolved soon.

Kenny Bastani
  • 3,268
  • 15
  • 20