public class MvStoreDataset extends Dataset
Dataset.ColumnsDataReader
internalId, internalName, log, TIMESTAMP_FORMAT
SERIALIZED_CLASS_NAME, TYPE
XML_SERIALIZED_CLASS_NAME
Modifier | Constructor and Description |
---|---|
protected |
MvStoreDataset(File databaseFile) |
protected |
MvStoreDataset(File databaseFile,
AbstractPipeline pipeline) |
Modifier and Type | Method and Description |
---|---|
protected Column |
addField(Record record,
Field field,
int fieldIndex) |
protected void |
afterLoad()
Called at the end of the data loading process after all the records and column stats have been loaded.
|
protected void |
beforeLoad()
Called at the start of the data loading process, but before any records or column stats have been loaded.
|
void |
close() |
static MvStoreDataset |
createDataset(File databaseFile,
AbstractPipeline pipeline)
Creates a persistent dataset on disk in the specified
databaseFile . |
protected DataWriter |
createDataWriter()
Writes records to this dataset's cache after clearing it.
|
static MvStoreDataset |
createTempDataset(AbstractPipeline pipeline)
Creates a temporary dataset on disk that will be deleted when the dataset is closed or when the JVM exits.
|
static MvStoreDataset |
createTempDataset(File databaseFolder,
AbstractPipeline pipeline)
Creates a temporary dataset on disk that will be deleted when the dataset is closed or when the JVM exits.
|
Column |
getColumn(int index) |
Column |
getColumn(String name) |
long |
getColumnCount() |
List<String> |
getColumnNames() |
List<Column> |
getColumns() |
File |
getDatabaseFile() |
protected Column |
getOrCreateColumn(String name,
int index) |
Record |
getRecord(long index) |
long |
getRecordCount() |
boolean |
isDeleteDatabaseFileOnClose() |
Dataset |
load(Integer maxRecords,
JobCallback<DataReader,DataWriter> callback)
Starts the asynchronous loading of records from the pipeline into this dataset.
|
static MvStoreDataset |
openDataset(File databaseFile)
Loads an existing dataset from the specified
databaseFile . |
MvStoreDataset |
setDeleteDatabaseFileOnClose(boolean deleteDatabaseFileOnClose) |
MvStoreDataset |
setPipeline(AbstractPipeline pipeline) |
afterColumnStatsLoaded, afterRecordsLoaded, cancelLoad, createColumnsDataReader, createDataReader, createDataReader, finalize, forEach, fromRecord, getColumnStatsException, getColumnStatsReaderThreads, getDataLoadException, getJob, getMaxColumnStatsRecords, getMaxRecordsToLoad, getPipeline, getRecordList, isCollectUniqueValues, isColumnStatsLoaded, isDataLoaded, isDataLoading, isDetectBigNumberValues, isDetectBooleanValues, isDetectNumericValues, isDetectTemporalValues, isDetectUuidValues, isInferStringTypes, isRecordsLoaded, iterator, load, load, setCollectUniqueValues, setColumnStatsLoaded, setColumnStatsReaderThreads, setDetectBigNumberValues, setDetectBooleanValues, setDetectNumericValues, setDetectTemporalValues, setDetectUuidValues, setInferStringTypes, setMaxColumnStatsRecords, setRecordsLoaded, stream, toRecord, updateColumns, waitForColumnStatsToLoad, waitForColumnStatsToLoad, waitForRecordsToLoad, waitForRecordsToLoad, waitUntilJobFinished
addExceptionProperties, assertValid, assertValid, clone, exception, exception, exception, getInternalId, getInternalName, resetInternalId
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
spliterator
fromArrayValue, fromArrayValue, fromArrayValue, fromJson, fromJson, newInstanceFromRecord, newInstanceFromRecord, toArrayValue, toJson, toJson, toJson, toRecord
newInstanceFromJson
forEachGrandChildElement, fromXml, fromXml, fromXmlElement, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getChildElement, getChildElements, newInstanceFromXml, newInstanceFromXml, setAttribute, toXml, toXml, toXml, toXml, toXml, toXmlElement, writeXml, writeXml
addExceptionProperties, contributeExceptionProperties, contributeExceptionProperties
protected MvStoreDataset(File databaseFile, AbstractPipeline pipeline)
protected MvStoreDataset(File databaseFile)
public static MvStoreDataset createTempDataset(AbstractPipeline pipeline)
pipeline
- the source of the dataset's datapublic static MvStoreDataset createTempDataset(File databaseFolder, AbstractPipeline pipeline)
null
),
using the prefix "dataset-" and suffix ".mvstore" to generate its name.databaseFolder
- the directory to store the temporary file or null
to use the default temporary-file directory.pipeline
- the source of the dataset's datapublic static MvStoreDataset createDataset(File databaseFile, AbstractPipeline pipeline)
databaseFile
. The file will remain on disk even after the dataset is closed and the JVM exits.databaseFile
- the file to store the dataset's contents.pipeline
- the source of the dataset's datapublic static MvStoreDataset openDataset(File databaseFile)
databaseFile
.databaseFile
- the existing file to containing the dataset's contents to load.public MvStoreDataset setPipeline(AbstractPipeline pipeline)
setPipeline
in class Dataset
public File getDatabaseFile()
public boolean isDeleteDatabaseFileOnClose()
public MvStoreDataset setDeleteDatabaseFileOnClose(boolean deleteDatabaseFileOnClose)
public void close()
public long getRecordCount()
getRecordCount
in class Dataset
public long getColumnCount()
getColumnCount
in class Dataset
public List<String> getColumnNames()
getColumnNames
in class Dataset
protected Column getOrCreateColumn(String name, int index)
getOrCreateColumn
in class Dataset
public List<Column> getColumns()
getColumns
in class Dataset
protected void beforeLoad()
Dataset
beforeLoad
in class Dataset
protected void afterLoad()
Dataset
protected DataWriter createDataWriter()
Dataset
createDataWriter
in class Dataset
public Dataset load(Integer maxRecords, JobCallback<DataReader,DataWriter> callback)
Dataset
Dataset.waitForRecordsToLoad()
and Dataset.waitForRecordsToLoad(long, long)
.Copyright (c) 2006-2024 North Concepts Inc. All Rights Reserved.