Hi: stack ,
I have done some test and find we should change the codes of TestHFileOutputFormat a little ,or the test won't work.
" int rows = this.conf.getInt("mapred.map.tasks", 1) * ROWSPERSPLIT;"
" int rows = this.conf.getInt("mapred.map.tasks", 1) * ROWSPERSPLIT+2;"
just as you said , The end key needs to be exclusive; i.e. one larger than the biggest key in your key space.
however ,the key range of TestHFileOutFormat is 1----conf.getInt("mapred.map.tasks",1)*ROWSPERSLPLIT+1，so we should add 1 more to rows(the end key).
except that ,everything looks right.the STARTKEY and ENDKEY of each region are correct.
the precondition is we should know the startKey and endKey,now you have written the partitioner,can we write a MR job to calculate the startKey and endKey ?