neoxygen / neo4j-neogen

Easy generation of dummy Neo4j graphs with PHP
MIT License
18 stars 12 forks source link

undefined method Neoxygen\Neogen\Neogen::generateGraphFromCypher() #14

Open FelikZ opened 9 years ago

FelikZ commented 9 years ago

Using an example from README, I got a fatal error:

$ ./bin/neogen generate-cypher --source="pattern.cypher" --export="export.gen"
Locating fixtures file
PHP Fatal error:  Call to undefined method Neoxygen\Neogen\Neogen::generateGraphFromCypher() in /app/src/Console/GenerateCypherCommand.php on line 99

Fatal error: Call to undefined method Neoxygen\Neogen\Neogen::generateGraphFromCypher() in /app/src/Console/GenerateCypherCommand.php on line 99

It looks like generateGraphFromCypher function really do not exist:

$ find . -name "*.php" | xargs egrep 'generateGraphFromCypher'
./src/Console/GenerateCypherCommand.php:        $graph = $gen->generateGraphFromCypher($this->source);
./tests_old/Neoxygen/Neogen/Tests/Integration/IntegrationTest.php:        $schema = $gen->generateGraphFromCypher($pattern);
./tests_old/Neoxygen/Neogen/Tests/Integration/StandardCypherConverterTest.php:        $graph = $gen->generateGraphFromCypher($p);
./tests_old/Neoxygen/Neogen/Tests/Integration/CypherStatementsConverterTest.php:        $graph = $gen->generateGraphFromCypher($p);
./tests_old/Neoxygen/Neogen/Tests/Integration/GraphJsonTest.php:        $graph = $gen->generateGraphFromCypher($p);
./tests_old/Neoxygen/Neogen/Tests/Integration/GraphJsonTest.php:        $graph = $gen->generateGraphFromCypher($p);
./tests_old/Neoxygen/Neogen/Tests/Integration/GraphJsonTest.php:        $graph = $gen->generateGraphFromCypher($p);
./tests_old/Neoxygen/Neogen/Tests/ProcessorTest.php:        $schema = $gen->generateGraphFromCypher($p);
FelikZ commented 9 years ago

So I tried to use version tag 0.5.9 but it probably doesn't support a lot of data:

$ docker exec -ti neogen-php ./bin/neogen generate-cypher --source="pattern.cypher" --export="1.cql"
Locating fixtures file
PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 72 bytes) in /app/src/Processor/VertEdgeProcessor.php on line 49

pattern.cypher

(n:i {name: name} *200000)-[:b *n..1]->(c:c {name: company} *250000)
(n2:i {name: name} *100000)-[:suggested *n..1]->(c)
(c)-[:b *n..1]->(root:target {type: randomLetter} *1)

(n3:i {name: name} *200000)-[:b *n..1]->(c2:c {name: company} *250000)
(c2)-[:b *n..1]->(root2:source {type: randomLetter} *1)
ikwattro commented 9 years ago

Yes, it depends on your processor and memory for such use case.

FelikZ commented 9 years ago

@ikwattro Does this behavior is changed since 1.x.x version, so I it generate data in batches without eating all memory?

ikwattro commented 9 years ago

This will be implemented, currently we have a forked version that we use in enterprise world where it batches. This system uses 3 rabbitmq queues because if you flush the memory you will loose the references for creating the relationships. The goal is to provide all the system with a docker stack, this may require some weeks to release the whole setup, currently I am focused of releasing the new graphgen online version. Le 11 mai 2015 5:42 PM, Alexey Shevchenko notifications@github.com a écrit :@ikwattro Does this behavior is changed since 1.x.x version, so I it generate data in batches without eating all memory?

—Reply to this email directly or view it on GitHub.

flekschas commented 9 years ago

Is there a plan to re-introduce generateGraphFromCypher()?