Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CC78D10941 for ; Mon, 26 Aug 2013 23:04:50 +0000 (UTC) Received: (qmail 47143 invoked by uid 500); 26 Aug 2013 23:04:50 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 47084 invoked by uid 500); 26 Aug 2013 23:04:50 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 47076 invoked by uid 99); 26 Aug 2013 23:04:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Aug 2013 23:04:50 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sergey@hortonworks.com designates 74.125.82.173 as permitted sender) Received: from [74.125.82.173] (HELO mail-we0-f173.google.com) (74.125.82.173) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Aug 2013 23:04:43 +0000 Received: by mail-we0-f173.google.com with SMTP id x54so3313773wes.32 for ; Mon, 26 Aug 2013 16:04:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=lvR/KzV4SkWqY2M4b5uUeknKAeBq369FKIdz7vhO/L4=; b=dUUM5DDcaV5TDN1/FwpUHD/ADWJZtfUpXK+y/tGE+sS2bSIcLOwFR13br6dWcrQ/8z uvQoCsf6dLtY9zq77sudUwlBdoUVSwwXWAmPr4znW3B63twoc7Z/me95CXm3TdpndJaW p8U+8oVxQ9u4rfs8k+cVgnYrcfwpSibmJJjzKmaltIe4l0Q4X4mooaJ2TKti73FNvmY4 bM21nPkcRPkHrXH2Xt2iAgb+Iix0d9VYL9/7dk/w0UL465lPDgvKy6NOCseaYm0ZGVMT zbOKBgWSorun/6c2QX+KIH8+HehYSKYvxWZeAzVwKecdq9yD6733w64zCyYRoxeofYQB QztQ== X-Gm-Message-State: ALoCoQkpyUiSVHP1oW7YwSec9l7wF6dxLgSEyTmNZM3AYZvXXZ8zLeQb0ieCpgaOuMFKpU1ffbsWiqt1/A/jOKfKubbblPdqRCEdtNxhqz/fzmG+ftXB6FE= MIME-Version: 1.0 X-Received: by 10.194.89.233 with SMTP id br9mr11632780wjb.15.1377558263287; Mon, 26 Aug 2013 16:04:23 -0700 (PDT) Received: by 10.216.84.14 with HTTP; Mon, 26 Aug 2013 16:04:23 -0700 (PDT) In-Reply-To: References: Date: Mon, 26 Aug 2013 16:04:23 -0700 Message-ID: Subject: Re: Meta vs Stores / first and last keys and corrupted HFiles. From: Sergey Shelukhin To: dev@hbase.apache.org Content-Type: multipart/alternative; boundary=089e0102fb5cf0e65304e4e1c6fa X-Virus-Checked: Checked by ClamAV on apache.org --089e0102fb5cf0e65304e4e1c6fa Content-Type: text/plain; charset=US-ASCII Um, I may be missing something here, but is it really an HFile? Looks like an hlog to me. org.apache.hadoop.hbase.io. hfile.CorruptHFileException: Problem reading HFile Trailer from file hdfs://node3:9000/hbase/work_proposed/db83e64f34a5a608335818321f1a6c32/.oldlogs/hlog.1377344531526 On Mon, Aug 26, 2013 at 12:31 PM, Jean-Marc Spaggiari < jean-marc@spaggiari.org> wrote: > Hi, > > Don't ask me how, but I have one table in a pretty strange state. > > First, seems that I have one corrupted HFile (at least). > > FirstKey return null. (Same for StopKey since header is corrupted). > > Exception in thread "main" java.lang.NullPointerException > at org.apache.hadoop.hbase.KeyValue.keyToString(KeyValue.java:716) > at > > org.apache.hadoop.hbase.io.hfile.AbstractHFileReader.toStringFirstKey(AbstractHFileReader.java:138) > at > > org.apache.hadoop.hbase.io.hfile.AbstractHFileReader.toString(AbstractHFileReader.java:149) > at > > org.apache.hadoop.hbase.io.hfile.HFilePrettyPrinter.printMeta(HFilePrettyPrinter.java:325) > at > > org.apache.hadoop.hbase.io.hfile.HFilePrettyPrinter.processFile(HFilePrettyPrinter.java:241) > at > > org.apache.hadoop.hbase.io.hfile.HFilePrettyPrinter.run(HFilePrettyPrinter.java:196) > at org.apache.hadoop.hbase.io.hfile.HFile.main(HFile.java:756) > > Because the header is not correct. > > org.apache.hadoop.hbase.io.hfile.CorruptHFileException: Problem reading > HFile Trailer from file > > hdfs://node3:9000/hbase/work_proposed/db83e64f34a5a608335818321f1a6c32/.oldlogs/hlog.1377344531526 > at > org.apache.hadoop.hbase.io.hfile.HFile.pickReaderVersion(HFile.java:551) > at > > org.apache.hadoop.hbase.io.hfile.HFile.createReaderWithEncoding(HFile.java:595) > at org.apache.hadoop.hbase.io.hfile.HFile.createReader(HFile.java:642) > at > > org.apache.hadoop.hbase.io.hfile.HFilePrettyPrinter.processFile(HFilePrettyPrinter.java:217) > at > > org.apache.hadoop.hbase.io.hfile.HFilePrettyPrinter.run(HFilePrettyPrinter.java:196) > at org.apache.hadoop.hbase.io.hfile.HFile.main(HFile.java:756) > Caused by: java.lang.IllegalArgumentException: Invalid HFile version: > 16275367 (expected to be between 1 and 2) > at > org.apache.hadoop.hbase.io.hfile.HFile.checkFormatVersion(HFile.java:771) > at > > org.apache.hadoop.hbase.io.hfile.FixedFileTrailer.readFromStream(FixedFileTrailer.java:323) > at > org.apache.hadoop.hbase.io.hfile.HFile.pickReaderVersion(HFile.java:549) > ... 5 more > > HBCK don't detect that: > 0 inconsistencies detected. > Status: OK > > Also, I have an issue with the first key / last key reported by the stores > overlapping when the one reported by the META are not. > > Store: > firstKey=\xF5\x9A\xEA&\x00\x00\x00\x00... > lastKey=\xFF\xFF\xFF\xFE\x00\x00\x00\x00... > Meta: > firstKey=\xF5\x9A\xEA&\x00\x00\x00\x00 > lastKey=\xF5\x9B@}\x00\x00\x00\x00... > > > So, few things. > > 1) We should add something into HBCK to check the HFile format again > corruption. > 2) We should add something into HBCK to validate META regions boundaries > against Store Files > 3) How can I repaire my HFile? ;) > > I'm already working on #2 and will have something ready soon. Then I will > most probably more to #1. But I only have detection dont for now. I'm not > sure exactly what are the correct steps to repair... > > JM > -- CONFIDENTIALITY NOTICE NOTICE: This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential, privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any printing, copying, dissemination, distribution, disclosure or forwarding of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. Thank You. --089e0102fb5cf0e65304e4e1c6fa--