Reply
Explorer
Posts: 8
Registered: ‎03-22-2016

job.xml is empty when executing a hadoop job on local

Hi

 
I am executing a Map/Reduce job (with in a mvn java project) on eclipse, using ToolRunner, in a local mode on windows.
 
My process is throwing 'Premature end of file exception'  (exception attached below).  After debugging the process, the process is failing to parse as the job.xml file is empty.
 
Can someone please explain why job.xml at location .\staging\job_local13332333\job.xml could be empty?  (File exists but no content available in the file)  
 
 
Exception
[Fatal Error] :-1:-1: Premature end of file.
Exception in thread "main" java.lang.RuntimeException: org.xml.sax.SAXParseException; Premature end of file.
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2152)
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2011)
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:1918)
at org.apache.hadoop.conf.Configuration.get(Configuration.java:721)
at org.apache.hadoop.mapred.JobConf.checkAndWarnDeprecation(JobConf.java:2020)
at org.apache.hadoop.mapred.JobConf.<init>(JobConf.java:476)
at org.apache.hadoop.mapred.LocalJobRunner$Job.<init>(LocalJobRunner.java:147)
at org.apache.hadoop.mapred.LocalJobRunner.submitJob(LocalJobRunner.java:636)
at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:430)
at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1268)
at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1265)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
at org.apache.hadoop.mapreduce.Job.submit(Job.java:1265)
at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:562)
at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:557)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:557)
at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:548)
at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:833)
at test.practice.hadoop.test.ProcessUnitsToolRunner.run(ProcessUnitsToolRunner.java:134)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
at test.practice.hadoop.test.ProcessUnitsToolRunner.main(ProcessUnitsToolRunner.java:146)
Caused by: org.xml.sax.SAXParseException; Premature end of file.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)
at org.apache.hadoop.conf.Configuration.parse(Configuration.java:1989)
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2058)
... 26 more
 
 
Below is my code.
 
 
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.StringTokenizer;

import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapred.FileInputFormat;
import org.apache.hadoop.mapred.FileOutputFormat;
import org.apache.hadoop.mapred.JobClient;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapred.MapReduceBase;
import org.apache.hadoop.mapred.Mapper;
import org.apache.hadoop.mapred.OutputCollector;
import org.apache.hadoop.mapred.Reducer;
import org.apache.hadoop.mapred.Reporter;
import org.apache.hadoop.mapred.TextInputFormat;
import org.apache.hadoop.mapred.TextOutputFormat;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;

import test.practice..util.FileFilter;

public class ProcessUnitsToolRunner extends Configured implements Tool {
// Mapper class
/*
* Output value Type
*/
public static class E_EMapper extends MapReduceBase implements Mapper<LongWritable, Text, Text, IntWritable> {

// Map function
public void map(LongWritable key, Text value, OutputCollector<Text, IntWritable> output, Reporter reporter)
throws IOException {
String line = value.toString();
String lasttoken = null;
StringTokenizer s = new StringTokenizer(line, "\t");
String year = s.nextToken();

while (s.hasMoreTokens()) {
lasttoken = s.nextToken();
}

int avgprice = Integer.parseInt(lasttoken);
output.collect(new Text(year), new IntWritable(avgprice));
}
}

// Reducer class
public static class E_EReduce extends MapReduceBase implements Reducer<Text, IntWritable, Text, IntWritable> {

// Reduce function
public void reduce(Text key, Iterator<IntWritable> values, OutputCollector<Text, IntWritable> output,
Reporter reporter) throws IOException {
int maxavg = 30;
int val = Integer.MIN_VALUE;

while (values.hasNext()) {
if ((val = values.next().get()) > maxavg) {
output.collect(key, new IntWritable(val));
}
}

}
}

 
public int run(String[] args) throws Exception {

JobConf conf = new JobConf(ProcessUnits.class);

conf.setJobName("max_eletricityunits");
conf.setOutputKeyClass(Text.class);
conf.setOutputValueClass(IntWritable.class);
conf.setMapperClass(E_EMapper.class);
conf.setCombinerClass(E_EReduce.class);
conf.setReducerClass(E_EReduce.class);
conf.setInputFormat(TextInputFormat.class);
conf.setOutputFormat(TextOutputFormat.class);
 

List<String> other_args = new ArrayList<String>();
for (int i = 0; i < args.length; ++i) {
try {
if ("-m".equals(args[i])) {
conf.setNumMapTasks(Integer.parseInt(args[++i]));
} else if ("-r".equals(args[i])) {
conf.setNumReduceTasks(Integer.parseInt(args[++i]));
} else {
other_args.add(args[i]);
}
} catch (NumberFormatException except) {
System.out.println("ERROR: Integer expected instead of " + args[i]);
return printUsage();
} catch (ArrayIndexOutOfBoundsException except) {
System.out.println("ERROR: Required parameter missing from " + args[i - 1]);
return printUsage();
}
}
// Make sure there are exactly 2 parameters left.
if (other_args.size() != 2) {
System.out.println("ERROR: Wrong number of parameters: " + other_args.size() + " instead of 2.");
return printUsage();
}

FileInputFormat.setInputPathFilter(conf, FileFilter.class);
FileInputFormat.setInputPaths(conf, new Path(args[0]));
FileOutputFormat.setOutputPath(conf, new Path(args[1]));

JobClient.runJob(conf);
return 0;
}

static int printUsage() {
System.out.println("wordcount [-m <maps>] [-r <reduces>] <input> <output>");
ToolRunner.printGenericCommandUsage(System.out);
return -1;
}

public static void main(String[] args) throws Exception {
ProcessUnitsToolRunner driver = new ProcessUnitsToolRunner();
int exitCode = ToolRunner.run(driver, args);
System.exit(exitCode);
}

}
 
Using Windows 7, 64-bit operating system. 
 
Please update, if you require any further details.
 
 
Thank you.
Cloudera Employee
Posts: 55
Registered: ‎03-07-2016

Re: job.xml is empty when executing a hadoop job on local

Do you still have your log output? It may tell more about what happened.

Explorer
Posts: 8
Registered: ‎03-22-2016

Re: job.xml is empty when executing a hadoop job on local

Hi  I reproduced it again.  It is exactly what i have posted earlier.  Are you referring to any other log?

 

[Fatal Error] :-1:-1: Premature end of file.
Exception in thread "main" java.lang.RuntimeException: org.xml.sax.SAXParseException; Premature end of file.
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2152)
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2011)
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:1918)
at org.apache.hadoop.conf.Configuration.get(Configuration.java:721)
at org.apache.hadoop.mapred.JobConf.checkAndWarnDeprecation(JobConf.java:2020)
at org.apache.hadoop.mapred.JobConf.<init>(JobConf.java:476)
at org.apache.hadoop.mapred.LocalJobRunner$Job.<init>(LocalJobRunner.java:147)
at org.apache.hadoop.mapred.LocalJobRunner.submitJob(LocalJobRunner.java:636)
at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:430)
at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1268)
at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1265)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
at org.apache.hadoop.mapreduce.Job.submit(Job.java:1265)
at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:562)
at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:557)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:557)
at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:548)
at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:833)
at test.practice.hadoop.test.ProcessUnitsToolRunner.run(ProcessUnitsToolRunner.java:134)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
at test.practice.hadoop.test.ProcessUnitsToolRunner.main(ProcessUnitsToolRunner.java:146)
Caused by: org.xml.sax.SAXParseException; Premature end of file.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)
at org.apache.hadoop.conf.Configuration.parse(Configuration.java:1989)
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2058)
... 26 more
Cloudera Employee
Posts: 55
Registered: ‎03-07-2016

Re: job.xml is empty when executing a hadoop job on local

Yes, I mean can you also post the context in the log where this exception happened (log output before this) ?

Explorer
Posts: 8
Registered: ‎03-22-2016

Re: job.xml is empty when executing a hadoop job on local

Hi

 

Below is the complete log.  Do you think, it is failing due to deprecated configuration?

 

2016-03-29 13:54:38,721 WARN  [org.apache.hadoop.util.NativeCodeLoader] (main:) Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2016-03-29 13:54:38,845 WARN  [] (main:) Your hostname, AUST3908 resolves to a loopback/non-reachable address: 192.168.8.37, but we couldn't find any external IP address!
2016-03-29 13:54:38,905 INFO  [org.apache.hadoop.conf.Configuration.deprecation] (main:) session.id is deprecated. Instead, use dfs.metrics.session-id
2016-03-29 13:54:38,906 INFO  [org.apache.hadoop.metrics.jvm.JvmMetrics] (main:) Initializing JVM Metrics with processName=JobTracker, sessionId=
2016-03-29 13:54:38,919 INFO  [org.apache.hadoop.metrics.jvm.JvmMetrics] (main:) Cannot initialize JVM Metrics with processName=JobTracker, sessionId= - already initialized
2016-03-29 13:54:39,160 WARN  [org.apache.hadoop.mapreduce.JobSubmitter] (main:) Hadoop command-line option parsing not performed. Implement the Tool interface and execute your application with ToolRunner to remedy this.
2016-03-29 13:54:39,271 WARN  [org.apache.hadoop.mapreduce.JobSubmitter] (main:) No job jar file set.  User classes may not be found. See Job or Job#setJar(String).
2016-03-29 13:54:39,402 INFO  [org.apache.hadoop.mapred.FileInputFormat] (main:) Total input paths to process : 1
2016-03-29 13:54:39,855 INFO  [org.apache.hadoop.mapreduce.JobSubmitter] (main:) number of splits:1
2016-03-29 13:54:40,078 INFO  [org.apache.hadoop.conf.Configuration.deprecation] (main:) user.name is deprecated. Instead, use mapreduce.job.user.name
2016-03-29 13:54:40,079 INFO  [org.apache.hadoop.conf.Configuration.deprecation] (main:) mapred.output.value.class is deprecated. Instead, use mapreduce.job.output.value.class
2016-03-29 13:54:40,080 INFO  [org.apache.hadoop.conf.Configuration.deprecation] (main:) mapred.job.name is deprecated. Instead, use mapreduce.job.name
2016-03-29 13:54:40,080 INFO  [org.apache.hadoop.conf.Configuration.deprecation] (main:) mapred.input.dir is deprecated. Instead, use mapreduce.input.fileinputformat.inputdir
2016-03-29 13:54:40,080 INFO  [org.apache.hadoop.conf.Configuration.deprecation] (main:) mapred.output.dir is deprecated. Instead, use mapreduce.output.fileoutputformat.outputdir
2016-03-29 13:54:40,080 INFO  [org.apache.hadoop.conf.Configuration.deprecation] (main:) mapred.map.tasks is deprecated. Instead, use mapreduce.job.maps
2016-03-29 13:54:40,080 INFO  [org.apache.hadoop.conf.Configuration.deprecation] (main:) mapred.output.key.class is deprecated. Instead, use mapreduce.job.output.key.class
2016-03-29 13:54:40,081 INFO  [org.apache.hadoop.conf.Configuration.deprecation] (main:) mapred.working.dir is deprecated. Instead, use mapreduce.job.working.dir
2016-03-29 13:54:40,295 INFO  [org.apache.hadoop.mapreduce.JobSubmitter] (main:) Submitting tokens for job: job_local974764420_0001
[Fatal Error] :-1:-1: Premature end of file.
2016-03-29 13:54:40,363 ERROR [org.apache.hadoop.conf.Configuration] (main:) error parsing conf file:/tmp/hadoop-pbaisani/mapred/staging/xxx974764420/.staging/job_local974764420_0001/job.xml
org.xml.sax.SAXParseException; Premature end of file.
	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)
	at org.apache.hadoop.conf.Configuration.parse(Configuration.java:1989)
	at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2058)
	at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2011)
	at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:1918)
	at org.apache.hadoop.conf.Configuration.get(Configuration.java:721)
	at org.apache.hadoop.mapred.JobConf.checkAndWarnDeprecation(JobConf.java:2020)
	at org.apache.hadoop.mapred.JobConf.<init>(JobConf.java:476)
	at org.apache.hadoop.mapred.LocalJobRunner$Job.<init>(LocalJobRunner.java:147)
	at org.apache.hadoop.mapred.LocalJobRunner.submitJob(LocalJobRunner.java:636)
	at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:430)
	at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1268)
	at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1265)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:415)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
	at org.apache.hadoop.mapreduce.Job.submit(Job.java:1265)
	at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:562)
	at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:557)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:415)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
	at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:557)
	at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:548)
	at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:833)
	at test.practice.hadoop.test.ProcessUnitsToolRunner.run(ProcessUnitsToolRunner.java:116)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
	at test.practice.hadoop.test.ProcessUnitsToolRunner.main(ProcessUnitsToolRunner.java:128)
2016-03-29 13:54:40,365 INFO  [org.apache.hadoop.mapreduce.JobSubmitter] (main:) Cleaning up the staging area file:/tmp/hadoop-pbaisani/mapred/staging/pbaisani974764420/.staging/job_local974764420_0001
Exception in thread "main" java.lang.RuntimeException: org.xml.sax.SAXParseException; Premature end of file.
	at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2152)
	at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2011)
	at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:1918)
	at org.apache.hadoop.conf.Configuration.get(Configuration.java:721)
	at org.apache.hadoop.mapred.JobConf.checkAndWarnDeprecation(JobConf.java:2020)
	at org.apache.hadoop.mapred.JobConf.<init>(JobConf.java:476)
	at org.apache.hadoop.mapred.LocalJobRunner$Job.<init>(LocalJobRunner.java:147)
	at org.apache.hadoop.mapred.LocalJobRunner.submitJob(LocalJobRunner.java:636)
	at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:430)
	at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1268)
	at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1265)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:415)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
	at org.apache.hadoop.mapreduce.Job.submit(Job.java:1265)
	at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:562)
	at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:557)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:415)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
	at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:557)
	at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:548)
	at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:833)
	at test.practice.hadoop.test.ProcessUnitsToolRunner.run(ProcessUnitsToolRunner.java:116)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
	at test.practice.hadoop.test.ProcessUnitsToolRunner.main(ProcessUnitsToolRunner.java:128)
Caused by: org.xml.sax.SAXParseException; Premature end of file.
	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)
	at org.apache.hadoop.conf.Configuration.parse(Configuration.java:1989)
	at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2058)
	... 26 more
Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
Picked up _JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:"C:\Program Files (x86)\HP\Unified Functional Testing\bin\java_shared\classes";"C:\Program Files (x86)\HP\Unified Functional Testing\\bin\java_shared\classes\jasmine.jar"
Explorer
Posts: 8
Registered: ‎03-22-2016

Re: job.xml is empty when executing a hadoop job on local

Hi

 

I was using hadoop 2.2 before and got the deprecation messages.  I have started using hadoop 2.3, deprecation messages are gone but still the 'Premature end of file' problem still exists.  Below is the complete log.  Any suggestions will be aprreciated.  Thanks

 

2016-03-29 14:26:43,985 WARN  [org.apache.hadoop.util.NativeCodeLoader] (main:) Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2016-03-29 14:26:44,110 WARN  [] (main:) Your hostname, AUST3908 resolves to a loopback/non-reachable address: 192.168.8.37, but we couldn't find any external IP address!
2016-03-29 14:26:44,221 INFO  [org.apache.hadoop.conf.Configuration.deprecation] (main:) session.id is deprecated. Instead, use dfs.metrics.session-id
2016-03-29 14:26:44,222 INFO  [org.apache.hadoop.metrics.jvm.JvmMetrics] (main:) Initializing JVM Metrics with processName=JobTracker, sessionId=
2016-03-29 14:26:44,240 INFO  [org.apache.hadoop.metrics.jvm.JvmMetrics] (main:) Cannot initialize JVM Metrics with processName=JobTracker, sessionId= - already initialized
2016-03-29 14:26:46,119 WARN  [org.apache.hadoop.mapreduce.JobSubmitter] (main:) Hadoop command-line option parsing not performed. Implement the Tool interface and execute your application with ToolRunner to remedy this.
2016-03-29 14:26:46,243 WARN  [org.apache.hadoop.mapreduce.JobSubmitter] (main:) No job jar file set.  User classes may not be found. See Job or Job#setJar(String).
2016-03-29 14:26:46,396 INFO  [org.apache.hadoop.mapred.FileInputFormat] (main:) Total input paths to process : 1
2016-03-29 14:26:46,902 INFO  [org.apache.hadoop.mapreduce.JobSubmitter] (main:) number of splits:1
2016-03-29 14:26:47,349 INFO  [org.apache.hadoop.mapreduce.JobSubmitter] (main:) Submitting tokens for job: job_local1372946845_0001
[Fatal Error] :-1:-1: Premature end of file.
2016-03-29 14:26:47,417 ERROR [org.apache.hadoop.conf.Configuration] (main:) error parsing conf file:/tmp/hadoop-pbaisani/mapred/staging/pbaisani1372946845/.staging/job_local1372946845_0001/job.xml
org.xml.sax.SAXParseException; Premature end of file.
	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)
	at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2160)
	at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2229)
	at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2182)
	at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2089)
	at org.apache.hadoop.conf.Configuration.get(Configuration.java:838)
	at org.apache.hadoop.mapred.JobConf.checkAndWarnDeprecation(JobConf.java:2020)
	at org.apache.hadoop.mapred.JobConf.<init>(JobConf.java:476)
	at org.apache.hadoop.mapred.LocalJobRunner$Job.<init>(LocalJobRunner.java:147)
	at org.apache.hadoop.mapred.LocalJobRunner.submitJob(LocalJobRunner.java:636)
	at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:430)
	at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1268)
	at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1265)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:415)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
	at org.apache.hadoop.mapreduce.Job.submit(Job.java:1265)
	at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:562)
	at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:557)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:415)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
	at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:557)
	at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:548)
	at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:833)
	at test.practice.hadoop.test.ProcessUnitsToolRunner.run(ProcessUnitsToolRunner.java:114)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
	at test.practice.hadoop.test.ProcessUnitsToolRunner.main(ProcessUnitsToolRunner.java:127)
2016-03-29 14:26:47,419 INFO  [org.apache.hadoop.mapreduce.JobSubmitter] (main:) Cleaning up the staging area file:/tmp/hadoop-pbaisani/mapred/staging/xxx1372946845/.staging/job_local1372946845_0001
Exception in thread "main" java.lang.RuntimeException: org.xml.sax.SAXParseException; Premature end of file.
	at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2325)
	at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2182)
	at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2089)
	at org.apache.hadoop.conf.Configuration.get(Configuration.java:838)
	at org.apache.hadoop.mapred.JobConf.checkAndWarnDeprecation(JobConf.java:2020)
	at org.apache.hadoop.mapred.JobConf.<init>(JobConf.java:476)
	at org.apache.hadoop.mapred.LocalJobRunner$Job.<init>(LocalJobRunner.java:147)
	at org.apache.hadoop.mapred.LocalJobRunner.submitJob(LocalJobRunner.java:636)
	at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:430)
	at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1268)
	at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1265)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:415)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
	at org.apache.hadoop.mapreduce.Job.submit(Job.java:1265)
	at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:562)
	at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:557)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:415)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
	at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:557)
	at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:548)
	at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:833)
	at test.practice.hadoop.test.ProcessUnitsToolRunner.run(ProcessUnitsToolRunner.java:114)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
	at test.practice.hadoop.test.ProcessUnitsToolRunner.main(ProcessUnitsToolRunner.java:127)
Caused by: org.xml.sax.SAXParseException; Premature end of file.
	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)
	at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2160)
	at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2229)
	... 26 more
Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
Picked up _JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:"C:\Program Files (x86)\HP\Unified Functional Testing\bin\java_shared\classes";"C:\Program Files (x86)\HP\Unified Functional Testing\\bin\java_shared\classes\jasmine.jar"
Contributor
Posts: 50
Registered: ‎08-05-2015

Re: job.xml is empty when executing a hadoop job on local

Perhaps a snippet of your code might help.  I'm wondering if youre mapper, reducer, combiner, outputkey, outputvalue classes in your job object?

 

What is your command to execute the MR job or are you doing it through an IDE?

Contributor
Posts: 50
Registered: ‎08-05-2015

Re: job.xml is empty when executing a hadoop job on local

Apologies...  IE didn't show me all of the code you pasted... Chrome did. :(

Announcements