It looks like you are mixing TinkerGraph and OrientDB. You want to just use OrientDB.
Thus,
Graph graph = new OrientGraph("local:/tmp/adirectory/graph");
Vertex a = graph.addVertex(null);
Vertex b = graph.addVertex(null);
a.setProperty("name", "marko");
a.setProperty("name", "peter");
Edge e = graph.addEdge(null, a, b, "knows");
graph.shutdown();
Also, you need the "local:" prefix and you don't need TinkerGraph.
Hope that helps,
Marko.