[
https://issues.apache.org/jira/browse/HBASE-18393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16090012#comment-16090012
]
Mike Drob commented on HBASE-18393:
-----------------------------------
I think this is a JRuby issue, I can reproduce it easily:
{noformat}
mdrob@mdrob-MBP:~/IdeaProjects/hbase$ cat test.rb
require 'irb/ruby-lex'
scanner = RubyLex.new
scanner.set_input(STDIN)
scanner.each_top_level_statement do |s, linenum|
puts s
end
mdrob@mdrob-MBP:~/IdeaProjects/hbase$ echo "foo" | ruby test.rb
NoMethodError: undefined method `encoding' for #<IO:<STDIN>>
Did you mean? set_encoding
block in each_top_level_statement at
/Users/mdrob/.rvm/rubies/jruby-9.1.10.0/lib/ruby/stdlib/irb/ruby-lex.rb:245
loop at org/jruby/RubyKernel.java:1298
block in each_top_level_statement at
/Users/mdrob/.rvm/rubies/jruby-9.1.10.0/lib/ruby/stdlib/irb/ruby-lex.rb:232
catch at org/jruby/RubyKernel.java:1120
each_top_level_statement at
/Users/mdrob/.rvm/rubies/jruby-9.1.10.0/lib/ruby/stdlib/irb/ruby-lex.rb:231
<main> at test.rb:4
{noformat}
> hbase shell non-interactive broken
> ------------------------------------
>
> Key: HBASE-18393
> URL: https://issues.apache.org/jira/browse/HBASE-18393
> Project: HBase
> Issue Type: Bug
> Components: scripts, shell
> Affects Versions: 3.0.0, 2.0.0-alpha-1
> Reporter: Samir Ahmic
> Assignee: Samir Ahmic
> Priority: Blocker
> Fix For: 2.0.0-beta-1
>
>
> Here is error for command line:
> {code}
> $ echo "list" | ./hbase shell -n
> 2017-07-17 08:01:09,442 WARN [main] util.NativeCodeLoader: Unable to load
> native-hadoop library for your platform... using builtin-java classes where
> applicable
> ERROR NoMethodError: undefined method `encoding' for #<IO:<STDIN>>
> Did you mean? set_encoding
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)