com.bigdata.journal
Interface TemporaryStoreFactory.Options

All Known Subinterfaces:
Journal.Options
Enclosing class:
TemporaryStoreFactory

public static interface TemporaryStoreFactory.Options

Configuration options for the TemporaryStoreFactory.

Version:
$Id: TemporaryStoreFactory.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Field Summary
static String DEFAULT_MAX_EXTENT
          The default maximum extent ("1073741824").
static String DEFAULT_OFFSET_BITS
           
static String JAVA_TMP_DIR_PROPERTY
          The Java system property whose value is the default directory for the TemporaryStores created by this factory ( java.io.tmpdir).
static String MAX_EXTENT
          The maximum extent of the existing TemporaryStore before Journal.getTempStore() will return a new TemporaryStore instance (default ).
static String OFFSET_BITS
          The #of bits in a 64-bit long integer identifier that are used to encode the byte offset of a record in the store as an unsigned integer.
static String TMP_DIR
          The directory within which the TemporaryStores will be created.
 

Field Detail

TMP_DIR

static final String TMP_DIR
The directory within which the TemporaryStores will be created. The default is whichever directory is specified by the Java system property java.io.tmpdir.


JAVA_TMP_DIR_PROPERTY

static final String JAVA_TMP_DIR_PROPERTY
The Java system property whose value is the default directory for the TemporaryStores created by this factory ( java.io.tmpdir).

See Also:
Constant Field Values

OFFSET_BITS

static final String OFFSET_BITS
The #of bits in a 64-bit long integer identifier that are used to encode the byte offset of a record in the store as an unsigned integer. The default is WormAddressManager.SCALE_UP_OFFSET_BITS.

See Also:
WormAddressManager.SCALE_UP_OFFSET_BITS, WormAddressManager.SCALE_OUT_OFFSET_BITS

DEFAULT_OFFSET_BITS

static final String DEFAULT_OFFSET_BITS
See Also:
Constant Field Values

MAX_EXTENT

static final String MAX_EXTENT
The maximum extent of the existing TemporaryStore before Journal.getTempStore() will return a new TemporaryStore instance (default ).

TemporaryStores are reused in order to keep down the #of file handles and the latency to create a new TemporaryStore for operations which make heavy use of temporary data. Old TemporaryStore instances will be reclaimed (and deleted on the disk) once they are no longer strongly referenced.

This option DOES NOT place an absolute limit on the maximum extent of a TemporaryStore instance. A TemporaryStore will continue to grow in side as long as a process continues to write on the TemporaryStore.


DEFAULT_MAX_EXTENT

static final String DEFAULT_MAX_EXTENT
The default maximum extent ("1073741824"). A new TemporaryStore will be created by TemporaryStoreFactory.getTempStore() when the extent of the current TemporaryStore reaches this value. However, the temporary store will continue to grow as long as there are execution contexts which retain a reference to that instance.

Note: Each file system has its own limits on the maximum size of a file. FAT16 limits the maximum file size to only 2G. FAT32 supports 4G files. NTFS and most un*x file systems support 16G+ files. A safe point for allocating a new temporary store for new requests is therefore LT the smallest maximum file size supported by any of the common file systems.

A temporary store that reaches the maximum size allowed for the file system will fail when a request is made to extend that file. How that effects processing depends of course on the purpose to which the temporary store was being applied. E.g., to buffer a transaction, to perform truth maintenance, etc.

See Also:
Constant Field Values
TODO:
If we had more visibility into the file system for a given logical disk then we could apply that information to dynamically set the cutover point for the temporary store based on the backing file system. Unfortunately, File does not provide us with that information.


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.