I'm trying to debug a problem and I'm trying to run manual scans to figure out what's going on.
However, it seems like some scans work but most fail for whatever reason.
The keys in our hbase table are setup as hash_servername_timestamp, e.g.
123_servername.domain.com_1234567890. The hash can run from 0 to 199.
When I run:
scan 'server_based_data', {FILTER => "KeyOnlyFilter() AND (PrefixFilter('0_'))", COLUMNS => 'raw_data:top', TIMERANGE => [1498514400000, 1498515000000]}
I get some rows returned:
ROW COLUMN+CELL
0_app128021.sjc6.mydomain.com_1498514460 column=raw_data:top, timestamp=1498514502321, value=
0_app128021.sjc6.mydomain.com_1498514580 column=raw_data:top, timestamp=1498514622400, value=
<snip snip>
<snip snip>
0_app128021.sjc6.mydomain.com_1498514700 column=raw_data:top, timestamp=1498514742839, value=
179 row(s) in 177.4260 seconds
However, if I run:
scan 'server_based_data', {FILTER => "KeyOnlyFilter() AND (PrefixFilter('1_'))", COLUMNS => 'raw_data:top', TIMERANGE => [1498514400000, 1498515000000]}
I get an error
ROW COLUMN+CELL
ERROR: Call id=86, waitTime=60002, operationTimeout=60000 expired.
Here is some help for this command:
Scan a table; pass table name and optionally a dictionary of scanner
specifications. Scanner specifications may include one or more of:
<snip snip>
<snip snip>
I assume "0_" works because lexiconically, it's first, compared to "1_" or "199_" but I'm confused why "1_" doesn't work. Can someone explain to me why this doesn't work?
I also assume if I increase the timeout period that it might help make it work. Can someone tell me how to increase the timeout period for a scan from the hbase shell?
To change the timeout period from HBase shell, you can use below commands for hbase.client.operation.timeout
or hbase.client.scanner.timeout.period
:
001:0> @shell.hbase.configuration.get("hbase.client.scanner.timeout.period")
=> "60000"
002:0> @shell.hbase.configuration.setInt("hbase.client.scanner.timeout.period", 120000)
003:0> @shell.hbase.configuration.get("hbase.client.scanner.timeout.period")
=> "120000"
Alternatively (not from shell), you can edit the value in hbase-site.xml
however it will require a cluster restart for HBase to notice the change. Such as:
<property>
<name>hbase.client.scanner.timeout.period</name>
<value>120000</value>
</property>