<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: HBase JRuby program error &amp;quot;NoMethodError: undefined method `add' for nil:NilClass&amp;quot; in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-JRuby-program-error-quot-NoMethodError-undefined/m-p/115507#M33988</link>
    <description>&lt;P&gt;Thankyou!!! yes its syntax error caused the issue and now i am able to run program successfully...&lt;/P&gt;</description>
    <pubDate>Wed, 06 Jul 2016 20:24:24 GMT</pubDate>
    <dc:creator>mkumar13</dc:creator>
    <dc:date>2016-07-06T20:24:24Z</dc:date>
    <item>
      <title>HBase JRuby program error "NoMethodError: undefined method `add' for nil:NilClass"</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-JRuby-program-error-quot-NoMethodError-undefined/m-p/115503#M33984</link>
      <description>&lt;P&gt;I am using HDP2.4 sandbox and I have a Hive external table on top of HBase, my application suppose to load data from Hive.&lt;/P&gt;&lt;P&gt;Below JRuby program runs once in a day to give me custom filter on my INT column values.&lt;/P&gt;&lt;PRE&gt;import org.apache.hadoop.hbase.HBaseConfiguration
import org.apache.hadoop.hbase.client.HTable
import org.apache.hadoop.hbase.client.Get
import org.apache.hadoop.hbase.util.Bytes
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.client.ResultScanner;
import org.apache.hadoop.hbase.client.Result;
import java.util.ArrayList;


def delete_get_some()
var_table = "tiny_hbase_table1"
htable = HTable.new(HBaseConfiguration.new, var_table)
rs = htable.getScanner(Bytes.toBytes("o"), Bytes.toBytes("kingdomKey"))
output = ArrayList.new output.add "ROW\t\t\t\t\t\tCOLUMN\+CELL"
rs.each { |r| r.raw.each { |kv|
row = Bytes.toInt(kv.getRow)
fam = kv.getFamily
ql = Bytes.toString(kv.getQualifier)
ts = kv.getTimestamp
val = Bytes.toInt(kv.getValue)
rowval = Bytes.toInt(kv.getRow)
output.add "#{row} #{ql} #{val}"
}
}
output.each {|line| puts "#{line}\n"}
end


delete_get_some

&lt;/PRE&gt;&lt;P&gt; But i am getting "NoMethodError: undefined method `add' for nil:NilClass" error while running this program.&lt;/P&gt;&lt;P&gt;Suggestions or advice please on this issue...&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2016 19:43:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-JRuby-program-error-quot-NoMethodError-undefined/m-p/115503#M33984</guid>
      <dc:creator>mkumar13</dc:creator>
      <dc:date>2016-07-06T19:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: HBase JRuby program error "NoMethodError: undefined method `add' for nil:NilClass"</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-JRuby-program-error-quot-NoMethodError-undefined/m-p/115504#M33985</link>
      <description>&lt;P&gt;@Mukesh Could you check your syntax?&lt;/P&gt;&lt;P&gt;It should be the one below&lt;/P&gt;&lt;PRE&gt;output = ArrayList.new
output.add "ROW\t\t\t\t\t\tCOLUMN\+CELL"&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Jul 2016 20:14:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-JRuby-program-error-quot-NoMethodError-undefined/m-p/115504#M33985</guid>
      <dc:creator>kpalanisamy</dc:creator>
      <dc:date>2016-07-06T20:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: HBase JRuby program error "NoMethodError: undefined method `add' for nil:NilClass"</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-JRuby-program-error-quot-NoMethodError-undefined/m-p/115505#M33986</link>
      <description>&lt;P&gt;Please post the error&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2016 20:15:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-JRuby-program-error-quot-NoMethodError-undefined/m-p/115505#M33986</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-07-06T20:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: HBase JRuby program error "NoMethodError: undefined method `add' for nil:NilClass"</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-JRuby-program-error-quot-NoMethodError-undefined/m-p/115506#M33987</link>
      <description>&lt;P&gt;Error Message is below:-&lt;/P&gt;&lt;P&gt;hbase(main):027:0* delete_get_some
NameError: undefined local variable or method `output' for #&amp;lt;Object:0x714863bd&amp;gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2016 20:22:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-JRuby-program-error-quot-NoMethodError-undefined/m-p/115506#M33987</guid>
      <dc:creator>mkumar13</dc:creator>
      <dc:date>2016-07-06T20:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: HBase JRuby program error "NoMethodError: undefined method `add' for nil:NilClass"</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-JRuby-program-error-quot-NoMethodError-undefined/m-p/115507#M33988</link>
      <description>&lt;P&gt;Thankyou!!! yes its syntax error caused the issue and now i am able to run program successfully...&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2016 20:24:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-JRuby-program-error-quot-NoMethodError-undefined/m-p/115507#M33988</guid>
      <dc:creator>mkumar13</dc:creator>
      <dc:date>2016-07-06T20:24:24Z</dc:date>
    </item>
  </channel>
</rss>

