如何延长hbase命令行超时时间
How to extend hbase command line timeout period
我正在尝试调试问题,我正在尝试 运行 手动扫描以弄清楚发生了什么。
然而,似乎有些扫描有效,但大多数都出于某种原因失败。
我们的 hbase table 中的键设置为 hash_servername_timestamp,例如
123_servername.domain.com_1234567890. The hash can run from 0 to 199.
当我运行:
scan 'server_based_data', {FILTER => "KeyOnlyFilter() AND
(PrefixFilter('0_'))", COLUMNS => 'raw_data:top', TIMERANGE =>
[1498514400000, 1498515000000]}
我返回了一些行:
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
但是,如果我 运行:
scan 'server_based_data', {FILTER => "KeyOnlyFilter() AND
(PrefixFilter('1_'))", COLUMNS => 'raw_data:top', TIMERANGE =>
[1498514400000, 1498515000000]}
我收到一个错误
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>
我假设“0_”有效,因为在词典上,它是第一个,与“1_”或“199_”相比,但我很困惑为什么“1_”不起作用。有人可以向我解释为什么这不起作用吗?
我还假设如果我增加超时时间可能有助于使其正常工作。谁能告诉我如何增加 hbase 扫描的超时时间 shell?
要从 HBase shell 更改超时期限,您可以对 hbase.client.operation.timeout
或 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"
或者(不是来自 shell),您可以编辑 hbase-site.xml
中的值,但是需要重新启动集群 HBase 才能注意到更改。如:
<property>
<name>hbase.client.scanner.timeout.period</name>
<value>120000</value>
</property>
我正在尝试调试问题,我正在尝试 运行 手动扫描以弄清楚发生了什么。
然而,似乎有些扫描有效,但大多数都出于某种原因失败。
我们的 hbase table 中的键设置为 hash_servername_timestamp,例如
123_servername.domain.com_1234567890. The hash can run from 0 to 199.
当我运行:
scan 'server_based_data', {FILTER => "KeyOnlyFilter() AND (PrefixFilter('0_'))", COLUMNS => 'raw_data:top', TIMERANGE => [1498514400000, 1498515000000]}
我返回了一些行:
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
但是,如果我 运行:
scan 'server_based_data', {FILTER => "KeyOnlyFilter() AND (PrefixFilter('1_'))", COLUMNS => 'raw_data:top', TIMERANGE => [1498514400000, 1498515000000]}
我收到一个错误
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>
我假设“0_”有效,因为在词典上,它是第一个,与“1_”或“199_”相比,但我很困惑为什么“1_”不起作用。有人可以向我解释为什么这不起作用吗?
我还假设如果我增加超时时间可能有助于使其正常工作。谁能告诉我如何增加 hbase 扫描的超时时间 shell?
要从 HBase shell 更改超时期限,您可以对 hbase.client.operation.timeout
或 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"
或者(不是来自 shell),您可以编辑 hbase-site.xml
中的值,但是需要重新启动集群 HBase 才能注意到更改。如:
<property>
<name>hbase.client.scanner.timeout.period</name>
<value>120000</value>
</property>