Hi guys.
I want to load data from Phoenix to Pig but i received this error message
when run command base on this tutorial from Phoenix's site:
http://phoenix.apache.org/pig_integration.html
<http://t.signauxtrois.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs6538WTMcVPpMd0HHzW5v0wKg56dW7Yf2cTMkb02?t=http%3A%2F%2Fphoenix.apache.org%2Fpig_integration.html&si=5534200080891904&pi=10982922-b536-49e7-b787-52dca452e6ee>
Here is my table descirbe:
*+ Phoenix:*
0: jdbc:phoenix:localhost,bd2,bd37:2181> !describe DEVICE_ALL_APP1
+------------+-------------+------------+-------------+------------+-----------+
| TABLE_CAT | TABLE_SCHEM | TABLE_NAME | COLUMN_NAME | DATA_TYPE |
TYPE_NAME |
+------------+-------------+------------+-------------+------------+-----------+
| null | null | DEVICE_ALL_APP1 | UUID | 1 |
CHAR |
| null | null | DEVICE_ALL_APP1 | DEV_ID | 1 |
CHAR |
| null | null | DEVICE_ALL_APP1 | APP_PACKAGE | 1 |
CHAR |
| null | null | DEVICE_ALL_APP1 | APP_VERSION | 1 |
CHAR |
| null | null | DEVICE_ALL_APP1 | TIME | 4 |
INTE |
| null | null | DEVICE_ALL_APP1 | DAY_TIME | 4 |
INTE |
| null | null | DEVICE_ALL_APP1 | HOUR_TIME | 4 |
INTE |
| null | null | DEVICE_ALL_APP1 | STATUS | 4 |
INTE |
+------------+-------------+------------+-------------+------------+-----------+
*+ Hbase*
hbase(main):011:0> describe 'DEVICE_ALL_APP1'
DESCRIPTION
ENABLED
'DEVICE_ALL_APP1', {TABLE_ATTRIBUTES => {coprocessor$1 =>
'|org.apache.phoenix.coprocessor.ScanRegionObserver|1|', coprocessor$2 =
true
> '|org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver|1|',
coprocessor$3 => '|org.apache.phoenix.coprocessor.Grouped
AggregateRegionObserver|1|', coprocessor$4 =>
'|org.apache.phoenix.coprocessor.ServerCachingEndpointImpl|1|',
coprocessor$5 => '|o
rg.apache.phoenix.hbase.index.Indexer|1073741823|index.builder=org.apache.phoenix.index.PhoenixIndexBuilder,org.apache.hadoop.hbas
e.index.codec.class=org.apache.phoenix.index.PhoenixIndexCodec'}, {NAME =>
'0', DATA_BLOCK_ENCODING => 'FAST_DIFF', BLOOMFILTER =>
'ROW', REPLICATION_SCOPE => '0', VERSIONS => '1', COMPRESSION => 'NONE',
MIN_VERSIONS => '0', TTL => '2147483647', KEEP_DELETED_C
ELLS => 'true', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE =>
'true'}
1 row(s) in 0.0620 seconds
*Error when load data with Pig*
> [root@bd1 ~]# pig
> 2014-10-05 11:28:35,660 [main] INFO org.apache.pig.Main - Apache Pig
> version 0.12.1.2.1.1.0-385 (rexported) compiled Apr 16 2014, 15:59:00
> 2014-10-05 11:28:35,660 [main] INFO org.apache.pig.Main - Logging error
> messages to: /root/pig_1412483315658.log
> 2014-10-05 11:28:35,686 [main] INFO org.apache.pig.impl.util.Utils -
> Default bootup file /root/.pigbootup not found
> 2014-10-05 11:28:36,223 [main] INFO
> org.apache.hadoop.conf.Configuration.deprecation - mapred.job.tracker is
> deprecated. Instead, use mapreduce.jobtracker.address
> 2014-10-05 11:28:36,223 [main] INFO
> org.apache.hadoop.conf.Configuration.deprecation - fs.default.name is
> deprecated. Instead, use fs.defaultFS
> 2014-10-05 11:28:36,223 [main] INFO
> org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting
> to hadoop file system at: hdfs://bd1.local:8020
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in
> [jar:file:/usr/lib/hadoop/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in
> [jar:file:/usr/lib/pig/lib/phoenix-4.0.0.2.1.1.0-385-client.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
> explanation.
> SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
> 2014-10-05 11:28:37,087 [main] INFO
> org.apache.hadoop.conf.Configuration.deprecation - fs.default.name is
> deprecated. Instead, use fs.defaultFS
> grunt> register '/usr/lib/pig/lib/phoenix-4.0.0.2.1.1.0-385-client.jar'
>
> 2014-10-05 11:28:43,832 [main] INFO
> org.apache.hadoop.conf.Configuration.deprecation - fs.default.name is
> deprecated. Instead, use fs.defaultFS
> grunt> A = load 'hbase://table/device_all_app1' using
> org.apache.phoenix.pig.PhoenixHBaseLoader('localhost');
> 2014-10-05 11:28:58,499 [main] ERROR org.apache.pig.tools.grunt.Grunt -
> ERROR 1070: Could not resolve org.apache.phoenix.pig.PhoenixHBaseLoader
> using imports: [, java.lang., org.apache.pig.builtin.,
> org.apache.pig.impl.builtin.]
> Details at logfile: /root/pig_1412483315658.log
> grunt> A = load 'hbase://device_all_app1' using
> org.apache.phoenix.pig.PhoenixHBaseLoader('localhost');
> 2014-10-05 11:29:11,755 [main] ERROR org.apache.pig.tools.grunt.Grunt -
> ERROR 1070: Could not resolve org.apache.phoenix.pig.PhoenixHBaseLoader
> using imports: [, java.lang., org.apache.pig.builtin.,
> org.apache.pig.impl.builtin.]
> Details at logfile: /root/pig_1412483315658.log
Thanks a lot.
--
*-----------------------------------------*
*Pham Phuong TuBack-end & Big data developerSkype: phamphuongtu*