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 80230200C5A for ; Tue, 18 Apr 2017 23:20:48 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7E936160BA1; Tue, 18 Apr 2017 21:20:48 +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 C6E05160B87 for ; Tue, 18 Apr 2017 23:20:47 +0200 (CEST) Received: (qmail 65133 invoked by uid 500); 18 Apr 2017 21:20:47 -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 65117 invoked by uid 99); 18 Apr 2017 21:20:46 -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; Tue, 18 Apr 2017 21:20:46 +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 5045F1857B9 for ; Tue, 18 Apr 2017 21:20:46 +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-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id mqRZDCAkb4SJ for ; Tue, 18 Apr 2017 21:20:45 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 26E8561A49 for ; Tue, 18 Apr 2017 21:20:44 +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 1D916E0D7F for ; Tue, 18 Apr 2017 21:20:43 +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 265D324095 for ; Tue, 18 Apr 2017 21:20:42 +0000 (UTC) Date: Tue, 18 Apr 2017 21:20:42 +0000 (UTC) From: "Sailesh Mukil (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HDFS-11529) Add libHDFS API to return last exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 18 Apr 2017 21:20:48 -0000 [ https://issues.apache.org/jira/browse/HDFS-11529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sailesh Mukil updated HDFS-11529: --------------------------------- Status: Patch Available (was: Open) > 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-11529.002.patch, HDFS-11529.003.patch, HDFS-11529.004.patch > > > libHDFS uses a table to compare exceptions against and returns a corresponding 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 been observed on an Error(255): > org.apache.hadoop.ipc.StandbyException (Operation category WRITE is not supported in state standby) > java.io.EOFException: Cannot seek after EOF > javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt) > It is of course not possible to have an error code for each and every type 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. Also, 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