|
public class ScanExample { public static void main(String[] args) throws IOException { Configuration conf = HBaseConfiguration.create(); HTable table = new HTable(conf, "employee"); Scan scan = new Scan(); scan.setStartRow(Bytes.toBytes("2")).setStopRow(Bytes.toBytes("4")); ResultScanner scanner = table.getScanner(scan); for (Result res: scanner) { System.out.println(res); } scanner.close(); }
}
Click here for Other topics of BigData Technologies
|