neo4j batch import cache type issue - neo4j

I am pretty new to neo4j and facing the following issue. When executing the batch-import (Micheal Hunger - batch importer) command I get this error about the cache_type settings. It is recommending gcr settings, but these are only available in the enterprise edition.
Help is very appreciated, thanks.
System Info:
win7 32bit 4G RAM (3G usable), jre7, neo4j-community-1.8.2
Data: (very small test data)
nodes.csv (tab-separated) 13 nodes
rels.csv (tab-separated) 16 relations
Execution and Error:
C:\Daten\Studium\LV HU Berlin\SS 2013\Datamanagement and BI\Neuer Ordner>java -server -Xmx1G -jar target\batch-import-jar-with-dependencies.jar target\db nodes.csv rels.csv
Using Existing Configuration File
Exception in thread "main" java.lang.IllegalArgumentException: Bad value 'none' for setting 'cache_type': must
be one of [gcr]
at org.neo4j.helpers.Settings$DefaultSetting.apply(Settings.java:788)
at org.neo4j.helpers.Settings$DefaultSetting.apply(Settings.java:708)
at org.neo4j.graphdb.factory.GraphDatabaseSetting$SettingWrapper.apply(GraphDatabaseSetting.ja va:215)
at org.neo4j.graphdb.factory.GraphDatabaseSetting$SettingWrapper.apply(GraphDatabaseSetting.ja va:189)
at org.neo4j.kernel.configuration.ConfigurationValidator.validate(ConfigurationValidator.java: 50)
at org.neo4j.kernel.configuration.Config.applyChanges(Config.java:121)
at org.neo4j.kernel.configuration.Config.<init>(Config.java:89)
at org.neo4j.kernel.configuration.Config.<init>(Config.java:79)
at org.neo4j.unsafe.batchinsert.BatchInserterImpl.<init>(BatchInserterImpl.java:83)
at org.neo4j.unsafe.batchinsert.BatchInserterImpl.<init>(BatchInserterImpl.java:67)
at org.neo4j.unsafe.batchinsert.BatchInserters.inserter(BatchInserters.java:60)
at org.neo4j.batchimport.Importer.createBatchInserter(Importer.java:40)
at org.neo4j.batchimport.Importer.<init>(Importer.java:26)
at org.neo4j.batchimport.Importer.main(Importer.java:54)
Batch.properties:
dump_configuration=false
cache_type=none
use_memory_mapped_buffers=true
neostore.propertystore.db.index.keys.mapped_memory=5M
neostore.propertystore.db.index.mapped_memory=5M
neostore.nodestore.db.mapped_memory=200M
neostore.relationshipstore.db.mapped_memory=500M
neostore.propertystore.db.mapped_memory=200M
neostore.propertystore.db.strings.mapped_memory=200M

ran into the same problem as you and i changed the line in batch.properties
cache_type=none to cache_type=gcr and it worked. not sure about how the speed changes for this. Not sure why the other options none, soft, weak, strong are not working.
Maybe Michael can give an answer to this?
Got the answer from the neo4j documentations
http://docs.neo4j.org/chunked/stable/configuration-caches.html#_object_cache

Related

Neo4j to Gephi import : Failed to invoke procedure Invalid UTF-8

I tried to import my data from Neo4j into Gephi but it doesn't work.
I have the following result in Neo4j :
Failed to invoke procedure apoc.gephi.add: Caused by: com.fasterxml.jackson.core.JsonParseException: Invalid UTF-8 start byte 0xfb at [Source: (apoc.export.util.CountingInputStream); line: 1, column: 136]
As previously mentioned, it looks like neo4j is not exporting using UTF-8, so that, I would check how neo4j is generating the output.
Another possibility is that, when neo4j writing the output, something went slightly wrong.
I got this very same problem in the past when concurrently managing content in a file.
A thread crashed and closed "not correctly enough" the file. I mean, when reviewing the file, everything looks pretty normal, but some characters have been introduced which are not UTF-8. A tool like Atom can help you.
Best

H2O POJO causing javac java.lang.IllegalArgumentException

I have a distributed random forest POJO model using the default model setting except for:
ntrees = 150
max_depth = 50
min_rows = 5
Here are the full settings:
buildModel 'drf', {"model_id":"drf-335270ee-8970-4855-b521-c4fb4ca184f5","training_frame":"frame_0.750","validation_frame":"frame_0.250","nfolds":0,"response_column":"DENIAL","ignored_columns":["tx_match_date"],"ignore_const_cols":true,"ntrees":"150","max_depth":"50","min_rows":"5","nbins":20,"seed":-1,"mtries":-1,"sample_rate":0.6320000290870667,"score_each_iteration":true,"score_tree_interval":0,"balance_classes":false,"nbins_top_level":1024,"nbins_cats":1024,"r2_stopping":1.7976931348623157e+308,"stopping_rounds":0,"stopping_metric":"AUTO","stopping_tolerance":0.001,"max_runtime_secs":0,"checkpoint":"","col_sample_rate_per_tree":1,"min_split_improvement":0.00001,"histogram_type":"AUTO","categorical_encoding":"AUTO","build_tree_one_node":false,"sample_rate_per_class":[],"binomial_double_trees":true,"col_sample_rate_change_per_level":1,"calibrate_model":false}
When I try to compile the pojo with:
$javac -cp "h2o-genmodel.jar" -J-Xmx2g -J-XX:MaxPermSize=128m drf_335270ee_8970_4855_b521_c4fb4ca184f5.java
I get the following error.
An exception has occurred in the compiler (1.8.0_131). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
java.lang.IllegalArgumentException
at java.nio.ByteBuffer.allocate(ByteBuffer.java:334)
at com.sun.tools.javac.util.BaseFileManager$ByteBufferCache.get(BaseFileManager.java:325)
at com.sun.tools.javac.util.BaseFileManager.makeByteBuffer(BaseFileManager.java:294)
at com.sun.tools.javac.file.RegularFileObject.getCharContent(RegularFileObject.java:114)
at com.sun.tools.javac.file.RegularFileObject.getCharContent(RegularFileObject.java:53)
at com.sun.tools.javac.main.JavaCompiler.readSource(JavaCompiler.java:602)
at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:665)
at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:950)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:857)
at com.sun.tools.javac.main.Main.compile(Main.java:523)
at com.sun.tools.javac.main.Main.compile(Main.java:381)
at com.sun.tools.javac.main.Main.compile(Main.java:370)
at com.sun.tools.javac.main.Main.compile(Main.java:361)
at com.sun.tools.javac.Main.compile(Main.java:56)
at com.sun.tools.javac.Main.main(Main.java:42)
I don't get this error when replacing the DRF model with a deep learning pojo that I have also downloaded from h2o's Flow UI, so I'm thinking it is likely related to the drf_335270ee_8970_4855_b521_c4fb4ca184f5.java file (note that the POJO was too big to preview in H2O's Flow UI). What could be going on here?
Thanks
Instead of trying to compile an H2O random forest POJO, you can download and use a MOJO instead in almost exactly the same way without needing the compile step.
See:
http://docs.h2o.ai/h2o/latest-stable/h2o-genmodel/javadoc/index.html

Magento - Fatal error: Maximum function nesting level of '100' reached, aborting

I don't know what is causing this error. I was working on a custom module on my Magento store and didn't check the homepage of the store regularly. Out of the blue today I am getting this error on my homepage.
Fatal error: Maximum function nesting level of '100' reached, aborting! in C:\Program Files\EasyPHP-5.3.8.0\www\indieswebs\lib\Zend\Db\Adapter\Pdo\Mysql.php on line 1045
The funny thing is there is NO 1045 line number in this file! So I am guessing it's some sort of looping error. But I don't know what is causing it. Can anyone help me figure out what might be causing this particular error and how can I remove it?
Edit:I deleted the cache from the store and reloaded the homepage. The error has changed now. It says:
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 261904 bytes) in C:\Program Files\EasyPHP-5.3.8.0\www\indieswebs\lib\Zend\Db\Select.php on line 281
Does anyone know how to resolve this?
The error only come when you installed xdebug.
Use following setting in php.ini
xdebug.max_nesting_level = 200
I was able to resolve a related issue (that causes the same error message) by checking the files in [webroot]/app/etc/
It was happening (on enterprise edition) because
config.xml
enterprise.xml
were missing from that directory. Once I put them back, that fixed this problem.
I also read elsewhere that a malformed local.xml might cause this issue.
On enterprise edition, use something like:
<default_setup>
<connection>
<host><![CDATA[localhost]]></host>
<username><![CDATA[some_user]]></username>
<password><![CDATA[some_pass]]></password>
<dbname><![CDATA[database_name]]></dbname>
<active>1</active>
</connection>
</default_setup>
On CE, use something like:
<default_setup>
<connection>
<host><![CDATA[localhost]]></host>
<username><![CDATA[your_user]]></username>
<password><![CDATA[your_pass]]></password>
<dbname><![CDATA[your_db]]></dbname>
<initStatements><![CDATA[SET NAMES utf8]]></initStatements>
<model><![CDATA[mysql4]]></model>
<type><![CDATA[pdo_mysql]]></type>
<pdoType><![CDATA[]]></pdoType>
<active>1</active>
</connection>
</default_setup>
I got this in my Collection.php model, and the culprit turned out to be the call to parent::__construct(). Once I remmed it out the error went away. PS: Raising xdebug nesting level limit did not work.

Issues with SWI-Prolog editor

Some time ago I was fiddling with SWI-Prolog editor, trying to get something to work, and I change some configuration settings. It didn't work so I changed it back. Now SWI-Prolog editor is not working correctly. I will load files but when I click 'consult' it will just throw this error:
consult('C:/Users/Cubearth/Documents/Prolog/'filename.pl').
and I am not able to perform queries, on the knowledge base... it just does nothing. I know that it should return:
% library(win_menu) compiled into win_menu 0.00 sec, 20,952 bytes
% library(swi_hooks) compiled into pce_swi_hooks ......... (etc, etc)
For help, use ?- help(Topic). or ?- apropos(Word).
but I am not even getting that. I tried uninstalling both prolog and the editor, but still no luck.
Any ideas on how to fix this?
In order to help, I have included the configuration dump of prolog:
Installation
C:\Program Files (x86)\SWIPrologEditor\SWIMachine.ini
C:\Users\Cubearth\AppData\Roaming\SWIPrologEditor\SWIUser.ini
C:\Users\Cubearth\AppData\Roaming\SWIPrologEditor\SWIColor.ini
[SWI]
PortableApplication=0
Verzeichnis=C:\Program Files\pl
Manual=C:\Program Files\pl\bin\doc\Manual\Contents.html
XPCE=C:\Program Files\pl\bin\doc\UserGuide\Contents.html
[Program]
InterpreterParameter=-L32M
FileExtension=.pl
[Editor]
TabWidth=2
Indent=2
Indenthelp=1
AutomaticIndent=1
FileTab=1
Linenumbering=1
BracketPair=0
CursorBehindLine=1
Author=
Encoding=0
Structure=0
[Code]
Code-Completion=1
Parameter-Hints=1
Delay=100
[Options]
ColoredConsole=1
IntegratedWindow=1
ReturnToContinue=1
TraceStopsDebugToo=1
BAKFiles=1
RemoveWriteProtection=1
FileTabsMultiline=1
Language=C:\Program Files (x86)\SWIPrologEditor\english.ini
[Browser]
UseIEinternForDocuments=1
OnlyOneBrowserWindow=0
Browser=C:\Users\Cubearth\AppData\Local\Google\Chrome\Application\chrome.exe
Title=unknown
AltKeysBrowser=
ProxyEnabled=0
ProxyIP=
ProxyPort=0
[Printer]
Left=20
Top=20
Right=20
Bottom=20
Header=#%PATH%#
Footer=##- %PAGENUM% -
Linenumbers=0
LinenumbersInMargin=1
Let me enlighten the poor lost soul that is cubearth. You should double check to see which version of swi-prolog you installed (32-bit or 64-bit), because swi-prolog editor only works with the 32-bit version. If you tried using the editor with the 64-bit version, you'll get the error described above. ^^ .
p.s. You are welcome.
Enable trace, run cmd --
?- trace. consult('C:/Users/Cubearth/Documents/Prolog/'filename.pl').

error using doctrine:build --all symfony 1.4.4 apostrophe trunk

I'm stumped on why when I do doctrine:build -all it throws 2 warnings.
I've tried commenting out all the schema.yml files and it still throws it.
Anyone better informed help me understand where it is coming from, is there some caching I am unaware of?
I've deleted the cache (./symfony cc). Manually deleted all the lib/ models, forms, filters tasks so that there isn't anything hanging around and to no avail. I can't find anything on google for the error so I'm pretty stuck, I want to understand where the error is coming from, it's very early on in the process so I presume it is yaml related but I don't know how to track down where.
Cheers,
Paul
Shell output section Below:
doctrine generating model classes
PHP Warning: array_merge(): Argument #2 is not an array in /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBaseTask.class.php on line 182
PHP Stack trace:
PHP 1. {main}() /mnt/Target01/338166/www.example.co.uk/web/symfony:0
PHP 2. include() /mnt/Target01/338166/www.example.co.uk/web/symfony:14
PHP 3. sfSymfonyCommandApplication->run() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/command/cli.php:20
PHP 4. sfTask->runFromCLI() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/command/sfSymfonyCommandApplication.class.php:76
PHP 5. sfBaseTask->doRun() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfTask.class.php:97
PHP 6. sfDoctrineBuildTask->execute() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68
PHP 7. sfTask->run() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildTask.class.php:156
PHP 8. sfBaseTask->doRun() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfTask.class.php:173
PHP 9. sfDoctrineBuildModelTask->execute() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68
PHP 10. sfDoctrineBaseTask->prepareSchemaFile() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildModelTask.class.php:67
PHP 11. array_merge() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBaseTask.class.php:182
Warning: array_merge(): Argument #2 is not an array in /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBaseTask.class.php on line 182
Call Stack:
0.0008 47204 1. {main}() /mnt/Target01/338166/www.example.co.uk/web/symfony:0
0.0136 279748 2. include('/mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/command/cli.php') /mnt/Target01/338166/www.example.co.uk/web/symfony:14
0.9075 7815564 3. sfSymfonyCommandApplication->run() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/command/cli.php:20
0.9419 7817164 4. sfTask->runFromCLI() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/command/sfSymfonyCommandApplication.class.php:76
0.9433 7818056 5. sfBaseTask->doRun() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfTask.class.php:97
1.0198 8445008 6. sfDoctrineBuildTask->execute() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68
2.0900 9762304 7. sfTask->run() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildTask.class.php:156
2.0907 9764724 8. sfBaseTask->doRun() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfTask.class.php:173
2.0926 9766452 9. sfDoctrineBuildModelTask->execute() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68
2.1560 9789556 10. sfDoctrineBaseTask->prepareSchemaFile() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildModelTask.class.php:67
4.3235 10119764 11. array_merge() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBaseTask.class.php:182
file+ /tmp/doctrine_schema_70082.yml
I just stumbled over the same error. I had an error in my schema.yml by definining an empty table name:
SomeTableNameThatShouldHaveBeenRemoved:
SomeOtherTableName:
colums:
id: etc. pp
Rather easy to spot one would think, yet when such a vague warning is thrown ...

Resources