[prev in list] [next in list] [prev in thread] [next in thread]
List: hadoop-user
Subject: Job.getCounters() throws null pointer exception.
From: "Kamoliddinov, Elbek" <elbek.kamoliddinov () sap ! com>
Date: 2018-10-18 17:03:27
Message-ID: 1C75A494-FBE3-4915-9FD1-A765ECE4B8DA () contoso ! com
[Download RAW message or body]
[Attachment #2 (text/plain)]
Hi Hadoop community.
We are using Hadoop 2.6.0 with cdh 5.13.1 and we are getting following NP exception \
when Job#getCounters() method is called:
java.lang.NullPointerException: null
at org.apache.hadoop.mapreduce.counters.AbstractCounters.<init>(AbstractCounters.java:106)
at org.apache.hadoop.mapreduce.Counters.<init>(Counters.java:150)
at org.apache.hadoop.mapreduce.Job.getCounters(Job.java:508)
I know job completed successfully and it has counters. I think \
RunningJob#getCounters() returning null and AbstractCounters's constructor is trying \
to iterate over this null. What is the right way to get the Counters object from \
org.apache.hadoop.mapreduce.Job object that doesn't fail? The thing is this works \
most of the time and fails once in a while.
Any idea of what might be causing this?
Thanks.
Elbek.
[Attachment #3 (text/html)]
<html xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:Consolas;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hi Hadoop community. \
<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:11.0pt">We are \
using Hadoop 2.6.0 with cdh 5.13.1 and we are getting following NP exception when \
Job#getCounters() method is called:<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt">java.lang.NullPointerException: null<o:p></o:p></span></p> \
<p class="MsoNormal"><span \
style="font-size:11.0pt"> \
at org.apache.hadoop.mapreduce.counters.AbstractCounters.<init>(AbstractCounters.java:106)<o:p></o:p></span></p>
<p class="MsoNormal"><span \
style="font-size:11.0pt"> \
at org.apache.hadoop.mapreduce.Counters.<init>(Counters.java:150)<o:p></o:p></span></p>
<p class="MsoNormal"><span \
style="font-size:11.0pt"> \
at org.apache.hadoop.mapreduce.Job.getCounters(Job.java:508)<o:p></o:p></span></p> <p \
class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p> <p \
class="MsoNormal"><span style="font-size:11.0pt">I know job completed successfully \
and it has counters. I think RunningJob#getCounters() returning null and \
AbstractCounters's constructor is trying to iterate over this null. What is the right \
way to get the Counters object from org.apache.hadoop.mapreduce.Job object that \
doesn't fail? The thing is this works most of the time and fails once in a while. \
<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt"><o:p> </o:p></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt">Any idea of what might be causing this? \
<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt"><o:p> </o:p></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt">Thanks. <o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt">Elbek. <o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt"><o:p> </o:p></span></p> </div>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic