This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CreateFreebaseGraph { | |
public static final String INDEX_NAME = "search"; | |
public static void main(String[] args) { | |
TitanGraph graph=TitanFactory.open("/Users/lili/soft/titan-server-0.4.4/conf/titan-hbase-es.properties"); | |
graph.shutdown(); | |
TitanCleanup.clear(graph); | |
graph=TitanFactory.open("/Users/lili/soft/titan-server-0.4.4/conf/titan-hbase-es.properties"); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 [main] INFO com.thinkaurelius.titan.diskstorage.Backend - Configuring index [search] based on: | |
backend: elasticsearch | |
hostname: 127.0.0.1 | |
client-only: true | |
cluster-name: mytestcluster |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestFreebaseGraph { | |
public static void main(String[] args) { | |
TitanGraph g=TitanFactory.open("/Users/lili/soft/titan-server-0.4.4/conf/titan-hbase-es.properties"); | |
Vertex v1=g.addVertex(null); | |
String name="Jack Brown"; | |
v1.setProperty("name", name); | |
v1.setProperty("l_name", name.toLowerCase()); | |
v1.setProperty("f_name", name); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FileInputStream is = new FileInputStream("/Users/lili/Downloads/freebase-rdf-2014-08-03-00-00.gz"); | |
GZIPInputStream gzis=new GZIPInputStream(is); | |
BufferedReader br=new BufferedReader(new InputStreamReader(gzis,"UTF8")); | |
int lineNum=0; | |
String line; | |
TitanGraph g=TitanFactory.open("/Users/lili/soft/titan-server-0.4.4/conf/titan-hbase-es.properties"); | |
long total=0; | |
long start=System.currentTimeMillis(); | |
int statSize=10_000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class InsertThread extends Thread{ | |
TitanGraph g=TitanFactory.open("/Users/lili/soft/titan-server-0.4.4/conf/titan-hbase-es.properties"); | |
BlockingQueue<String> queue; | |
public InsertThread(BlockingQueue<String> queue){ | |
this.queue=queue; | |
} | |
@Override | |
public void run(){ | |
while(true){ | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) { | |
TitanGraph g=TitanFactory.open("/Users/lili/soft/titan-server-0.4.4/conf/titan-hbase-es.properties"); | |
{ | |
Vertex mike=g.addVertex(null); | |
mike.setProperty("name", "Mike"); | |
mike.setProperty("l_name", "mike"); | |
mike.setProperty("v_type", 0); | |
Vertex automobile=g.addVertex(null); | |
automobile.setProperty("name", "Avalon"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) { | |
TitanGraph graph=TitanFactory.open("/Users/lili/soft/titan-server-0.4.4/conf/titan-hbase-es.properties"); | |
graph.shutdown(); | |
TitanCleanup.clear(graph); | |
graph=TitanFactory.open("/Users/lili/soft/titan-server-0.4.4/conf/titan-hbase-es.properties"); | |
graph.makeKey("name").dataType(String.class).make(); | |
graph.makeKey("aliases").dataType(String.class).indexed(Vertex.class).list().make(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TestGremlin (1) [Java Application] | |
com.antbrains.graph.titan.TestGremlin at localhost:54499 (Suspended) | |
Daemon System Thread [Signal Dispatcher] (Suspended) | |
Daemon System Thread [Finalizer] (Suspended) | |
Daemon System Thread [Reference Handler] (Suspended) | |
Daemon Thread [main-SendThread(127.0.0.1:2181)] (Suspended) | |
Daemon Thread [main-EventThread] (Suspended) | |
Daemon Thread [elasticsearch[Leech][[timer]]] (Suspended) | |
Daemon Thread [elasticsearch[Leech][scheduler][T#1]] (Suspended) | |
Daemon Thread [elasticsearch[Leech][transport_client_worker][T#1]{New I/O worker #1}] (Suspended) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2014-08-25 12:56:56 | |
Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.65-b04 mixed mode): | |
"pool-4-thread-1-SendThread(127.0.0.1:2181)" daemon prio=5 tid=0x00007ff9be091000 nid=0x551f waiting on condition [0x00000001121a2000] | |
java.lang.Thread.State: TIMED_WAITING (sleeping) | |
at java.lang.Thread.sleep(Native Method) | |
at org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:230) | |
at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1185) | |
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1122) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer