HADOOP-2380 REST servlet throws NPE when any value node has an empty string
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@602267 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
612f446dbd
commit
02022f9931
|
@ -11,7 +11,7 @@ Trunk (unreleased changes)
|
|||
HADOOP-2084 Add a LocalHBaseCluster
|
||||
HADOOP-2068 RESTful interface (Bryan Duxbury via Stack)
|
||||
HADOOP-2316 Run REST servlet outside of master
|
||||
(Bryan Duxbury via Stack)
|
||||
(Bryan Duxbury & Stack)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
|
@ -61,6 +61,8 @@ Trunk (unreleased changes)
|
|||
HADOOP-2365 Result of HashFunction.hash() contains all identical values
|
||||
HADOOP-2362 Leaking hdfs file handle on region split
|
||||
HADOOP-2338 Fix NullPointerException in master server.
|
||||
HADOOP-2380 REST servlet throws NPE when any value node has an empty string
|
||||
(Bryan Duxbury via Stack)
|
||||
|
||||
IMPROVEMENTS
|
||||
HADOOP-2401 Add convenience put method that takes writable
|
||||
|
|
|
@ -308,8 +308,16 @@ public class TableHandler extends GenericHandler {
|
|||
|
||||
Node value_node = column.getElementsByTagName("value").item(0);
|
||||
|
||||
byte[] value = new byte[0];
|
||||
|
||||
// for some reason there's no value here. probably indicates that
|
||||
// the consumer passed a null as the cell value.
|
||||
if(value_node.getFirstChild() != null &&
|
||||
value_node.getFirstChild().getNodeValue() != null){
|
||||
// decode the base64'd value
|
||||
byte[] value = org.apache.hadoop.hbase.util.Base64.decode(value_node.getFirstChild().getNodeValue());
|
||||
value = org.apache.hadoop.hbase.util.Base64.decode(
|
||||
value_node.getFirstChild().getNodeValue());
|
||||
}
|
||||
|
||||
// put the value
|
||||
table.put(lock_id, name, value);
|
||||
|
|
Loading…
Reference in New Issue