Other Things to Download: [Datasets], [Example Application Code]

G-thinker System Code

The GitHub link for the system code is here. You may consider to download the complete project [zipped], or with the following commands:

wget https://github.com/yanlab19870714/G-thinker/archive/master.zip
unzip master.zip

This will generate a folder G-thinker-master, which contains:

  • system: a folder that contains the system code
  • app_triangle: a triangle counting example on top
  • app_maxclique: a maximum clique finding example on top
  • app_gmatch: a subgraph matching example on top
Before compiling applications with the system, if you are using Hadoop v2, change file system/util/ydhdfs2.h Lines 41 and 42, replace "hadoop-master" with your namenode's host name, and replace "9000" with your specified port number. Both can be found from attribute fs.default.name configured in your Hadoop's core-site.xml. If you are using Hadoop v1, change system/util/ydhdfs.h to comment Line 20, and then change file system/util/ydhdfs1.h Lines 40 with your namenode's host name and specified port number.

In each application folder, you already have a Makefile as shown below:

CCOMPILE=mpic++
CPPFLAGS= -I$(HADOOP_HOME)/include -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -I ../system -Wno-deprecated -O2
LIB = -L$(HADOOP_HOME)/lib/native
LDFLAGS = -lhdfs

all: run

run: run.cpp
  $(CCOMPILE) -std=c++11 -lpthread run.cpp $(CPPFLAGS) $(LIB) $(LDFLAGS)  -o run

clean:
  -rm run

Here, Line 2 includes the system folder as the G-thinker library:

-I ../system

You may put the system folder anywhere, but need to link to it properly in Makefile like above.

In an application code, you may run make to compile the application, and it will generate a program file called run, and see [note on execution] for how to run the program. You may rename program run to the name you like.

What's Next: [Datasets], [Example Applications]