Allow routing allocations:
curl -XPUT localhost:9200/_cluster/settings -d '{
"transient" : {
"cluster.routing.allocation.enable" : "all"
}
}'| #!/usr/bin/env python | |
| import random | |
| # does nodes need to have edges? | |
| createEdges = True | |
| # number of nodes | |
| nodes = 500 | |
| def main(): | |
| for i in range(0, nodes): |
| import org.neo4j.graphdb.RelationshipType | |
| import org.neo4j.kernel.EmbeddedGraphDatabase | |
| import org.neo4j.graphdb.GraphDatabaseService | |
| import org.neo4j.graphdb.Node | |
| import org.neo4j.graphdb.Relationship | |
| object RelTypes extends Enumeration { | |
| type RelTypes = Value | |
| val KNOWS, MAYOR_OF = Value |
| import java.io.File; | |
| import java.io.IOException; | |
| import java.util.Iterator; | |
| import org.neo4j.graphdb.Direction; | |
| import org.neo4j.graphdb.GraphDatabaseService; | |
| import org.neo4j.graphdb.Node; | |
| import org.neo4j.graphdb.Relationship; | |
| import org.neo4j.graphdb.RelationshipType; | |
| import org.neo4j.graphdb.Transaction; |
| import java.util.Iterator; | |
| import com.tinkerpop.blueprints.Direction; | |
| import com.tinkerpop.blueprints.Edge; | |
| import com.tinkerpop.blueprints.Graph; | |
| import com.tinkerpop.blueprints.Vertex; | |
| import com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph; | |
| public class EmbeddeNeo4j { | |
| public static void main(final String[] args) { |
| import com.tinkerpop.blueprints.Graph | |
| import com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph | |
| import com.tinkerpop.blueprints.Vertex | |
| import com.tinkerpop.blueprints.Edge | |
| import java.util.Iterator | |
| import com.tinkerpop.blueprints.Direction | |
| object BlueprintsNeo4j { | |
| def main(args: Array[String]): Unit = { | |
| val graph : Graph = new Neo4jGraph("tmp/graph") |
| // lib to add: http://code.google.com/p/google-gson/downloads/detail?name=google-gson-2.2.2-release.zip&can=2&q= | |
| // file Main.scala | |
| package demo | |
| import scala.collection.JavaConverters._ | |
| import com.google.gson.Gson | |
| import java.util.ArrayList | |
| import java.lang.reflect.Type | |
| import com.google.gson.reflect.TypeToken |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| openssl s_client -crlf -connect imap.gmail.com:993 | |
| tag login user@gmail.com passwordhere | |
| tag list "" "*" | |
| tag select "inbox" | |
| tag fetch 1:3 body[header] | |
| tag fetch 3 body[header] | |
| tag fetch 3 body[text] | |
| tag fetch 2 all | |
| tag fetch 2 fast | |
| tag fetch 2 full |
Allow routing allocations:
curl -XPUT localhost:9200/_cluster/settings -d '{
"transient" : {
"cluster.routing.allocation.enable" : "all"
}
}'| // Check whether --offline was passed to gradle and set it in the test configuration's system properties | |
| test { | |
| if(gradle.startParameter.isOffline()) { | |
| systemProperties 'TESTS.ARE.OFFLINE' : '1' | |
| } | |
| } |