Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-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 060376825 for ; Tue, 14 Jun 2011 00:13:12 +0000 (UTC) Received: (qmail 49484 invoked by uid 500); 14 Jun 2011 00:13:10 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 49390 invoked by uid 500); 14 Jun 2011 00:13:10 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 49217 invoked by uid 99); 14 Jun 2011 00:13:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Jun 2011 00:13:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_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, 14 Jun 2011 00:13:08 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 5F972413E7A for ; Tue, 14 Jun 2011 00:12:47 +0000 (UTC) Date: Tue, 14 Jun 2011 00:12:47 +0000 (UTC) From: "Robert Muir (JIRA)" To: dev@lucene.apache.org Message-ID: <1287760098.1136.1308010367388.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <620484674.1099.1308009527844.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (LUCENE-3201) improved compound file handling MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-3201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13048912#comment-13048912 ] Robert Muir commented on LUCENE-3201: ------------------------------------- I think for this one, I prefer to wait for Uwe's refactoring of MMap on LUCENE-3200. Then mmap is simpler, and i think we can even use the same indexinput implementation here. This would mean no slowdown when searching CFS. > improved compound file handling > ------------------------------- > > Key: LUCENE-3201 > URL: https://issues.apache.org/jira/browse/LUCENE-3201 > Project: Lucene - Java > Issue Type: Improvement > Reporter: Robert Muir > > Currently CompoundFileReader could use some improvements, i see the following problems > * its CSIndexInput extends bufferedindexinput, which is stupid for directories like mmap. > * it seeks on every readInternal > * its not possible for a directory to override or improve the handling of compound files. > for example: it seems if you were impl'ing this thing from scratch, you would just wrap the II directly (not extend BufferedIndexInput, > and add compound file offset X to seek() calls, and override length(). But of course, then you couldnt throw read past EOF always when you should, > as a user could read into the next file and be left unaware. > however, some directories could handle this better. for example MMapDirectory could return an indexinput that simply mmaps the 'slice' of the CFS file. > its underlying bytebuffer etc naturally does bounds checks already etc, so it wouldnt need to be buffered, not even needing to add any offsets to seek(), > as its position would just work. > So I think we should try to refactor this so that a Directory can customize how compound files are handled, the simplest > case for the least code change would be to add this to Directory.java: > {code} > public Directory openCompoundInput(String filename) { > return new CompoundFileReader(this, filename); > } > {code} > Because most code depends upon the fact compound files are implemented as a Directory and transparent. at least then a subclass could override... > but the 'recursion' is a little ugly... we could still label it expert+internal+experimental or whatever. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org