org.sharengo.wikitty.hbase
Class WikittyHBaseUtil

java.lang.Object
  extended by org.sharengo.wikitty.hbase.WikittyHBaseUtil

public class WikittyHBaseUtil
extends Object

Version:
$Revision: 1 $ Last update: $Date: 2010-04-16 10:29:38 +0200 (ven., 16 avril 2010) $ by : $Author: echatellier $
Author:
poussin

Field Summary
protected static org.apache.hadoop.hbase.HBaseConfiguration conf
           
static byte[] F_ADMIN
          family for administrative data: id, version, ...
static byte[] F_DATA
          family for data
static String HBASE_CLIENT_PAUSE
          General client pause value.
static String HBASE_CLIENT_RETRIES_NUMBER
          Maximum retries.
static byte[] NULL
          null value in hbase
static byte[] Q_DELETE_DATE
          delete date qualifier in hbase
static byte[] Q_EXTENSION
          extension qualifier in hbase
static byte[] Q_ID
          wikitty id qualifier in hbase
static byte[] Q_NAME
          extension name qualifier in hbase
static byte[] Q_REQUIRES
          requires qualifier in hbase
static byte[] Q_TAGVALUES
          tagvalues qualifier in hbase
static byte[] Q_VERSION
          version qualifier in hbase
static byte[] T_EXTENSION
          table for extension
static byte[] T_WIKITTY
          table for wikitty
 
Constructor Summary
WikittyHBaseUtil()
           
 
Method Summary
static Object fromBytes(byte[] obj)
          Convert any byte array to object
static Object fromBytes(FieldType field, byte[] b)
           
static org.apache.hadoop.hbase.HBaseConfiguration getHBaseConfiguration()
           
static byte[] toBytes(FieldType field, Object o)
          Convert object to byte[] representation - boolean representation use 0 for false and 1 for true - BigDecimal use String representation
static byte[] toBytes(Object obj)
          Convert any object serializale to byte array
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

T_EXTENSION

public static final byte[] T_EXTENSION
table for extension


T_WIKITTY

public static final byte[] T_WIKITTY
table for wikitty


F_ADMIN

public static final byte[] F_ADMIN
family for administrative data: id, version, ...


F_DATA

public static final byte[] F_DATA
family for data


Q_EXTENSION

public static final byte[] Q_EXTENSION
extension qualifier in hbase


Q_VERSION

public static final byte[] Q_VERSION
version qualifier in hbase


Q_REQUIRES

public static final byte[] Q_REQUIRES
requires qualifier in hbase


Q_TAGVALUES

public static final byte[] Q_TAGVALUES
tagvalues qualifier in hbase


Q_ID

public static final byte[] Q_ID
wikitty id qualifier in hbase


Q_NAME

public static final byte[] Q_NAME
extension name qualifier in hbase


Q_DELETE_DATE

public static final byte[] Q_DELETE_DATE
delete date qualifier in hbase


NULL

public static final byte[] NULL
null value in hbase


HBASE_CLIENT_RETRIES_NUMBER

public static final String HBASE_CLIENT_RETRIES_NUMBER
Maximum retries. Used as maximum for all retryable operations such as fetching of the root region from root region server, getting a cell's value, starting a row update, etc. Default: 10.

See Also:
Constant Field Values

HBASE_CLIENT_PAUSE

public static final String HBASE_CLIENT_PAUSE
General client pause value. Used mostly as value to wait before running a retry of a failed get, region lookup, etc.

See Also:
Constant Field Values

conf

protected static org.apache.hadoop.hbase.HBaseConfiguration conf
Constructor Detail

WikittyHBaseUtil

public WikittyHBaseUtil()
Method Detail

getHBaseConfiguration

public static org.apache.hadoop.hbase.HBaseConfiguration getHBaseConfiguration()

toBytes

public static byte[] toBytes(Object obj)
Convert any object serializale to byte array


fromBytes

public static Object fromBytes(byte[] obj)
Convert any byte array to object


toBytes

public static byte[] toBytes(FieldType field,
                             Object o)
Convert object to byte[] representation - boolean representation use 0 for false and 1 for true - BigDecimal use String representation

Parameters:
field - used to determinate type of o
o -
Returns:

fromBytes

public static Object fromBytes(FieldType field,
                               byte[] b)


Copyright © 2009-2010 CodeLutin. All Rights Reserved.