使用ISOHoursBetween()UDF时,PIG作业失败

时间:2014-03-12 16:07:32

标签: apache-pig

当使用Piggybank的ISOYearsBetween()API和DUMP语句时,我的Pig脚本失败了。但是DESCRIBE命令可以正常工作。 正确加载Piggybank jar,因为CustomFormatToISO()工作正常。

以下是脚本和日志。

Register piggybank.jar
Register joda-time-1.6.jar
DEFINE ISOYearsBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOYearsBetween();
DEFINE CustomFormatToISO org.apache.pig.piggybank.evaluation.datetime.convert.CustomFormatToISO();
DEFINE ISOHoursBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOHoursBetween();

daily = load '/user/hue/pig/examples/actio/status.csv' USING org.apache.pig.piggybank.storage.CSVExcelStorage() as
(cust_ref:chararray,event_code:chararray,event_date:chararray,event_time:chararray,depot:chararray,event_status:chararray);
status = filter daily by cust_ref != '"Consignment_No"';
refined = foreach status generate cust_ref,CustomFormatToISO(event_date, 'yyyy-MM-dd HH:mm:ss') as date, CustomFormatToISO(event_time, 'yyyy-MM-dd HH:mm:ss') as time,depot,event_status;
diffs = FOREACH refined GENERATE cust_ref,ISOHoursBetween(time,date) AS Hours;
describe diffs;
dump diffs;


LogsApache Pig version 0.11.0-cdh4.4.0 (rexported) 
compiled Sep 03 2013, 10:53:34

Run pig script using PigRunner.run() for Pig version 0.8+
2014-03-12 07:57:06,775 [main] INFO  org.apache.pig.Main  - Apache Pig version 0.11.0-cdh4.4.0 (rexported) compiled Sep 03 2013, 10:53:34
2014-03-12 07:57:06,775 [main] INFO  org.apache.pig.Main  - Apache Pig version 0.11.0-cdh4.4.0 (rexported) compiled Sep 03 2013, 10:53:34
2014-03-12 07:57:06,787 [main] INFO  org.apache.pig.Main  - Logging error messages to: /mapred/local/taskTracker/cloudera/jobcache/job_201403120637_0013/attempt_201403120637_0013_m_000000_0/work/pig-job_201403120637_0013.log
2014-03-12 07:57:06,787 [main] INFO  org.apache.pig.Main  - Logging error messages to: /mapred/local/taskTracker/cloudera/jobcache/job_201403120637_0013/attempt_201403120637_0013_m_000000_0/work/pig-job_201403120637_0013.log
2014-03-12 07:57:06,916 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.df.interval is deprecated. Instead, use fs.df.interval
2014-03-12 07:57:06,916 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.max.objects is deprecated. Instead, use dfs.namenode.max.objects
2014-03-12 07:57:06,916 [main] WARN  org.apache.hadoop.conf.Configuration  - hadoop.native.lib is deprecated. Instead, use io.native.lib.available
2014-03-12 07:57:06,916 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.data.dir is deprecated. Instead, use dfs.datanode.data.dir
2014-03-12 07:57:06,916 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.name.dir is deprecated. Instead, use dfs.namenode.name.dir
2014-03-12 07:57:06,916 [main] WARN  org.apache.hadoop.conf.Configuration  - fs.default.name is deprecated. Instead, use fs.defaultFS
2014-03-12 07:57:06,917 [main] WARN  org.apache.hadoop.conf.Configuration  - fs.checkpoint.dir is deprecated. Instead, use dfs.namenode.checkpoint.dir
2014-03-12 07:57:06,917 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.block.size is deprecated. Instead, use dfs.blocksize
2014-03-12 07:57:06,917 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.access.time.precision is deprecated. Instead, use dfs.namenode.accesstime.precision
2014-03-12 07:57:06,917 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.replication.min is deprecated. Instead, use dfs.namenode.replication.min
2014-03-12 07:57:06,917 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.name.edits.dir is deprecated. Instead, use dfs.namenode.edits.dir
2014-03-12 07:57:06,917 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.replication.considerLoad is deprecated. Instead, use dfs.namenode.replication.considerLoad
2014-03-12 07:57:06,918 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.balance.bandwidthPerSec is deprecated. Instead, use dfs.datanode.balance.bandwidthPerSec
2014-03-12 07:57:06,918 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.safemode.threshold.pct is deprecated. Instead, use dfs.namenode.safemode.threshold-pct
2014-03-12 07:57:06,918 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.http.address is deprecated. Instead, use dfs.namenode.http-address
2014-03-12 07:57:06,918 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.name.dir.restore is deprecated. Instead, use dfs.namenode.name.dir.restore
2014-03-12 07:57:06,918 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.https.client.keystore.resource is deprecated. Instead, use dfs.client.https.keystore.resource
2014-03-12 07:57:06,918 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.backup.address is deprecated. Instead, use dfs.namenode.backup.address
2014-03-12 07:57:06,918 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.backup.http.address is deprecated. Instead, use dfs.namenode.backup.http-address
2014-03-12 07:57:06,918 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.permissions is deprecated. Instead, use dfs.permissions.enabled
2014-03-12 07:57:06,918 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.safemode.extension is deprecated. Instead, use dfs.namenode.safemode.extension
2014-03-12 07:57:06,918 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.datanode.max.xcievers is deprecated. Instead, use dfs.datanode.max.transfer.threads
2014-03-12 07:57:06,918 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.https.need.client.auth is deprecated. Instead, use dfs.client.https.need-auth
2014-03-12 07:57:06,918 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.https.address is deprecated. Instead, use dfs.namenode.https-address
2014-03-12 07:57:06,919 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.replication.interval is deprecated. Instead, use dfs.namenode.replication.interval
2014-03-12 07:57:06,919 [main] WARN  org.apache.hadoop.conf.Configuration  - fs.checkpoint.edits.dir is deprecated. Instead, use dfs.namenode.checkpoint.edits.dir
2014-03-12 07:57:06,919 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.write.packet.size is deprecated. Instead, use dfs.client-write-packet-size
2014-03-12 07:57:06,919 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.permissions.supergroup is deprecated. Instead, use dfs.permissions.superusergroup
2014-03-12 07:57:06,919 [main] WARN  org.apache.hadoop.conf.Configuration  - topology.script.number.args is deprecated. Instead, use net.topology.script.number.args
2014-03-12 07:57:06,919 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.umaskmode is deprecated. Instead, use fs.permissions.umask-mode
2014-03-12 07:57:06,919 [main] WARN  org.apache.hadoop.conf.Configuration  - dfs.secondary.http.address is deprecated. Instead, use dfs.namenode.secondary.http-address
2014-03-12 07:57:06,919 [main] WARN  org.apache.hadoop.conf.Configuration  - fs.checkpoint.period is deprecated. Instead, use dfs.namenode.checkpoint.period
2014-03-12 07:57:06,919 [main] WARN  org.apache.hadoop.conf.Configuration  - topology.node.switch.mapping.impl is deprecated. Instead, use net.topology.node.switch.mapping.impl
2014-03-12 07:57:06,924 [main] WARN  org.apache.hadoop.conf.Configuration  - io.bytes.per.checksum is deprecated. Instead, use dfs.bytes-per-checksum
2014-03-12 07:57:06,937 [main] INFO  org.apache.pig.impl.util.Utils  - Default bootup file /usr/lib/hadoop/.pigbootup not found
2014-03-12 07:57:06,937 [main] INFO  org.apache.pig.impl.util.Utils  - Default bootup file /usr/lib/hadoop/.pigbootup not found
2014-03-12 07:57:07,079 [main] WARN  org.apache.hadoop.conf.Configuration  - fs.default.name is deprecated. Instead, use fs.defaultFS
2014-03-12 07:57:07,079 [main] INFO  org.apache.pig.backend.hadoop.executionengine.HExecutionEngine  - Connecting to hadoop file system at: hdfs://localhost.localdomain:8020
2014-03-12 07:57:07,079 [main] INFO  org.apache.pig.backend.hadoop.executionengine.HExecutionEngine  - Connecting to hadoop file system at: hdfs://localhost.localdomain:8020
2014-03-12 07:57:07,081 [main] WARN  org.apache.hadoop.conf.Configuration  - io.bytes.per.checksum is deprecated. Instead, use dfs.bytes-per-checksum
2014-03-12 07:57:07,089 [main] INFO  org.apache.pig.backend.hadoop.executionengine.HExecutionEngine  - Connecting to map-reduce job tracker at: localhost.localdomain:8021
2014-03-12 07:57:07,089 [main] INFO  org.apache.pig.backend.hadoop.executionengine.HExecutionEngine  - Connecting to map-reduce job tracker at: localhost.localdomain:8021
diffs: {cust_ref: chararray,Hours: long}
2014-03-12 07:57:08,044 [main] INFO  org.apache.pig.tools.pigstats.ScriptState  - Pig features used in the script: FILTER
2014-03-12 07:57:08,044 [main] INFO  org.apache.pig.tools.pigstats.ScriptState  - Pig features used in the script: FILTER
2014-03-12 07:57:08,131 [main] INFO  org.apache.pig.newplan.logical.rules.ColumnPruneVisitor  - Columns pruned for daily: $1, $4, $5
2014-03-12 07:57:08,131 [main] INFO  org.apache.pig.newplan.logical.rules.ColumnPruneVisitor  - Columns pruned for daily: $1, $4, $5
2014-03-12 07:57:08,356 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MRCompiler  - File concatenation threshold: 100 optimistic? false
2014-03-12 07:57:08,356 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MRCompiler  - File concatenation threshold: 100 optimistic? false
2014-03-12 07:57:08,438 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MultiQueryOptimizer  - MR plan size before optimization: 1
2014-03-12 07:57:08,438 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MultiQueryOptimizer  - MR plan size before optimization: 1
2014-03-12 07:57:08,438 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MultiQueryOptimizer  - MR plan size after optimization: 1
2014-03-12 07:57:08,438 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MultiQueryOptimizer  - MR plan size after optimization: 1
2014-03-12 07:57:08,590 [main] WARN  org.apache.pig.backend.hadoop23.PigJobControl  - falling back to default JobControl (not using hadoop 0.23 ?)
java.lang.NoSuchFieldException: jobsInProgress
    at java.lang.Class.getDeclaredField(Class.java:1882)
    at org.apache.pig.backend.hadoop23.PigJobControl.<clinit>(PigJobControl.java:58)
    at org.apache.pig.backend.hadoop.executionengine.shims.HadoopShims.newJobControl(HadoopShims.java:102)
    at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.compile(JobControlCompiler.java:285)
    at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher.launchPig(MapReduceLauncher.java:177)
    at org.apache.pig.PigServer.launchPlan(PigServer.java:1266)
    at org.apache.pig.PigServer.executeCompiledLogicalPlan(PigServer.java:1251)
    at org.apache.pig.PigServer.storeEx(PigServer.java:933)
    at org.apache.pig.PigServer.store(PigServer.java:900)
    at org.apache.pig.PigServer.openIterator(PigServer.java:813)
    at org.apache.pig.tools.grunt.GruntParser.processDump(GruntParser.java:696)
    at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:320)
    at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:194)
    at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:170)
    at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:84)
    at org.apache.pig.Main.run(Main.java:475)
    at org.apache.pig.PigRunner.run(PigRunner.java:49)
    at org.apache.oozie.action.hadoop.PigMain.runPigJob(PigMain.java:283)
    at org.apache.oozie.action.hadoop.PigMain.run(PigMain.java:223)
    at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:37)
    at org.apache.oozie.action.hadoop.PigMain.main(PigMain.java:76)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:495)
    at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:50)
    at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:417)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:332)
    at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:396)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1408)
    at org.apache.hadoop.mapred.Child.main(Child.java:262)
2014-03-12 07:57:08,590 [main] WARN  org.apache.pig.backend.hadoop23.PigJobControl  - falling back to default JobControl (not using hadoop 0.23 ?)
java.lang.NoSuchFieldException: jobsInProgress
    at java.lang.Class.getDeclaredField(Class.java:1882)
    at org.apache.pig.backend.hadoop23.PigJobControl.<clinit>(PigJobControl.java:58)
    at org.apache.pig.backend.hadoop.executionengine.shims.HadoopShims.newJobControl(HadoopShims.java:102)
    at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.compile(JobControlCompiler.java:285)
    at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher.launchPig(MapReduceLauncher.java:177)
    at org.apache.pig.PigServer.launchPlan(PigServer.java:1266)
    at org.apache.pig.PigServer.executeCompiledLogicalPlan(PigServer.java:1251)
    at org.apache.pig.PigServer.storeEx(PigServer.java:933)
    at org.apache.pig.PigServer.store(PigServer.java:900)
    at org.apache.pig.PigServer.openIterator(PigServer.java:813)
    at org.apache.pig.tools.grunt.GruntParser.processDump(GruntParser.java:696)
    at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:320)
    at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:194)
    at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:170)
    at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:84)
    at org.apache.pig.Main.run(Main.java:475)
    at org.apache.pig.PigRunner.run(PigRunner.java:49)
    at org.apache.oozie.action.hadoop.PigMain.runPigJob(PigMain.java:283)
    at org.apache.oozie.action.hadoop.PigMain.run(PigMain.java:223)
    at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:37)
    at org.apache.oozie.action.hadoop.PigMain.main(PigMain.java:76)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:495)
    at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:50)
    at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:417)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:332)
    at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:396)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1408)
    at org.apache.hadoop.mapred.Child.main(Child.java:262)
2014-03-12 07:57:08,604 [main] INFO  org.apache.pig.tools.pigstats.ScriptState  - Pig script settings are added to the job
2014-03-12 07:57:08,604 [main] INFO  org.apache.pig.tools.pigstats.ScriptState  - Pig script settings are added to the job
2014-03-12 07:57:08,627 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler  - mapred.job.reduce.markreset.buffer.percent is not set, set to default 0.3
2014-03-12 07:57:08,627 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler  - mapred.job.reduce.markreset.buffer.percent is not set, set to default 0.3
2014-03-12 07:57:08,643 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler  - Using reducer estimator: org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.InputSizeReducerEstimator
2014-03-12 07:57:08,643 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler  - Using reducer estimator: org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.InputSizeReducerEstimator
2014-03-12 07:57:08,650 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.InputSizeReducerEstimator  - BytesPerReducer=1000000000 maxReducers=999 totalInputFileSize=12120523
2014-03-12 07:57:08,650 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.InputSizeReducerEstimator  - BytesPerReducer=1000000000 maxReducers=999 totalInputFileSize=12120523
2014-03-12 07:57:08,650 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler  - Setting Parallelism to 1
2014-03-12 07:57:08,650 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler  - Setting Parallelism to 1
2014-03-12 07:57:08,964 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler  - creating jar file Job3418500970455913591.jar
2014-03-12 07:57:08,964 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler  - creating jar file Job3418500970455913591.jar
2014-03-12 07:57:11,824 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler  - jar file Job3418500970455913591.jar created
2014-03-12 07:57:11,824 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler  - jar file Job3418500970455913591.jar created
2014-03-12 07:57:11,849 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler  - Setting up single store job
2014-03-12 07:57:11,849 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler  - Setting up single store job
2014-03-12 07:57:11,862 [main] INFO  org.apache.pig.data.SchemaTupleFrontend  - Key [pig.schematuple] is false, will not generate code.
2014-03-12 07:57:11,862 [main] INFO  org.apache.pig.data.SchemaTupleFrontend  - Key [pig.schematuple] is false, will not generate code.
2014-03-12 07:57:11,862 [main] INFO  org.apache.pig.data.SchemaTupleFrontend  - Starting process to move generated code to distributed cacche
2014-03-12 07:57:11,862 [main] INFO  org.apache.pig.data.SchemaTupleFrontend  - Starting process to move generated code to distributed cacche
2014-03-12 07:57:11,862 [main] INFO  org.apache.pig.data.SchemaTupleFrontend  - Setting key [pig.schematuple.classes] with classes to deserialize []
2014-03-12 07:57:11,862 [main] INFO  org.apache.pig.data.SchemaTupleFrontend  - Setting key [pig.schematuple.classes] with classes to deserialize []
2014-03-12 07:57:11,925 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher  - 1 map-reduce job(s) waiting for submission.
2014-03-12 07:57:11,925 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher  - 1 map-reduce job(s) waiting for submission.
2014-03-12 07:57:11,960 [JobControl] WARN  org.apache.hadoop.mapred.JobClient  - Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
2014-03-12 07:57:12,320 [JobControl] INFO  org.apache.hadoop.mapreduce.lib.input.FileInputFormat  - Total input paths to process : 1
2014-03-12 07:57:12,320 [JobControl] INFO  org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil  - Total input paths to process : 1
2014-03-12 07:57:12,320 [JobControl] INFO  org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil  - Total input paths to process : 1
2014-03-12 07:57:12,327 [JobControl] INFO  org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil  - Total input paths (combined) to process : 1
2014-03-12 07:57:12,327 [JobControl] INFO  org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil  - Total input paths (combined) to process : 1
2014-03-12 07:57:12,431 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher  - 0% complete
2014-03-12 07:57:12,431 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher  - 0% complete
2014-03-12 07:57:12,981 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher  - HadoopJobId: job_201403120637_0014
2014-03-12 07:57:12,981 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher  - HadoopJobId: job_201403120637_0014
2014-03-12 07:57:12,981 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher  - Processing aliases daily,diffs,refined,status
2014-03-12 07:57:12,981 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher  - Processing aliases daily,diffs,refined,status
2014-03-12 07:57:12,981 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher  - detailed locations: M: daily[7,8],daily[-1,-1],status[9,9],refined[10,10],diffs[11,8] C:  R: 
2014-03-12 07:57:12,981 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher  - detailed locations: M: daily[7,8],daily[-1,-1],status[9,9],refined[10,10],diffs[11,8] C:  R: 
2014-03-12 07:57:12,982 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher  - More information at: http://localhost.localdomain:50030/jobdetails.jsp?jobid=job_201403120637_0014
2014-03-12 07:57:12,982 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher  - More information at: http://localhost.localdomain:50030/jobdetails.jsp?jobid=job_201403120637_0014
Heart beat
2014-03-12 07:57:52,679 [main] WARN  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher  - Ooops! Some job has failed! Specify -stop_on_failure if you want Pig to stop immediately on failure.
2014-03-12 07:57:52,679 [main] WARN  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher  - Ooops! Some job has failed! Specify -stop_on_failure if you want Pig to stop immediately on failure.
2014-03-12 07:57:52,679 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher  - job job_201403120637_0014 has failed! Stop running all dependent jobs
2014-03-12 07:57:52,679 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher  - job job_201403120637_0014 has failed! Stop running all dependent jobs
2014-03-12 07:57:52,680 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher  - 100% complete
2014-03-12 07:57:52,680 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher  - 100% complete
2014-03-12 07:57:52,686 [main] ERROR org.apache.pig.tools.pigstats.SimplePigStats  - ERROR: null
2014-03-12 07:57:52,686 [main] ERROR org.apache.pig.tools.pigstats.SimplePigStats  - ERROR: null
2014-03-12 07:57:52,686 [main] ERROR org.apache.pig.tools.pigstats.PigStatsUtil  - 1 map reduce job(s) failed!
2014-03-12 07:57:52,686 [main] ERROR org.apache.pig.tools.pigstats.PigStatsUtil  - 1 map reduce job(s) failed!
2014-03-12 07:57:52,693 [main] INFO  org.apache.pig.tools.pigstats.SimplePigStats  - Script Statistics: 

HadoopVersion   PigVersion  UserId  StartedAt   FinishedAt  Features
2.0.0-mr1-cdh4.4.0  0.11.0-cdh4.4.0 mapred  2014-03-12 07:57:08 2014-03-12 07:57:52 FILTER

Failed!

Failed Jobs:
JobId   Alias   Feature Message Outputs
job_201403120637_0014   daily,diffs,refined,status  MAP_ONLY    Message: Job failed!    hdfs://localhost.localdomain:8020/tmp/temp1404625512/tmp649311321,

Input(s):
Failed to read data from "/user/hue/pig/examples/actio/status.csv"

Output(s):
Failed to produce result in "hdfs://localhost.localdomain:8020/tmp/temp1404625512/tmp649311321"

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_201403120637_0014


2014-03-12 07:57:52,693 [main] INFO  org.apache.pig.tools.pigstats.SimplePigStats  - Script Statistics: 

HadoopVersion   PigVersion  UserId  StartedAt   FinishedAt  Features
2.0.0-mr1-cdh4.4.0  0.11.0-cdh4.4.0 mapred  2014-03-12 07:57:08 2014-03-12 07:57:52 FILTER

Failed!

Failed Jobs:
JobId   Alias   Feature Message Outputs
job_201403120637_0014   daily,diffs,refined,status  MAP_ONLY    Message: Job failed!    hdfs://localhost.localdomain:8020/tmp/temp1404625512/tmp649311321,

Input(s):
Failed to read data from "/user/hue/pig/examples/actio/status.csv"

Output(s):
Failed to produce result in "hdfs://localhost.localdomain:8020/tmp/temp1404625512/tmp649311321"

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_201403120637_0014


2014-03-12 07:57:52,693 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher  - Failed!
2014-03-12 07:57:52,693 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher  - Failed!
2014-03-12 07:57:52,720 [main] ERROR org.apache.pig.tools.grunt.Grunt  - ERROR 1066: Unable to open iterator for alias diffs. Backend error : null
2014-03-12 07:57:52,720 [main] ERROR org.apache.pig.tools.grunt.Grunt  - ERROR 1066: Unable to open iterator for alias diffs. Backend error : null
Hadoop Job IDs executed by Pig: job_201403120637_0014

EDITED 我检查了作业及其空指针异常

java.lang.NullPointerException
at org.apache.pig.piggybank.evaluation.datetime.diff.ISOHoursBetween.exec(ISOHoursBetween.java:95)
at org.apache.pig.piggybank.evaluation.datetime.diff.ISOHoursBetween.exec(ISOHoursBetween.java:83)
at org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POUserFunc.getNext(POUserFunc.java:337)
at org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POUserFunc.getNext(POUserFunc.java:416)
at org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.getNext(PhysicalOperator.java:348)
at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:372)
at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:297)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.runPipeline(PigGenericMapBase.java:283)
at org.apache.pig.backend.hadoop.executionengine.mapReduc

然而,当我转储CustomFormatoISO()的输出时,它看起来很好。  我不明白为什么当 CustomFormatoISO ()的输出传递给 ISOHoursBetween ()时,它会导致NULL指针异常。 将硬编码值传递给ISOHoursBetween()可以正常工作。

下面是调用CustomFormatISO()

之后的DUMP(看起来很好,因此令人费解为什么我得到一个NULL异常)
(2013-01-11T00:00:00.000Z,1899-12-30T19:40:00.000Z,Hub 3 - Birmingham,Confirmed at Hub)
(2013-01-14T00:00:00.000Z,1899-12-30T04:36:00.000Z,London Bridge,Confirmed)

0 个答案:

没有答案