|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.util.Writables
public class Writables
Utility class with methods for manipulating Writable objects
Constructor Summary | |
---|---|
Writables()
|
Method Summary | |
---|---|
static long |
cellToLong(Cell c)
|
static String |
cellToString(Cell c)
|
static org.apache.hadoop.io.Writable |
copyWritable(byte[] bytes,
org.apache.hadoop.io.Writable tgt)
Copy one Writable to another. |
static org.apache.hadoop.io.Writable |
copyWritable(org.apache.hadoop.io.Writable src,
org.apache.hadoop.io.Writable tgt)
Copy one Writable to another. |
static byte[] |
getBytes(org.apache.hadoop.io.Writable w)
|
static HRegionInfo |
getHRegionInfo(byte[] bytes)
|
static HRegionInfo |
getHRegionInfo(Cell cell)
|
static HRegionInfo |
getHRegionInfoOrNull(byte[] bytes)
|
static org.apache.hadoop.io.Writable |
getWritable(byte[] bytes,
org.apache.hadoop.io.Writable w)
Set bytes into the passed Writable by calling its Writable.readFields(java.io.DataInput) . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Writables()
Method Detail |
---|
public static byte[] getBytes(org.apache.hadoop.io.Writable w) throws IOException
w
-
w
gotten by running its
Writable.write(java.io.DataOutput)
method.
IOException
getWritable(byte[], Writable)
public static org.apache.hadoop.io.Writable getWritable(byte[] bytes, org.apache.hadoop.io.Writable w) throws IOException
Writable.readFields(java.io.DataInput)
.
bytes
- w
- An empty Writable (usually made by calling the null-arg
constructor).
bytes
array or IllegalArgumentException
if passed null or an empty bytes
array.
IOException
IllegalArgumentException
public static HRegionInfo getHRegionInfo(byte[] bytes) throws IOException
bytes
-
bytes
.
IOException
public static HRegionInfo getHRegionInfoOrNull(byte[] bytes) throws IOException
bytes
-
bytes
or null
if passed bytes are null or an empty array.
IOException
public static HRegionInfo getHRegionInfo(Cell cell) throws IOException
cell
- Cell object containing the serialized HRegionInfo
cell
.
IOException
public static org.apache.hadoop.io.Writable copyWritable(org.apache.hadoop.io.Writable src, org.apache.hadoop.io.Writable tgt) throws IOException
src
- Source Writabletgt
- Target Writable
IOException
public static org.apache.hadoop.io.Writable copyWritable(byte[] bytes, org.apache.hadoop.io.Writable tgt) throws IOException
bytes
- Source Writabletgt
- Target Writable
IOException
public static String cellToString(Cell c)
c
-
public static long cellToLong(Cell c)
c
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |