Here is my conf object passing first parameter of API.
but here I want to pass multiple scan means i have 4 criteria for STRAT ROW
and STOROW in same table.
by using below code i can get result for one STARTROW and ENDROW.

Configuration conf = DBConfiguration.getConf();

// int scannerTimeout = (int) conf.getLong(
//      HConstants.HBASE_REGIONSERVER_LEASE_PERIOD_KEY, -1);
// System.out.println("lease timeout on server is"+scannerTimeout);

int scannerTimeout = (int) conf.getLong(
    "hbase.client.scanner.timeout.period", -1);
// conf.setLong("hbase.client.scanner.timeout.period", 60000L);
conf.set(TableInputFormat.INPUT_TABLE, TABLE_NAME);
Scan scan = new Scan();
scan.addFamily(FAMILY);
FilterList filterList = new FilterList(Operator.MUST_PASS_ALL);
filterList.addFilter(new KeyOnlyFilter());
 filterList.addFilter(new FirstKeyOnlyFilter());
scan.setFilter(filterList);

scan.setCacheBlocks(false);
scan.setCaching(10);
 scan.setBatch(1000);
scan.setSmall(false);
 conf.set(TableInputFormat.SCAN, DatabaseUtils.convertScanToString(scan));
return conf;

On 4 April 2015 at 20:54, Jeetendra Gangele <gangele...@gmail.com> wrote:

> Hi All,
>
> Can we get the result of the multiple scan
> from JavaSparkContext.newAPIHadoopRDD from Hbase.
>
> This method first parameter take configuration object where I have added
> filter. but how Can I query multiple scan from same table calling this API
> only once?
>
> regards
> jeetendra
>

Reply via email to