You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Lukáš Lalinský <la...@gmail.com> on 2015/10/30 16:53:52 UTC

Error when using the included mapreduce tools (e.g. CopyTable)

I have a clean setup with HBase 1.1.2 and I created a test table:

hbase(main):002:0> create 't1', {NAME => 'f1'}
0 row(s) in 1.4460 seconds

=> Hbase::Table - t1
hbase(main):006:0> put 't1', '1', 'f1:a', 'a'
0 row(s) in 0.0150 seconds

hbase(main):007:0> put 't1', '2', 'f1:a', 'b'
0 row(s) in 0.0070 seconds

hbase(main):008:0> scan 't1'
ROW
COLUMN+CELL
 1
column=f1:a, timestamp=1446219543171, value=a
 2
column=f1:a, timestamp=1446219549259, value=b
2 row(s) in 0.0170 seconds

When I try to copy it with using "CopyTable", I get an error from the
MR task and I can't figure out what's wrong. This is the command that
I'm running:

hbase org.apache.hadoop.hbase.mapreduce.CopyTable --new.name=t2 t1

And this is the error I get in the MR job history:

2015-10-30 15:40:49,459 FATAL [IPC Server handler 1 on 39938]
org.apache.hadoop.mapred.TaskAttemptListenerImpl: Task:
attempt_1446219462725_0001_m_000000_0 - exited : java.io.IOException:
Cannot create a record reader because of a previous error. Please look
at the previous logs lines from the task's full log for more details.
    at org.apache.hadoop.hbase.mapreduce.TableInputFormatBase.createRecordReader(TableInputFormatBase.java:174)
    at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.<init>(MapTask.java:515)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:758)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
    at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:422)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
    at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
Caused by: java.lang.IllegalStateException: The input format instance
has not been properly initialized. Ensure you call initializeTable
either in your constructor or initialize method
    at org.apache.hadoop.hbase.mapreduce.TableInputFormatBase.getTable(TableInputFormatBase.java:585)
    at org.apache.hadoop.hbase.mapreduce.TableInputFormatBase.createRecordReader(TableInputFormatBase.java:169)
    ... 8 more

Googling for the "input format instance has not been properly
initialized" error only brings up some Spark related problem. I get
the same error when trying to use "RowCounter", for example.

Any ideas what am I doing wrong?

Thank you,

Lukas

Re: Error when using the included mapreduce tools (e.g. CopyTable)

Posted by Lukáš Lalinský <la...@gmail.com>.
On Fri, Oct 30, 2015 at 4:53 PM, Lukáš Lalinský <la...@gmail.com> wrote:
> Any ideas what am I doing wrong?

Answering my own email, sorry about that. As soon as I sent this, I
have realized that there are more detailed logs in the MR map attempt
and then I realized that my hbase is not so clean after all, since I
was using some phoenix-specific settings. Adding "-libjars
/opt/hbase/lib/phoenix-4.5.2-HBase-1.1-server.jar" to the command
fixed the problem.

Lukas