Package org.apache.hadoop.hbase.test
Class IntegrationTestBigLinkedList.Generator.GeneratorMapper
java.lang.Object
org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.NullWritable>
org.apache.hadoop.hbase.test.IntegrationTestBigLinkedList.Generator.GeneratorMapper
- Direct Known Subclasses:
IntegrationTestBigLinkedListWithVisibility.VisibilityGenerator.VisibilityGeneratorMapper
- Enclosing class:
- IntegrationTestBigLinkedList.Generator
static class IntegrationTestBigLinkedList.Generator.GeneratorMapper
extends org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.NullWritable>
Some ASCII art time:
[ . . . ] represents one batch of random longs of length WIDTH
_________________________ | ______ | | | || .-+-----------------+-----.|| | | | ||| first = [ . . . . . . . . . . . ] ||| ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ||| | | | | | | | | | | | ||| prev = [ . . . . . . . . . . . ] ||| ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ||| | | | | | | | | | | | ||| current = [ . . . . . . . . . . . ] ||| ||| ... ||| ||| last = [ . . . . . . . . . . . ] ||| ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^_____||| | |________|| |___________________________|
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
class
Randomly selects and walks a random flushed loop concurrently with the Generator Mapper by spawning ConcurrentWalker's with specified StartNodes.Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper
org.apache.hadoop.mapreduce.Mapper.Context
-
Field Summary
Modifier and TypeFieldDescription(package private) byte[]
(package private) org.apache.hadoop.conf.Configuration
(package private) org.apache.hadoop.hbase.client.Connection
(package private) long
(package private) byte[][]
(package private) byte[][]
(package private) final Object
(package private) int
(package private) byte[]
(package private) boolean
(package private) org.apache.hadoop.hbase.client.BufferedMutator
(package private) long
(package private) int
(package private) byte[][]
private org.apache.hadoop.hbase.util.Random64
(package private) byte[]
(package private) boolean
(package private) int
(package private) long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
addFlushed
(byte[] rowKey) private static <T> void
circularLeftShift
(T[] first) protected void
cleanup
(org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.BytesWritable, org.apache.hadoop.io.NullWritable, org.apache.hadoop.io.NullWritable, org.apache.hadoop.io.NullWritable>.org.apache.hadoop.mapreduce.Mapper.Context context) protected void
private void
protected void
map
(org.apache.hadoop.io.BytesWritable key, org.apache.hadoop.io.NullWritable value, org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.BytesWritable, org.apache.hadoop.io.NullWritable, org.apache.hadoop.io.NullWritable, org.apache.hadoop.io.NullWritable>.org.apache.hadoop.mapreduce.Mapper.Context output) protected void
persist
(org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.BytesWritable, org.apache.hadoop.io.NullWritable, org.apache.hadoop.io.NullWritable, org.apache.hadoop.io.NullWritable>.org.apache.hadoop.mapreduce.Mapper.Context output, long count, byte[][] prev, byte[][] current, byte[] id) protected void
setup
(org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.BytesWritable, org.apache.hadoop.io.NullWritable, org.apache.hadoop.io.NullWritable, org.apache.hadoop.io.NullWritable>.org.apache.hadoop.mapreduce.Mapper.Context context) private void
startWalkers
(int numWalkers, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.BytesWritable, org.apache.hadoop.io.NullWritable, org.apache.hadoop.io.NullWritable, org.apache.hadoop.io.NullWritable>.org.apache.hadoop.mapreduce.Mapper.Context context) Methods inherited from class org.apache.hadoop.mapreduce.Mapper
run
-
Field Details
-
first
byte[][] first -
prev
byte[][] prev -
current
byte[][] current -
id
byte[] id -
count
long count -
i
int i -
mutator
org.apache.hadoop.hbase.client.BufferedMutator mutator -
connection
org.apache.hadoop.hbase.client.Connection connection -
numNodes
long numNodes -
wrap
long wrap -
width
int width -
multipleUnevenColumnFamilies
boolean multipleUnevenColumnFamilies -
tinyValue
byte[] tinyValue -
bigValue
byte[] bigValue -
conf
org.apache.hadoop.conf.Configuration conf -
rand
-
walkersStop
-
numWalkers
int numWalkers -
flushedLoopsLock
-
flushedLoops
-
walkers
-
-
Constructor Details
-
GeneratorMapper
-
-
Method Details
-
setup
protected void setup(org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.BytesWritable, org.apache.hadoop.io.NullWritable, throws IOException, InterruptedExceptionorg.apache.hadoop.io.NullWritable, org.apache.hadoop.io.NullWritable>.org.apache.hadoop.mapreduce.Mapper.Context context) - Overrides:
setup
in classorg.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.BytesWritable,
org.apache.hadoop.io.NullWritable, org.apache.hadoop.io.NullWritable, org.apache.hadoop.io.NullWritable> - Throws:
IOException
InterruptedException
-
instantiateHTable
- Throws:
IOException
-
cleanup
protected void cleanup(org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.BytesWritable, org.apache.hadoop.io.NullWritable, throws IOException, InterruptedExceptionorg.apache.hadoop.io.NullWritable, org.apache.hadoop.io.NullWritable>.org.apache.hadoop.mapreduce.Mapper.Context context) - Overrides:
cleanup
in classorg.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.BytesWritable,
org.apache.hadoop.io.NullWritable, org.apache.hadoop.io.NullWritable, org.apache.hadoop.io.NullWritable> - Throws:
IOException
InterruptedException
-
map
protected void map(org.apache.hadoop.io.BytesWritable key, org.apache.hadoop.io.NullWritable value, org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.BytesWritable, org.apache.hadoop.io.NullWritable, throws IOExceptionorg.apache.hadoop.io.NullWritable, org.apache.hadoop.io.NullWritable>.org.apache.hadoop.mapreduce.Mapper.Context output) - Overrides:
map
in classorg.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.BytesWritable,
org.apache.hadoop.io.NullWritable, org.apache.hadoop.io.NullWritable, org.apache.hadoop.io.NullWritable> - Throws:
IOException
-
circularLeftShift
-
addFlushed
-
persist
protected void persist(org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.BytesWritable, org.apache.hadoop.io.NullWritable, throws IOExceptionorg.apache.hadoop.io.NullWritable, org.apache.hadoop.io.NullWritable>.org.apache.hadoop.mapreduce.Mapper.Context output, long count, byte[][] prev, byte[][] current, byte[] id) - Throws:
IOException
-
startWalkers
private void startWalkers(int numWalkers, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.BytesWritable, org.apache.hadoop.io.NullWritable, org.apache.hadoop.io.NullWritable, org.apache.hadoop.io.NullWritable>.org.apache.hadoop.mapreduce.Mapper.Context context) -
joinWalkers
-