Menu
Search

Please note: This research project has concluded.
The research project has been completed. Information on this page is provided for historical purposes only. Some portion of this content may be out-of-date and include broken links. Please visit the OCLC Research website to learn more about our current research.

Operating the Bartlett Utility

Bartlett is a command line utility used to build and maintain Pears databases.

Requirements

To work with the Bartlett utility, you must be running JDK 1.2.0 or higher.

Before initially creating a new Pears database using the Bartlett utility, you must assemble the records you wish to import into an input data file and you must define a database description configuration file.


Basic Procedure

The following is the basic command for creating a Pears database using the Bartlett utility:

java Bartlett < dbname> -i< input file name> -d< database description configuration file>

On the basic command line, you can set additional parameters to take advantage of other database building features and functionality in the utility. The following table is a list of those parameters and their descriptions:

Parameter Description
-c< record handler class> Allows you to override the record handler declared in the database description configuration file
-m< maximum nips> Allows you to set the number of new index postings that are to be created at one time in order to control memory allocation (It sets bucket size.)
-n< number of records> Sets the total number of records to be processed
-s< number of records to skip> Allows you choose the number of records to skip in an input file before Bartlett begins processing
-t< number of threads>

Controls the number of index updates (Bosc) that can run simultaneously.

Note: Typically, this should be set no higher than the number of CPUs that you have on your machine.

-j< transaction journal file name> Declares the name of the file containing the journal entries for the records committed to the database
-w< sorted nip filename> Declares the name of the file containing the sorted new index postings when doing a large batch update
-p< process command file> Points at a configuration (.ini) file that contains processing parameters such as delete index 13
Activation Flags (These flags turn things on.)
-f1

Lock one record at a time, instead of locking the whole database when there are competing online updates

Note: This parameter ensures that updates to a database don't "step on each other." It declares that one record at a time is going to be added to the database.

-fc Build the file as tight as possible
-ff Force an unlock when a lingering lock has been left by a killed run process
-fg

Guarantees that all records in an input file are "adds"

Note: Turning on this parameter does speed up the run slightly.

-fi Apply indexes immediately
-fn Log uses new lines
-fr Re-index the incoming records, but do not store them
-fs

Sync after writing to the database

Note: This is expensive and should not be activated unless absolutely necessary.

-fu

Update the database description configuration file that is stored in the .pdb file with a new database description configuration file

Note: After the initial creation of a Pears database, it is not necessary to declare the database description configuration file for that database on the Bartlett command line when updating the database, since the description file is stored with the data and indexes in the .pdb file during the initial load. The flag -fu overrides allows you to load data using a database description configuration file that is different from the one initially stored in the .pdb file.

-fv Turns on verbose mode to display the most information during a Bartlett process
Deactivation Flags (These flags turn things off.)
-xj Do not commit a journal at the end of the run
-xl Do not require a database lock
-xn Do not print to a file or create new lines in the log file
-xs Disable bosc threading
-xz Disable record input threading

Syntax

Syntax of the Bartlett Command Line

java Bartlett < dbname> -i< input file name> -d< database desc config file>/
[-c< record handler class>] [-m< maximum nips>] [-n< number of records>]/
[-s< number of records to skip>] [-t< number of threads>]/
[-j< transaction journal file name>] [-w< sorted nip filename>]/
[-p< process command file>] [-fX] [-xX