diff --git a/manual/contents/pom.xml b/manual/contents/pom.xml index 04495129ad19..98860faa28c5 100644 --- a/manual/contents/pom.xml +++ b/manual/contents/pom.xml @@ -48,20 +48,6 @@ docs provided - - org.neo4j - neo4j-kernel - ${neo4j.version} - docs - provided - - - org.neo4j - neo4j-kernel - ${neo4j.version} - test-sources - provided - org.neo4j neo4j-management @@ -118,16 +104,23 @@ docs provided + + org.neo4j + neo4j-udc + ${neo4j.version} + docs + provided + org.neo4j.doc - neo4j-cypher-docs + neo4j-kernel-docs ${neo4j.version} - sources + docs provided org.neo4j.doc - neo4j-cypher-docs + neo4j-kernel-docs ${neo4j.version} test-sources provided @@ -136,12 +129,19 @@ org.neo4j.doc neo4j-cypher-docs ${neo4j.version} - docs + sources provided - org.neo4j - neo4j-udc + org.neo4j.doc + neo4j-cypher-docs + ${neo4j.version} + test-sources + provided + + + org.neo4j.doc + neo4j-cypher-docs ${neo4j.version} docs provided @@ -349,7 +349,7 @@ META-INF,META-INF/**,org/neo4j/kernel/impl/storemigration/legacystore/** jar ${docs.test-sources} - neo4j-cypher-docs,neo4j-examples,neo4j-harness-test,neo4j-server,neo4j-lucene-index,neo4j-backup,neo4j-kernel + neo4j-cypher-docs,neo4j-examples,neo4j-harness-test,neo4j-server,neo4j-lucene-index,neo4j-backup,neo4j-kernel-docs diff --git a/manual/contents/src/advanced/index.asciidoc b/manual/contents/src/advanced/index.asciidoc index d6b240d82b9d..57f5c93be4dc 100644 --- a/manual/contents/src/advanced/index.asciidoc +++ b/manual/contents/src/advanced/index.asciidoc @@ -31,7 +31,7 @@ include::{importdir}/neo4j-lucene-index-docs-jar/dev/index.asciidoc[] :leveloffset: 1 -include::{importdir}/neo4j-kernel-docs-jar/dev/batchinsert.asciidoc[] +include::{importdir}/neo4j-kernel-docs-docs-jar/dev/batchinsert.asciidoc[] :leveloffset: 2 diff --git a/manual/contents/src/operations/configuration.asciidoc b/manual/contents/src/operations/configuration.asciidoc index a761f065e38c..aa974ec3c600 100644 --- a/manual/contents/src/operations/configuration.asciidoc +++ b/manual/contents/src/operations/configuration.asciidoc @@ -9,7 +9,7 @@ The following sections describe how to tune these. :leveloffset: 2 -include::{importdir}/neo4j-kernel-docs-jar/ops/introduction.asciidoc[] +include::{importdir}/neo4j-kernel-docs-docs-jar/ops/introduction.asciidoc[] :leveloffset: 2 @@ -17,13 +17,13 @@ include::{importdir}/neo4j-server-docs-jar/ops/server-performance.asciidoc[] :leveloffset: 2 -include::{importdir}/neo4j-kernel-docs-jar/ops/performance-guide.asciidoc[] +include::{importdir}/neo4j-kernel-docs-docs-jar/ops/performance-guide.asciidoc[] -include::{importdir}/neo4j-kernel-docs-jar/ops/logical-logs.asciidoc[] +include::{importdir}/neo4j-kernel-docs-docs-jar/ops/logical-logs.asciidoc[] -include::{importdir}/neo4j-kernel-docs-jar/ops/property-compression.asciidoc[] +include::{importdir}/neo4j-kernel-docs-docs-jar/ops/property-compression.asciidoc[] -include::{importdir}/neo4j-kernel-docs-jar/ops/io-examples.asciidoc[] +include::{importdir}/neo4j-kernel-docs-docs-jar/ops/io-examples.asciidoc[] include::configuration-reference.asciidoc[] diff --git a/manual/contents/src/reference/index.asciidoc b/manual/contents/src/reference/index.asciidoc index acd6bea87f54..23c5e68a4b06 100644 --- a/manual/contents/src/reference/index.asciidoc +++ b/manual/contents/src/reference/index.asciidoc @@ -13,7 +13,7 @@ include::capabilities/cap-details.asciidoc[] :leveloffset: 1 -include::{importdir}/neo4j-kernel-docs-jar/dev/transactions.asciidoc[] +include::{importdir}/neo4j-kernel-docs-docs-jar/dev/transactions.asciidoc[] :leveloffset: 1 diff --git a/manual/kernel/LICENSES.txt b/manual/kernel/LICENSES.txt new file mode 100644 index 000000000000..e62824d7096a --- /dev/null +++ b/manual/kernel/LICENSES.txt @@ -0,0 +1,4 @@ +This file contains the full license text of the included third party +libraries. For an overview of the licenses see the NOTICE.txt file. + + diff --git a/manual/kernel/NOTICE.txt b/manual/kernel/NOTICE.txt new file mode 100644 index 000000000000..2e529f508fb3 --- /dev/null +++ b/manual/kernel/NOTICE.txt @@ -0,0 +1,26 @@ +Neo4j +Copyright © 2002-2016 Network Engine for Objects in Lund AB (referred to +in this notice as "Neo Technology") + [http://neotechnology.com] + +This product includes software ("Software") developed by Neo Technology. + +The software ("Software") is developed and owned by Network Engine +for Objects in Lund AB (referred to in this notice as "Neo Technology"). +If you have executed an End User Software License and Services Agreement, +an OEM Software License and Support Services Agreement, or another +commercial license agreement (including an Evaluation Agreement) with +Neo Technology or one of its affiliates (each, a "Commercial Agreement"), +you may use the Software solely pursuant to the terms of the relevant +Commercial Agreement. + +If you have not executed a Commercial Agreement with Neo Technology, the +Software is subject to the terms of the GNU AFFERO GENERAL PUBLIC LICENSE +Version 3 (http://www.fsf.org/licensing/licenses/agpl-3.0.html), included +in the LICENSE.txt file. + +Full license texts are found in LICENSES.txt. + +Third-party licenses +-------------------- + diff --git a/manual/kernel/pom.xml b/manual/kernel/pom.xml new file mode 100644 index 000000000000..6fde675ae10c --- /dev/null +++ b/manual/kernel/pom.xml @@ -0,0 +1,42 @@ + + + + parent + org.neo4j + 3.0.7-SNAPSHOT + ../.. + + 4.0.0 + + org.neo4j.doc + neo4j-kernel-docs + 3.0.7-SNAPSHOT + + Neo4j - Kernel Docs + Documentation build for the Neo4j kernel. + + + + + junit + junit + test + + + org.neo4j + neo4j-kernel + ${project.version} + test + + + org.neo4j + neo4j-kernel + ${project.version} + test + test-jar + + + + diff --git a/community/kernel/src/docs/dev/batchinsert.asciidoc b/manual/kernel/src/docs/dev/batchinsert.asciidoc similarity index 73% rename from community/kernel/src/docs/dev/batchinsert.asciidoc rename to manual/kernel/src/docs/dev/batchinsert.asciidoc index 29f4a1b265d0..41d344fd1db7 100644 --- a/community/kernel/src/docs/dev/batchinsert.asciidoc +++ b/manual/kernel/src/docs/dev/batchinsert.asciidoc @@ -1,6 +1,5 @@ [[batchinsert]] -Batch Insertion -=============== += Batch Insertion Neo4j has a batch insertion facility intended for initial imports, which bypasses transactions and other checks in favor of performance. This is useful when you have a big dataset that needs to be loaded once. @@ -13,53 +12,65 @@ Be aware of the following points when using batch insertion: * Batch insertion is _not thread safe._ * Batch insertion is _non-transactional._ * Batch insertion is _not enforcing constraints_ on the inserted data while inserting data. -* Batch insertion will re-populate all existing indexes and indexes created during batch insertion on +shutdown+. -* Batch insertion will verify all existing constraints and constraints created during batch insertion on +shutdown+. -* Unless +shutdown+ is successfully invoked at the end of the import, the database files _will_ be corrupt. +* Batch insertion will re-populate all existing indexes and indexes created during batch insertion on `shutdown`. +* Batch insertion will verify all existing constraints and constraints created during batch insertion on `shutdown`. +* Unless `shutdown` is successfully invoked at the end of the import, the database files _will_ be corrupt. [WARNING] -Always perform batch insertion in a _single thread_ (or use synchronization to make only one thread at a time access the batch inserter) and invoke +shutdown+ when finished. +-- +Always perform batch insertion in a _single thread_ (or use synchronization to make only one thread at a time access the batch inserter) and invoke `shutdown` when finished. +-- [WARNING] -Since the batch insertion doesn't enforce constraint during data loading, if the inserted data violate any constraint the batch inserter will fail on +shutdown+ and the database _will_ be inconsistent. +-- +Since the batch insertion doesn't enforce constraint during data loading, if the inserted data violate any constraint the batch inserter will fail on `shutdown` and the database _will_ be inconsistent. +-- + [[batchinsert-examples]] -== Batch Inserter Examples == +== Batch inserter examples + -=== Initial import === +=== Initial import -To bulk load data using the batch inserter you'll need to write a Java application which makes use of the low level link:javadocs/org/neo4j/unsafe/batchinsert/BatchInserter.html[+BatchInserter+] interface. +To bulk load data using the batch inserter you'll need to write a Java application which makes use of the low level link:javadocs/org/neo4j/unsafe/batchinsert/BatchInserter.html[`BatchInserter`] interface. [TIP] +-- You can't have multiple threads using the batch inserter concurrently without external synchronization. +-- -You can get hold of an instance of +BatchInserter+ by using link:javadocs/org/neo4j/unsafe/batchinsert/BatchInserters.html[+BatchInserters+]. +You can get hold of an instance of `BatchInserter` by using link:javadocs/org/neo4j/unsafe/batchinsert/BatchInserters.html[`BatchInserters`]. Here's an example of the batch inserter in use: -[snippet,java] +[snippet, java] ---- -component=neo4j-kernel +component=neo4j-kernel-docs source=examples/BatchInsertDocTest.java tag=insert ---- -When creating a relationship you can set properties on the relationship by passing in a map containing properties rather than `null` as the last parameter to +createRelationship+. +When creating a relationship you can set properties on the relationship by passing in a map containing properties rather than `null` as the last parameter to `createRelationship`. It's important that the call to `shutdown` is inside a finally block to ensure that it gets called even if exceptions are thrown. If he batch inserter isn't cleanly shutdown then the consistency of the store is not guaranteed. [TIP] +-- The source code for the examples on this page can be found here: https://github.com/neo4j/neo4j/blob/{neo4j-git-tag}/community/kernel/src/test/java/examples/BatchInsertDocTest.java[BatchInsertDocTest.java] +-- -=== Setting configuration options === -You can pass custom configuration options to the +BatchInserter+. (See <> for information on the available options.) +=== Setting configuration options + +You can pass custom configuration options to the `BatchInserter`. +(See <> for information on the available options.) e.g. -[snippet,java] +[snippet, java] ---- -component=neo4j-kernel +component=neo4j-kernel-docs source=examples/BatchInsertDocTest.java tag=configuredInsert ---- @@ -72,20 +83,23 @@ Alternatively you could store the configuration in a file: include::../batchinsert-config[] ---- -You can then refer to that file when initializing +BatchInserter+: +You can then refer to that file when initializing `BatchInserter`: -[snippet,java] +[snippet, java] ---- -component=neo4j-kernel +component=neo4j-kernel-docs source=examples/BatchInsertDocTest.java tag=configFileInsert ---- -=== Importing into an existing database === + +=== Importing into an existing database Although it's a less common use case, the batch inserter can also be used to import data into an existing database. However, you will need to ensure that the existing database is _shut down_ before you write to it. [WARNING] +-- Since the batch importer bypasses transactions there is a possibility of data inconsistency if the import process crashes midway. We would strongly suggest you take a backup of your existing database before using the batch inserter against it. +-- diff --git a/community/kernel/src/docs/dev/transactions.asciidoc b/manual/kernel/src/docs/dev/transactions.asciidoc similarity index 98% rename from community/kernel/src/docs/dev/transactions.asciidoc rename to manual/kernel/src/docs/dev/transactions.asciidoc index 9e0c32c3f101..43e123d49285 100644 --- a/community/kernel/src/docs/dev/transactions.asciidoc +++ b/manual/kernel/src/docs/dev/transactions.asciidoc @@ -181,23 +181,23 @@ In the following sections you'll find example code in Java which shows how this [[transactions-deadlocks-template]] ==== Handling deadlocks using TransactionTemplate -If you don't want to write all the code yourself, there is a class called +link:javadocs/org/neo4j/helpers/TransactionTemplate.html[TransactionTemplate]+ that will help you achieve what's needed. +If you don't want to write all the code yourself, there is a class called link:javadocs/org/neo4j/helpers/TransactionTemplate.html[TransactionTemplate] that will help you achieve what's needed. Below is an example of how to create, customize, and use this template for retries in transactions. First, define the base template: -[snippet,java] +[snippet, java] ---- -component=neo4j-kernel +component=neo4j-kernel-docs source=examples/DeadlockDocTest.java tag=template ---- Next, specify the database to use and a function to execute: -[snippet,java] +[snippet, java] ---- -component=neo4j-kernel +component=neo4j-kernel-docs source=examples/DeadlockDocTest.java tag=usage-template ---- @@ -214,9 +214,9 @@ The template allows setting a predicate for what exceptions to retry on, and als If you want to roll your own retry-loop code, see below for inspiration. Here's an example of what a retry block might look like: -[snippet,java] +[snippet, java] ---- -component=neo4j-kernel +component=neo4j-kernel-docs source=examples/DeadlockDocTest.java tag=retry ---- diff --git a/community/kernel/src/docs/ops/configuration.asciidoc b/manual/kernel/src/docs/ops/configuration.asciidoc similarity index 100% rename from community/kernel/src/docs/ops/configuration.asciidoc rename to manual/kernel/src/docs/ops/configuration.asciidoc diff --git a/community/kernel/src/docs/ops/introduction.asciidoc b/manual/kernel/src/docs/ops/introduction.asciidoc similarity index 100% rename from community/kernel/src/docs/ops/introduction.asciidoc rename to manual/kernel/src/docs/ops/introduction.asciidoc diff --git a/community/kernel/src/docs/ops/io-examples.asciidoc b/manual/kernel/src/docs/ops/io-examples.asciidoc similarity index 100% rename from community/kernel/src/docs/ops/io-examples.asciidoc rename to manual/kernel/src/docs/ops/io-examples.asciidoc diff --git a/community/kernel/src/docs/ops/logical-logs.asciidoc b/manual/kernel/src/docs/ops/logical-logs.asciidoc similarity index 100% rename from community/kernel/src/docs/ops/logical-logs.asciidoc rename to manual/kernel/src/docs/ops/logical-logs.asciidoc diff --git a/community/kernel/src/docs/ops/performance-guide.asciidoc b/manual/kernel/src/docs/ops/performance-guide.asciidoc similarity index 100% rename from community/kernel/src/docs/ops/performance-guide.asciidoc rename to manual/kernel/src/docs/ops/performance-guide.asciidoc diff --git a/community/kernel/src/docs/ops/property-compression.asciidoc b/manual/kernel/src/docs/ops/property-compression.asciidoc similarity index 100% rename from community/kernel/src/docs/ops/property-compression.asciidoc rename to manual/kernel/src/docs/ops/property-compression.asciidoc diff --git a/community/kernel/src/test/java/examples/BatchInsertDocTest.java b/manual/kernel/src/test/java/examples/BatchInsertDocTest.java similarity index 93% rename from community/kernel/src/test/java/examples/BatchInsertDocTest.java rename to manual/kernel/src/test/java/examples/BatchInsertDocTest.java index d2c1df3693e5..3060c2c724b6 100644 --- a/community/kernel/src/test/java/examples/BatchInsertDocTest.java +++ b/manual/kernel/src/test/java/examples/BatchInsertDocTest.java @@ -5,17 +5,17 @@ * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU Affero General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package examples; diff --git a/community/kernel/src/test/java/examples/DeadlockDocTest.java b/manual/kernel/src/test/java/examples/DeadlockDocTest.java similarity index 89% rename from community/kernel/src/test/java/examples/DeadlockDocTest.java rename to manual/kernel/src/test/java/examples/DeadlockDocTest.java index 3ae022debe61..5b3d763f12d8 100644 --- a/community/kernel/src/test/java/examples/DeadlockDocTest.java +++ b/manual/kernel/src/test/java/examples/DeadlockDocTest.java @@ -5,17 +5,17 @@ * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU Affero General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package examples; diff --git a/community/kernel/src/test/java/org/neo4j/kernel/impl/store/RecordSizesDocTest.java b/manual/kernel/src/test/java/org/neo4j/kernel/impl/store/RecordSizesDocTest.java similarity index 90% rename from community/kernel/src/test/java/org/neo4j/kernel/impl/store/RecordSizesDocTest.java rename to manual/kernel/src/test/java/org/neo4j/kernel/impl/store/RecordSizesDocTest.java index 926a7f6a6927..0296c2e6ce4d 100644 --- a/community/kernel/src/test/java/org/neo4j/kernel/impl/store/RecordSizesDocTest.java +++ b/manual/kernel/src/test/java/org/neo4j/kernel/impl/store/RecordSizesDocTest.java @@ -5,17 +5,17 @@ * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU Affero General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package org.neo4j.kernel.impl.store; diff --git a/community/kernel/src/test/java/org/neo4j/test/docs/DocsIncludeFile.java b/manual/kernel/src/test/java/org/neo4j/test/docs/DocsIncludeFile.java similarity index 86% rename from community/kernel/src/test/java/org/neo4j/test/docs/DocsIncludeFile.java rename to manual/kernel/src/test/java/org/neo4j/test/docs/DocsIncludeFile.java index 55bfb4415f3e..5e87249c517e 100644 --- a/community/kernel/src/test/java/org/neo4j/test/docs/DocsIncludeFile.java +++ b/manual/kernel/src/test/java/org/neo4j/test/docs/DocsIncludeFile.java @@ -5,17 +5,17 @@ * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU Affero General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package org.neo4j.test.docs; diff --git a/manual/pom.xml b/manual/pom.xml index a2c4017d95ad..d286c8f6799d 100644 --- a/manual/pom.xml +++ b/manual/pom.xml @@ -28,6 +28,7 @@ server-examples bolt import-tool + kernel