I am at my wits end. I can't find which jar file contains these two classes:
import org.apache.hadoop.hbase.mapreduce.RowCounter.RowCounterMapper;
import org.junit.experimental.categories.Category;
I've tried:
Eclipse still says those import lines are not resolved.
How do I find the jar file that contains these classes or any class for that matter that I need for my program to compile?
Thanks in advance. I'm ready to ram my head into the wall.
RowCounterMapper
is in HBase Server. Maven dependency:
<!-- https://mvnrepository.com/artifact/org.apache.hbase/hbase --> <dependency> <groupId>org.apache.hbase</groupId> <artifactId>hbase</artifactId> <version>1.2.1</version> <type>pom</type> </dependency>
Category
is in Junit 4. Maven dependency: <!-- https://mvnrepository.com/artifact/junit/junit --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> </dependency>
I have also added links to GrepCode.
Base on the comments, @Classified wants a example to run RowCounter
.
Here is a unittest I wrote which I think could be an exmaple.
Job job = RowCounter.createSubmittableJob(HBaseConfiguration.create(), new String[]{"table"});
job.waitForCompletion(true);
Counters counters = job.getCounters();
GenericCounter genericCounter = (GenericCounter) counters.findCounter(
"org.apache.hadoop.hbase.mapreduce.RowCounter$RowCounterMapper$Counters",
"ROWS");
genericCounter.getValue();
genericCounter.getValue()
is the row count of "table"
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.