Package org.apache.hadoop.hbase.util
Class ClientUtils
java.lang.Object
org.apache.hadoop.hbase.util.ClientUtils
Common Utility class for clients
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic LoginContext
To authenticate the demo client, kinit should be invoked ahead.static void
printRow
(org.apache.hadoop.hbase.thrift.generated.TRowResult rowResult) copy values into a TreeMap to get them in sorted order and print itstatic String
utf8
(byte[] buf) Helper to translate byte[]s to UTF8 stringsstatic String
utf8
(ByteBuffer bb) Helper to translate a byte buffer to UTF8 strings
-
Constructor Details
-
ClientUtils
private ClientUtils()
-
-
Method Details
-
getLoginContext
To authenticate the demo client, kinit should be invoked ahead. Here we try to get the Kerberos credential from the ticket cache- Returns:
- LoginContext Object
- Throws:
LoginException
- Exception thrown if unable to get LoginContext
-
printRow
copy values into a TreeMap to get them in sorted order and print it- Parameters:
rowResult
- Holds row name and then a map of columns to cells
-
utf8
Helper to translate byte[]s to UTF8 strings- Parameters:
buf
- byte array- Returns:
- UTF8 decoded string value
-
utf8
Helper to translate a byte buffer to UTF8 strings- Parameters:
bb
- byte buffer- Returns:
- UTF8 decoded string value
-