public static class PTE.TriangleCountingMapper
extends org.apache.hadoop.mapreduce.Mapper<java.lang.Object,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.NullWritable>
Constructor and Description |
---|
TriangleCountingMapper() |
Modifier and Type | Method and Description |
---|---|
static long |
availableMemoryBytes(boolean gc)
calculate available memory
|
protected long |
enumTri(int[][] ij,
int[][] ik,
int[][] jk,
int i,
int j,
int k)
Counting triangles.
|
protected void |
map(java.lang.Object key,
org.apache.hadoop.io.Text value,
org.apache.hadoop.mapreduce.Mapper.Context context)
the map function of triangle enumeration step of PTE
|
protected void |
setup(org.apache.hadoop.mapreduce.Mapper.Context context)
setup before execution
|
protected void setup(org.apache.hadoop.mapreduce.Mapper.Context context) throws java.io.IOException, java.lang.InterruptedException
setup
in class org.apache.hadoop.mapreduce.Mapper<java.lang.Object,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.NullWritable>
context
- of hadoopjava.io.IOException
- by hadoopjava.lang.InterruptedException
- by hadoopprotected void map(java.lang.Object key, org.apache.hadoop.io.Text value, org.apache.hadoop.mapreduce.Mapper.Context context) throws java.io.IOException, java.lang.InterruptedException
map
in class org.apache.hadoop.mapreduce.Mapper<java.lang.Object,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.NullWritable>
key
- value meaning lessvalue
- problemcontext
- of hadoopjava.io.IOException
- by hadoopjava.lang.InterruptedException
- by hadoopprotected long enumTri(int[][] ij, int[][] ik, int[][] jk, int i, int j, int k) throws java.io.IOException, java.lang.InterruptedException
ij
- adjacency list of an edge setik
- adjacency list of an edge setjk
- adjacency list of an edge seti
- the first node colorj
- the second node colork
- the last node colorjava.io.IOException
- by hadoopjava.lang.InterruptedException
- by hadooppublic static long availableMemoryBytes(boolean gc)
gc
- do garbage collect if true