[
https://issues.apache.org/jira/browse/HBASE-12875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14281164#comment-14281164
]
Andrew Purtell commented on HBASE-12875:
----------------------------------------
I'm not a jRuby expert but this seems to be due to an access/update race on the
hash used to cache HTables. We don't actually need to cache HTable instances if
we open a HConnection, stash it in a global, and use it to create flyweight
HTables on demand. Something like:
{code}
$CONN = HConnectionManager.getConnection(HConfiguration.create))
...
table = $CONN.getTable(TableName.valueOf("..."))
begin
# do stuff
rescue
table.close
end
{code}
> Region mover script region_mover.rb sometimes fail with NPE
> -----------------------------------------------------------
>
> Key: HBASE-12875
> URL: https://issues.apache.org/jira/browse/HBASE-12875
> Project: HBase
> Issue Type: Bug
> Components: regionserver
> Affects Versions: 0.98.8
> Reporter: Sameer Vaishampayan
> Assignee: Sameer Vaishampayan
> Priority: Minor
>
> Moved region
> _IDX_EVENT.PLATFORM_EVENT_METRICS,\x0B\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00,1421392135537.f058d58e0560a5a0d681d3345d778b71.
> cost: 1.643
> NoMethodError: undefined method `getScanner' for nil:NilClass
> isSuccessfulScan at <>/bin/region_mover.rb:138
> unloadRegions at <>/bin/region_mover.rb:360
> call at org/jruby/RubyProc.java:270
> call at org/jruby/RubyProc.java:220
> initialize at<>/bin/thread-pool.rb:33
> loop at org/jruby/RubyKernel.java:1439
> initialize at <>/bin/thread-pool.rb:31
> catch at org/jruby/RubyKernel.java:1212
> initialize at <>/bin/thread-pool.rb:30
> call at org/jruby/RubyProc.java:270
> call at org/jruby/RubyProc.java:224
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)