HBASE-860 IndexTableReduce doesnt write the column name as the lucene index field properly

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@691069 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2008-09-01 21:46:46 +00:00
parent 3e7dd73cd1
commit 65852deff9
2 changed files with 5 additions and 3 deletions

View File

@ -7,6 +7,8 @@ Release 0.18.0 - Unreleased
HBASE-822 Update thrift README and HBase.thrift to use thrift 20080411 HBASE-822 Update thrift README and HBase.thrift to use thrift 20080411
BUG FIXES BUG FIXES
HBASE-860 Fixed Bug in IndexTableReduce where it concerns writing lucene
index fields.
HBASE-805 Remove unnecessary getRow overloads in HRS (Jonathan Gray via HBASE-805 Remove unnecessary getRow overloads in HRS (Jonathan Gray via
Jim Kellerman) (Fix whitespace diffs in HRegionServer) Jim Kellerman) (Fix whitespace diffs in HRegionServer)
HBASE-811 HTD is not fully copyable (Andrew Purtell via Jim Kellerman) HBASE-811 HTD is not fully copyable (Andrew Purtell via Jim Kellerman)

View File

@ -86,7 +86,7 @@ public class IndexTableReduce extends MapReduceBase implements
// each column (name-value pair) is a field (name-value pair) // each column (name-value pair) is a field (name-value pair)
for (Map.Entry<byte [], Cell> entry : value.entrySet()) { for (Map.Entry<byte [], Cell> entry : value.entrySet()) {
// name is already UTF-8 encoded // name is already UTF-8 encoded
String column = entry.getKey().toString(); String column = Bytes.toString(entry.getKey());
byte[] columnValue = entry.getValue().getValue(); byte[] columnValue = entry.getValue().getValue();
Field.Store store = indexConf.isStore(column)? Field.Store store = indexConf.isStore(column)?
Field.Store.YES: Field.Store.NO; Field.Store.YES: Field.Store.NO;
@ -96,8 +96,8 @@ public class IndexTableReduce extends MapReduceBase implements
Field.Index.NO; Field.Index.NO;
// UTF-8 encode value // UTF-8 encode value
Field field = new Field(column, new String(columnValue, Field field = new Field(column, Bytes.toString(columnValue),
HConstants.UTF8_ENCODING), store, index); store, index);
field.setBoost(indexConf.getBoost(column)); field.setBoost(indexConf.getBoost(column));
field.setOmitNorms(indexConf.isOmitNorms(column)); field.setOmitNorms(indexConf.isOmitNorms(column));