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 E3D5E1A4D for ; Tue, 19 Apr 2011 21:46:18 +0000 (UTC) Received: (qmail 16960 invoked by uid 500); 19 Apr 2011 21:46:18 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 16871 invoked by uid 500); 19 Apr 2011 21:46:18 -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 16863 invoked by uid 99); 19 Apr 2011 21:46:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Apr 2011 21:46:18 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of yuzhihong@gmail.com designates 74.125.83.169 as permitted sender) Received: from [74.125.83.169] (HELO mail-pv0-f169.google.com) (74.125.83.169) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Apr 2011 21:46:13 +0000 Received: by pvg4 with SMTP id 4so87254pvg.14 for ; Tue, 19 Apr 2011 14:45:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=6o2I11je4KTRAvQur7PYvJwMtrNSg1Cy93jhWo93ug8=; b=CxqCpzlLU8bzAfOVTfKtD9/BLtqZHL3fPT4fPSYNcKRvoFAq751tpCsoftdQA8Q6H+ aGtAlTdH5OgfFA+f4gFkkkjfvlahGNFVjv4KLZte1uomghOVGdLNhq0ktVVzyuYSLpFL nVSEZclryfCh1RiD9BNR4Q/JcPRG95uYxvZ9o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Rt1TmYHyFC9GMhpx+VImK8aZYLqnZZnJ0Fuln0G5yzZvDa25NbEs6Z51uBJBs10W6U L6mjD2lAEq5TYuft9KH9fGS9YIdEV/XPmc18abY47P/w0nKoGH2OjYQBt3awtNo7FhIZ RwdDUvjfTT5VRfcoB8izhtB95wwIsVDURqzCo= MIME-Version: 1.0 Received: by 10.68.12.35 with SMTP id v3mr9489557pbb.78.1303249552991; Tue, 19 Apr 2011 14:45:52 -0700 (PDT) Received: by 10.68.56.70 with HTTP; Tue, 19 Apr 2011 14:45:52 -0700 (PDT) In-Reply-To: References: Date: Tue, 19 Apr 2011 14:45:52 -0700 Message-ID: Subject: Re: using RegionSplitter From: Ted Yu To: dev@hbase.apache.org Content-Type: multipart/alternative; boundary=bcaec520eee5a8e52a04a14c6e0b --bcaec520eee5a8e52a04a14c6e0b Content-Type: text/plain; charset=ISO-8859-1 There is assumption that start and end keys can be converted to BigInteger: public byte[] split(byte[] start, byte[] end) { BigInteger s = convertToBigInteger(start); BigInteger e = convertToBigInteger(end); The assumption doesn't hold in our use case. On Tue, Apr 19, 2011 at 2:24 PM, Ted Yu wrote: > Thanks J-D. > > Now I see: > 11/04/19 21:22:03 DEBUG util.RegionSplitter: No _balancedSplit file. > Calculating splits... > 11/04/19 21:22:03 DEBUG client.MetaScanner: Scanning .META. starting at > row=M2M-INTEGRATION-DIMENSIONS-1303180666422,,00000000000000 for > max=2147483647 rows > 11/04/19 21:22:04 DEBUG util.RegionSplitter: Table > M2M-INTEGRATION-DIMENSIONS-1303180666422 has 5 regions that will be split. > Exception in thread "main" java.lang.NumberFormatException: For input > string: ">" > at > java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) > at java.lang.Integer.parseInt(Integer.java:449) > at java.math.BigInteger.(BigInteger.java:316) > at > org.apache.hadoop.hbase.util.RegionSplitter$MD5StringSplit.convertToBigInteger(RegionSplitter.java:779) > at > org.apache.hadoop.hbase.util.RegionSplitter$MD5StringSplit.split(RegionSplitter.java:704) > at > org.apache.hadoop.hbase.util.RegionSplitter.getSplits(RegionSplitter.java:639) > > at > org.apache.hadoop.hbase.util.RegionSplitter.rollingSplit(RegionSplitter.java:362) > at > org.apache.hadoop.hbase.util.RegionSplitter.main(RegionSplitter.java:291) > > On Tue, Apr 19, 2011 at 2:12 PM, Jean-Daniel Cryans wrote: > >> In general IIRC that message means that you need to have your hadoop >> configuration folder in HBase's classpath. >> >> J-D >> >> On Tue, Apr 19, 2011 at 2:05 PM, Ted Yu wrote: >> > Hi, >> > In 0.90.2, I tried to use RegionSplitter: >> > [hadoop@us01-ciqps1-name01 hbase]$ bin/hbase >> > org.apache.hadoop.hbase.util.RegionSplitter -r -o 2 >> > 'M2M-INTEGRATION-DIMENSIONS-1303180666422' >> > ... >> > 11/04/19 21:02:33 DEBUG >> client.HConnectionManager$HConnectionImplementation: >> > Cache hit for row <> in tableName >> M2M-INTEGRATION-DIMENSIONS-1303180666422: >> > location server us01-ciqps1-grid07.carrieriq.com:60020, location region >> name >> > >> M2M-INTEGRATION-DIMENSIONS-1303180666422,,1303180669457.19be2774054a672e905554bcaf73d5e0. >> > Exception in thread "main" java.lang.IllegalArgumentException: Wrong FS: >> > hdfs:// >> > >> us01-ciqps1-name01.carrieriq.com:9000/hbase/M2M-INTEGRATION-DIMENSIONS-1303180666422/_balancedSplit >> , >> > expected: file:/// >> > at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:352) >> > at >> > >> org.apache.hadoop.fs.RawLocalFileSystem.pathToFile(RawLocalFileSystem.java:47) >> > at >> > >> org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:368) >> > at >> > >> org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:251) >> > at org.apache.hadoop.fs.FileSystem.exists(FileSystem.java:690) >> > at >> > >> org.apache.hadoop.hbase.util.RegionSplitter.getSplits(RegionSplitter.java:612) >> > at >> > >> org.apache.hadoop.hbase.util.RegionSplitter.rollingSplit(RegionSplitter.java:362) >> > at >> > >> org.apache.hadoop.hbase.util.RegionSplitter.main(RegionSplitter.java:291) >> > >> > Has anyone experienced this ? >> > >> > Thanks >> > >> > > --bcaec520eee5a8e52a04a14c6e0b--