Take a look at the unit test TestTableMapReduce located in the source tree under src/test/org/apache/hadoop/hbase/mapred
--- Jim Kellerman, Senior Engineer; Powerset > -----Original Message----- > From: ma qiang [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 06, 2008 12:47 AM > To: [email protected] > Subject: connection to HBase using HTable > > Hi all: > In my map function, I need to connect to a table in > HBase several times ,and I use HTable class, the code as belows: > > HTable TestConnection = new HTable(new > HBaseConfiguration(), new Text("test")); > > So every time the map function run , the code must run ,and > this run time is waste. > > > Because of too many times of connection,the most part of time of run > time is waste in new HTable(). So I want to run the code one time, > and all of task use the same connection. How can I do this? > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release > Date: 3/5/2008 9:50 AM > > No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.21.4/1313 - Release Date: 3/5/2008 9:50 AM
