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 3D6BD200C6C for ; Fri, 21 Apr 2017 02:42:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3B8CC160BB1; Fri, 21 Apr 2017 00:42:09 +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 8231C160B9F for ; Fri, 21 Apr 2017 02:42:08 +0200 (CEST) Received: (qmail 31086 invoked by uid 500); 21 Apr 2017 00:42:07 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 31075 invoked by uid 99); 21 Apr 2017 00:42:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Apr 2017 00:42:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 1D873181069 for ; Fri, 21 Apr 2017 00:42:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id flAvx7Y1c5az for ; Fri, 21 Apr 2017 00:42:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 952305FB40 for ; Fri, 21 Apr 2017 00:42:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id DE254E0D4D for ; Fri, 21 Apr 2017 00:42:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 4490A21B58 for ; Fri, 21 Apr 2017 00:42:04 +0000 (UTC) Date: Fri, 21 Apr 2017 00:42:04 +0000 (UTC) From: "John Zhuge (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-11529) Add libHDFS API to return last exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 21 Apr 2017 00:42:09 -0000 [ https://issues.apache.org/jira/browse/HDFS-11529?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1597= 7870#comment-15977870 ]=20 John Zhuge commented on HDFS-11529: ----------------------------------- Patch 005 looks really good. exception.h * 32: Remove =E2=80=9C()=E2=80=9D * 36-38: Mention =E2=80=9ChdfsGetLastExceptionRootCause=E2=80=9D and =E2=80= =9ChdfsGetLastExceptionStackTrace=E2=80=9D Can anyone from the community help with build and testing on Windows? > Add libHDFS API to return last exception > ---------------------------------------- > > Key: HDFS-11529 > URL: https://issues.apache.org/jira/browse/HDFS-11529 > Project: Hadoop HDFS > Issue Type: Bug > Components: libhdfs > Affects Versions: 2.6.0 > Reporter: Sailesh Mukil > Assignee: Sailesh Mukil > Priority: Critical > Labels: errorhandling, libhdfs > Attachments: HDFS-11529.000.patch, HDFS-11529.001.patch, HDFS-115= 29.002.patch, HDFS-11529.003.patch, HDFS-11529.004.patch, HDFS-11529.005.pa= tch > > > libHDFS uses a table to compare exceptions against and returns a correspo= nding error code to the application in case of an error. > However, this table is manually populated and many times is disremembered= when new exceptions are added. > This causes libHDFS to return EINTERNAL (or Unknown Error(255)) whenever = these exceptions are hit. These are some examples of exceptions that have b= een observed on an Error(255): > org.apache.hadoop.ipc.StandbyException (Operation category WRITE is not s= upported in state standby) > java.io.EOFException: Cannot seek after EOF > javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSExce= ption: No valid credentials provided (Mechanism level: Failed to find any K= erberos tgt) > It is of course not possible to have an error code for each and every typ= e of exception, so one suggestion of how this can be addressed is by having= a call such as hdfsGetLastException() that would return the last exception= that a libHDFS thread encountered. This way, an application may choose to = call hdfsGetLastException() if it receives EINTERNAL. > We can make use of the Thread Local Storage to store this information. Al= so, this makes sure that the current functionality is preserved. > This is a follow up from HDFS-4997. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org