Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8FC3D9B5A for ; Tue, 22 Nov 2011 22:35:05 +0000 (UTC) Received: (qmail 62405 invoked by uid 500); 22 Nov 2011 22:35:05 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 62367 invoked by uid 500); 22 Nov 2011 22:35:05 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 62356 invoked by uid 99); 22 Nov 2011 22:35:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Nov 2011 22:35:05 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Nov 2011 22:35:04 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 37E539897B for ; Tue, 22 Nov 2011 22:34:44 +0000 (UTC) Date: Tue, 22 Nov 2011 22:34:44 +0000 (UTC) From: "John Carrino (Commented) (JIRA)" To: issues@hbase.apache.org Message-ID: <2065632524.4207.1322001284230.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1418565646.39718.1321556631284.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HBASE-4811) Support reverse Scan MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-4811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13155506#comment-13155506 ] John Carrino commented on HBASE-4811: ------------------------------------- Yeah, I'm not that familiar with the codebase, but I'd assume that in order to get forward scans you'd have to have the data sorted. And from what I understand it is internally stored as "sstables" or HFiles. If you have it sorted to scan in one direction, it seems pretty easy to go the other direction. LevelDb uses ssTables and supports reverse ranges. The only thing that I could think of from the design (from a high level) that might make it difficult to do reverse ranges is dealing with splitting ranges when moving ranges from one region server to another. Just from a quick look at MemStore that you mention, it uses a KeyValueSkipListSet under the covers that is a NavigableSet and supports descendingSet and descendingIterator. -jc On Tue, Nov 22, 2011 at 12:52 PM, stack (Commented) (JIRA) > Support reverse Scan > -------------------- > > Key: HBASE-4811 > URL: https://issues.apache.org/jira/browse/HBASE-4811 > Project: HBase > Issue Type: Improvement > Components: client > Affects Versions: 0.20.6 > Reporter: John Carrino > > All the documentation I find about HBase says that if you want forward and reverse scans you should just build 2 tables and one be ascending and one descending. Is there a fundamental reason that HBase only supports forward Scan? It seems like a lot of extra space overhead and coding overhead (to keep them in sync) to support 2 tables. > I am assuming this has been discussed before, but I can't find the discussions anywhere about it or why it would be infeasible. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira