apache pig - Unable to read input file : Pig store to MYSQL using DBStorage -


i trying store data mysql using dbstorage in pig script. when run the script ,i getting error unable read input file. whereas when try dump store same data file working fine. sample pigscript :

%default database_host 'localhost'; %default database_name 'test'; %default database_user 'username'; %default database_pass 'password'; %default database_driver 'com.mysql.jdbc.driver'; %default database_type 'mysql';    = load '/tmp/testdivya/pig/pigsqltest.txt' using pigstorage() (name: chararray); store 'test' using org.apache.pig.piggybank.storage.dbstorage('$database_driver', 'jdbc:$database_type://$database_host/$database_name',  '$database_user', '$database_pass', 'insert test(name) values (?)');  hadoopversion   pigversion      userid  startedat       finishedat      features 2.7.1.2.3.4.0-3485      0.15.0.2.3.4.0-3485     hdfs    2016-01-21 01:34:552016-01-21 01:35:07      unknown  failed!  failed jobs: jobid   alias   feature message outputs job_1453263223178_0042        map_only        message: job failed!    hdfs://ip-xxx-xx-xx-xxx.ap-southeast-1.compute.internal:8020/user/hdfs/test,  input(s): failed read data "/tmp/testdivya/pig/pigsqltest.txt"  output(s): failed produce result in "hdfs://ip-xxx-xx-xx-xxx.ap-xxxxxx-1.compute.internal:8020/user/hdfs/test"  counters: total records written : 0 total bytes written : 0 spillable memory manager spill count : 0 total bags proactively spilled: 0 total records proactively spilled: 0  job dag: job_1453263223178_0042 

my cluster set on ec2 having hortonworks hdp 2.3.4 , using hdp mysql database storing pig output.

would appreciate pointers.

thanks,

i found solution . have add mysql connector additional jars in pig.properties file. , worked . adding in pig console ,didn't helped.

thanks


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -