Raakhi, If you look at the code, you can see that this line does not return the RunningJob object:
JobClient.runJob(createSubmittableJob(args)); But since createSubmittableJob is public, you can call it then run the job then use the RunningJob object to get the counters. J-D On Thu, Aug 13, 2009 at 9:54 AM, Rakhi Khatwani<[email protected]> wrote: > Hi, > I wanted to use RowCounter to count the rows of my Hbase Table, so i > wrote a small java class which would display the number of rows in my hbase > table. > Assuming my Hbase table is TestTable with 171 rows and all values in > TestColumnFamily: > here's a code snippet. > main(){ > RowCounter rowCounter = new RowCounter(); > rowCounter.setConf(jobConf); > > try { > int rowCount = rowCounter.run(new > String[]{"/user/root/rowCount","TestTable", "TestColumnFamily:"}); > System.out.println("Number of rows::: " + rowCount); > } catch (Exception e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > > } > my mapreduce program executes successfully... > displays 0 (exit code) > but i dont know how to use the number of rows generated by this mapreduce > for my program. can anyone help me?? > Thanks > Raakhi >
