diff --git a/job/gatherNeoFiles.sh b/job/gatherNeoFiles.sh new file mode 100755 index 0000000..e12cdcd --- /dev/null +++ b/job/gatherNeoFiles.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +rm -rf ./graph.db +mkdir graph.db/ + +TO=./graph.db/ +FROM=${1} +hadoop fs -get ${FROM}/neostore ${TO} +hadoop fs -get ${FROM}/neostore.id ${TO} +hadoop fs -get ${FROM}/neostore.nodestore.db.id ${TO} +hadoop fs -get ${FROM}/neostore.relationshipstore.db.id ${TO} +hadoop fs -get ${FROM}/neostore.relationshiptypestore.db ${TO} +hadoop fs -get ${FROM}/neostore.relationshiptypestore.db.id ${TO} +hadoop fs -get ${FROM}/neostore.relationshiptypestore.db.names ${TO} +hadoop fs -get ${FROM}/neostore.relationshiptypestore.db.names.id ${TO} + +hadoop fs -get ${FROM}/properties/neostore.propertystore.db.* ${TO} + +hadoop fs -cat ${FROM}/neostore.nodestore.db/part-r-* > ${TO}/neostore.nodestore.db +hadoop fs -cat ${FROM}/neostore.relationshipstore.db/part-r-* > ${TO}/neostore.relationshipstore.db + +hadoop fs -cat ${FROM}/nodeproperties/propertystore.db/props-r-* ${FROM}/edgeproperties/propertystore.db/props-r-* ${FROM}/properties/neostore.propertystore.db.footer > ${TO}/neostore.propertystore.db +hadoop fs -cat ${FROM}/properties/neostore.propertystore.db.strings.header ${FROM}/nodeproperties/propertystore.db/strings-r-* ${FROM}/edgeproperties/propertystore.db/strings-r-* ${FROM}/properties/neostore.propertystore.db.strings.footer > ${TO}/neostore.propertystore.db.strings + +rm ${TO}/*.footer +rm ${TO}/*.header +exit diff --git a/job/pom.xml b/job/pom.xml index 079e7ad..7b79101 100644 --- a/job/pom.xml +++ b/job/pom.xml @@ -36,6 +36,11 @@ commons-io 1.3.2 + + commons-lang + commons-lang + 2.6 + junit @@ -43,6 +48,12 @@ 4.8 test + + org.apache.hadoop + hadoop-mrunit + 0.20.2-cdh3u2 + test + org.easymock easymock @@ -57,7 +68,7 @@ org.neo4j neo4j - 1.6 + 1.8.M05