Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-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 9518E110C9 for ; Mon, 28 Apr 2014 01:21:18 +0000 (UTC) Received: (qmail 97863 invoked by uid 500); 28 Apr 2014 01:21:17 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 97772 invoked by uid 500); 28 Apr 2014 01:21:16 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 97586 invoked by uid 99); 28 Apr 2014 01:21:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Apr 2014 01:21:15 +0000 Date: Mon, 28 Apr 2014 01:21:15 +0000 (UTC) From: "Rick Hillegas (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DERBY-590) How to integrate Derby with Lucene API? MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-590?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Hillegas updated DERBY-590: -------------------------------- Attachment: derby-590-26-ac-backupRestore.diff Attaching derby-590-26-ac-backupRestore.diff. This patch adds backup/restor= e support for Lucene indexes. I will run regression tests. I will also hold= off committing this patch for a couple days to give people an opportunity = to suggest alternative approaches. Code is added to BasicDatabase to perform the backup. The backup() methods = in BasicDatabase check to see if the database's top level directory contain= s a LUCENE subdirectory. If so, the LUCENE directory is recursively copied = to the backup directory. Similarly, code is added to BaseDataFileFactory to perform the restoration.= The loop which checks for seg* subdirectories now checks to see if the bac= kup contains a LUCENE subdirectory. If so, it is recursively copied to the = restored location. I am happy to move this code elsewhere if people think there is an architec= turally better spot. Touches the following files: --------------- M java/engine/org/apache/derby/iapi/util/StringUtil.java Encapsulated a scrap of code which takes the canonical name of the database= and extracts the database directory name from it. This method is now used = both by the RawStore backup code to figure out where to copy the seg* files= and this method is used by BasicDatabase to figure out where to copy the L= UCENE directory. I'm open to suggestions for a better place to put this code. Nothing better= jumped out at me. --------------- M java/engine/org/apache/derby/impl/db/BasicDatabase.java The new code to backup the LUCENE directory. --------------- M java/engine/org/apache/derby/impl/io/vfmem/DataStore.java This fixes a bug in the in-memory storage factory. When asked to list its c= hild directories, an in-memory directory used to list its grandchildren and= all other descendants. This has been fixed so that only the child director= ies are returned. --------------- M java/engine/org/apache/derby/impl/store/raw/RawStore.java Amended to use the shared method which extracts the database directory name= from the canonical name. --------------- M java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactor= y.java Adds logic to restore the LUCENE directory. --------------- M java/engine/org/apache/derby/database/Database.java The constant identifying the name of the LUCENE directory is moved to this = interface so that it can be used by BasicDatabase. --------------- M java/optional/org/apache/derby/optional/lucene/DerbyLuceneDir.java M java/optional/org/apache/derby/optional/lucene/LuceneSupport.java M java/optional/org/apache/derby/optional/lucene/LuceneListIndexesVTI= .java I reworked how the Lucene index path is recursively created. --------------- A java/testing/org/apache/derbyTesting/functionTests/tests/lang/Lucen= eBackupTest.java M java/testing/org/apache/derbyTesting/functionTests/tests/lang/lucen= eSupport.policy M java/testing/org/apache/derbyTesting/functionTests/tests/lang/Lucen= eSuite.java Added a test for backup/restore of Lucene indexes. > How to integrate Derby with Lucene API? > --------------------------------------- > > Key: DERBY-590 > URL: https://issues.apache.org/jira/browse/DERBY-590 > Project: Derby > Issue Type: Improvement > Components: Documentation, SQL > Reporter: Abhijeet Mahesh > Labels: derby_triage10_11 > Attachments: LucenePlugin.html, derby-590-01-ag-publicAccessToLuc= eneRoutines.diff, derby-590-01-ah-publicAccessToLuceneRoutines.diff, derby-= 590-01-am-publicAccessToLuceneRoutines.diff, derby-590-02-aa-cleanupFindbug= sErrors.diff, derby-590-03-aa-removeTestingDiagnostic.diff, derby-590-04-aa= -removeIDFromListIndexes.diff, derby-590-05-aa-accessDeclaredMembers.diff, = derby-590-06-aa-suppressAccessChecks.diff, derby-590-07-aa-accessClassInPac= kage.sun.misc.diff, derby-590-08-aa-omitLuceneFlag.diff, derby-590-09-aa-lo= caleSensitiveAnalysis.diff, derby-590-10-aa-fixLocaleTest.diff, derby-590-1= 1-aa-moveCode.diff, derby-590-12-aa-newJar.diff, derby-590-13-aa-indexViews= .diff, derby-590-14-aa-coarseGrainedAuthorization.diff, derby-590-15-aa-req= uireHardUpgrade.diff, derby-590-16-aa-adjustUpgradeTest.diff, derby-590-17-= aa-closeInputStreamOnPropertiesFile.diff, derby-590-18-aa-cleanupAPI.diff, = derby-590-19-aa-cleanupAPI2.diff, derby-590-20-aa-customQueryParser.diff, d= erby-590-21-aa-noTimeTravel.diff, derby-590-22-aa-cleanupPrivacy.diff, derb= y-590-23-aa-correctTestLocale.diff, derby-590-24-ad-luceneDirectory.diff, d= erby-590-26-ac-backupRestore.diff, lucene_demo.diff, lucene_demo_2.diff > > > In order to use derby with lucene API what should be the steps to be take= n?=20 -- This message was sent by Atlassian JIRA (v6.2#6252)