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 61BA5200C46 for ; Tue, 14 Mar 2017 23:38:46 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 6053E160B63; Tue, 14 Mar 2017 22:38:46 +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 B3A7F160B7E for ; Tue, 14 Mar 2017 23:38:45 +0100 (CET) Received: (qmail 81005 invoked by uid 500); 14 Mar 2017 22:38:44 -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 80944 invoked by uid 99); 14 Mar 2017 22:38:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Mar 2017 22:38:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 7EB5BC05A9 for ; Tue, 14 Mar 2017 22:38:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.451 X-Spam-Level: * X-Spam-Status: No, score=1.451 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 1VUljyv0bGFm for ; Tue, 14 Mar 2017 22:38:42 +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 769065FB6B for ; Tue, 14 Mar 2017 22:38:42 +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 D7238E087D for ; Tue, 14 Mar 2017 22:38:41 +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 8D774243A6 for ; Tue, 14 Mar 2017 22:38:41 +0000 (UTC) Date: Tue, 14 Mar 2017 22:38:41 +0000 (UTC) From: "James Clampffer (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-11529) libHDFS still does not return appropriate error information in many cases MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 14 Mar 2017 22:38:46 -0000 [ https://issues.apache.org/jira/browse/HDFS-11529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15925183#comment-15925183 ] James Clampffer commented on HDFS-11529: ---------------------------------------- We added a "hdfsGetLastError" call using thread local state like you're proposing in the C API for libhdfs++ (HDFS-8707). It's been very useful in practice for HDFS stuff that doesn't map directly to posix errnos. > libHDFS still does not return appropriate error information in many cases > ------------------------------------------------------------------------- > > 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 > Priority: Critical > Labels: errorhandling, libhdfs > > 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