HPE Ezmeral Software platform
1826214 Members
2814 Online
109691 Solutions
New Discussion

Re: Is SetLimit method of Hbase client Scan class supported?

 
koo2981
Occasional Contributor

Is SetLimit method of Hbase client Scan class supported?

I am running an EDF 7.7 cluster. Using setLimit doesn't limit the number of rows the scan returns. Is this method not supported? I don't get any error messages, it just returns all the rows that match my startrow and stoprow. Any ideas? Snippet below.

I also tried with PageFilter(which isn't recommended) and I get a weird error when I try to return anything more than ~20 rows, around 65 KB worth of data.

======

scan = new Scan();
String startRow = flinkid + "_" + getRegexTime(epochStartTime);
String endRow = flinkid + "_" + getRegexTime(epochEndTime);
scan.setStartRow(Bytes.toBytes(endRow));
scan.setStopRow(Bytes.toBytes(startRow));
FilterList filterList = getUsageFilters(bookType,);
log.debug("filter before setting={} " + scan.getFilter());
scan.setFilter(filterList); // Directly set the FilterList
scan.addColumn(Bytes.toBytes(this.propBean.getColumnFamily1()),
Bytes.toBytes(this.propBean.getColumnFamily1Column7()));
scan.addColumn(Bytes.toBytes(this.propBean.getColumnFamily2()),
Bytes.toBytes(this.propBean.getColumnFamily2Column1()));
if (log.isDebugEnabled()) {
log.debug(SCAN_INFO + " , Table: " + propBean.getTablename() + " , End Row: " + endRow);
}
scan.setLimit(Integer.parseInt(limit));
System.out.println("Scan Limit:== " + Integer.parseInt(limit));
scanner = table.getScanner(scan);

 

4 REPLIES 4
yasmeenshaik96
Neighborhood Moderator

Re: Is SetLimit method of Hbase client Scan class supported?

Hi @koo2981 Could you please share your maven version/ POM .xml that you are testing for your project?

I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
koo2981
Occasional Contributor

Re: Is SetLimit method of Hbase client Scan class supported?

Hi @yasmeenshaik96 ,

For this test, I am not using maven. I am compiling and running my application using javac and java as described in the link below under Running Applications:

https://docs.ezmeral.hpe.com/datafabric-customer-managed/79/MapR-DB/UsingMaven.html

Core release is 7.7 and EEP version is 9.2.2. My classpath is set using by exportin 'hbase classpath' and 'hadoop classpath' commands.

yasmeenshaik96
Neighborhood Moderator

Re: Is SetLimit method of Hbase client Scan class supported?

Hi @koo2981 can you confirm if you have a scope to open hpe account to open a case for this scenario?

I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
koo2981
Occasional Contributor

Re: Is SetLimit method of Hbase client Scan class supported?

Case has been opened for this already.

Thanks