Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 68E7D200BDE for ; Mon, 7 Nov 2016 16:19:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 67A1D160AEB; Mon, 7 Nov 2016 15:19:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9B5D3160AEC for ; Mon, 7 Nov 2016 16:19:00 +0100 (CET) Received: (qmail 28377 invoked by uid 500); 7 Nov 2016 15:18:59 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 28355 invoked by uid 99); 7 Nov 2016 15:18:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Nov 2016 15:18:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 3982B2C2A6A for ; Mon, 7 Nov 2016 15:18:59 +0000 (UTC) Date: Mon, 7 Nov 2016 15:18:59 +0000 (UTC) From: "Chaoyu Tang (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-15139) HoS local mode fails with NumberFormatException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 07 Nov 2016 15:19:01 -0000 [ https://issues.apache.org/jira/browse/HIVE-15139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15644452#comment-15644452 ] Chaoyu Tang commented on HIVE-15139: ------------------------------------ Thanks [~lirui] for the patch, it looks good to me. I ran into the exactly same issue when playing with the HoS statistics, and worked it around by passing 0 instead of Integer.parseInt(stageId) to metricsCollection.addMetrics just like the taskId. I thought stageId would not be used anyway when we get all metrics from metricsCollection (metricsCollection.getAllMetrics()) in getSparkStatistics. My change is like following: {code} @@ -143,7 +143,7 @@ public SparkStatistics getSparkStatistics() { List taskMetrics = jobMetric.get(stageId); for (TaskMetrics taskMetric : taskMetrics) { Metrics metrics = new Metrics(taskMetric); - metricsCollection.addMetrics(jobId, Integer.parseInt(stageId), 0, metrics); + metricsCollection.addMetrics(jobId, 0, 0, metrics); } } SparkJobUtils sparkJobUtils = new SparkJobUtils(); {code} Your patch removes the stageAttemptId from jobMetrics, I wonder if it might still be useful for some other metrics (e.g. average times a stage attempted)? It is my first time to look into HoS, I wonder if my question makes sense. Thanks. > HoS local mode fails with NumberFormatException > ----------------------------------------------- > > Key: HIVE-15139 > URL: https://issues.apache.org/jira/browse/HIVE-15139 > Project: Hive > Issue Type: Bug > Reporter: Rui Li > Assignee: Rui Li > Attachments: HIVE-15139.1.patch > > > It's because we store {{stageId_attemptNum}} in JobMetricsListener but expect only {{stageId}} in LocalSparkJobStatus. > {noformat} > java.lang.NumberFormatException: For input string: "0_0" > at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) > at java.lang.Integer.parseInt(Integer.java:580) > at java.lang.Integer.parseInt(Integer.java:615) > at org.apache.hadoop.hive.ql.exec.spark.status.impl.LocalSparkJobStatus.getSparkStatistics(LocalSparkJobStatus.java:146) > at org.apache.hadoop.hive.ql.exec.spark.SparkTask.execute(SparkTask.java:104) > at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:199) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)