Home » Archives for Mark Needham

Author Archives: Mark Needham

Neo4j Import: java.lang.IllegalStateException: Mixing specified and unspecified group belongings in a single import isn’t supported

I’ve been working with the Neo4j Import Tool recently after a bit of a break and ran into an interesting error message that I initially didn’t understand. I had some CSV files containing nodes that I wanted to import into Neo4j. Their contents look like this: $ cat people_header.csv name:ID(Person)   $ cat people.csv "Mark" "Michael" "Ryan" "Will" "Jennifer" "Karin" ...

Read More »

Ethereum Hello World Example using solc and web3

I’ve been trying to find an Ethereum Hello World example and came across Thomas Conté’s excellent post that shows how to compile and deploy an Ethereum smart contract with solc and web3. In the latest version of web3 the API has changed to be based on promises so I decided to translate Thomas’ example. Let’s get started. Install npm libraries ...

Read More »

Neo4j: Cypher – Property values can only be of primitive types or arrays thereof

I ran into an interesting Cypher error message earlier this week while trying to create an array property on a node which I thought I’d share. This was the Cypher query I wrote: CREATE (:Person {id: [1, "mark", 2.0]}) which results in this error: Neo.ClientError.Statement.TypeError Property values can only be of primitive types or arrays thereof. We actually are storing ...

Read More »

Kubernetes 1.8: Using Cronjobs to take Neo4j backups

With the release of Kubernetes 1.8 Cronjobs have graduated to beta, which means we can now more easily run Neo4j backup jobs against Kubernetes clusters. Before we learn how to write a Cronjob let’s first create a local Kubernetes cluster and deploy Neo4j. Spinup Kubernetes & Helm minikube start --memory 8192 helm init && kubectl rollout status -w deployment/tiller-deploy --namespace=kube-system ...

Read More »

Kubernetes: Copy a dataset to a StatefulSet’s PersistentVolume

Neo4j Clusters on Kubernetes This posts assumes that we’re familiar with deploying Neo4j on Kubernetes. I wrote an article on the Neo4j blog explaining this in more detail. The StatefulSet we create for our core servers require persistent storage, achieved via the PersistentVolumeClaim (PVC) primitive. A Neo4j cluster containing 3 core servers would have the following PVCs: $ kubectl get ...

Read More »

Neo4j: Traversal query timeout

I’ve been spending some of my spare time over the last few weeks creating an application that generates running routes from Open Roads data – transformed and imported into Neo4j of course! I’ve created a user defined procedure which combines several shortest path queries, but I wanted to exit any of these shortest path searches if they were taking too ...

Read More »

Neo4j: Cypher – Deleting duplicate nodes

I had a problem on a graph I was working on recently where I’d managed to create duplicate nodes because I hadn’t applied any unique constraints. I wanted to remove the duplicates, and came across Jimmy Ruts’ excellent post which shows some ways to do this. Let’s first create a graph with some duplicate nodes to play with: UNWIND range(0, ...

Read More »