org.apache.hadoop.hbase.client
Class MultiAction
java.lang.Object
org.apache.hadoop.hbase.client.MultiAction
- All Implemented Interfaces:
- org.apache.hadoop.io.Writable
public final class MultiAction
- extends java.lang.Object
- implements org.apache.hadoop.io.Writable
Container for Actions (i.e. Get, Delete, or Put), which are grouped by
regionName. Intended to be used with HConnectionManager.processBatch()
|
Field Summary |
java.util.Map<byte[],java.util.List<Action>> |
actions
|
|
Method Summary |
void |
add(byte[] regionName,
Action a)
Add an Action to this container based on it's regionName. |
java.util.List<Action> |
allActions()
|
java.util.Set<byte[]> |
getRegions()
|
void |
readFields(java.io.DataInput in)
|
int |
size()
Get the total number of Actions |
void |
write(java.io.DataOutput out)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
actions
public java.util.Map<byte[],java.util.List<Action>> actions
MultiAction
public MultiAction()
size
public int size()
- Get the total number of Actions
- Returns:
- total number of Actions for all groups in this container.
add
public void add(byte[] regionName,
Action a)
- Add an Action to this container based on it's regionName. If the regionName
is wrong, the initial execution will fail, but will be automatically
retried after looking up the correct region.
- Parameters:
regionName - a -
getRegions
public java.util.Set<byte[]> getRegions()
allActions
public java.util.List<Action> allActions()
- Returns:
- All actions from all regions in this container
write
public void write(java.io.DataOutput out)
throws java.io.IOException
- Specified by:
write in interface org.apache.hadoop.io.Writable
- Throws:
java.io.IOException
readFields
public void readFields(java.io.DataInput in)
throws java.io.IOException
- Specified by:
readFields in interface org.apache.hadoop.io.Writable
- Throws:
java.io.IOException
Copyright © 2011 The Apache Software Foundation. All Rights Reserved.