|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.unh.sdb.datasource.DataCollection
edu.unh.sdb.datasource.DataSource
edu.unh.sdb.datasource.PhysicalDataSource
edu.unh.sdb.datasource.ChunkedDataSource
public class ChunkedDataSource
This class performs chunking I/O operations. The data file should have been reorgnized acorroding to the spacial chunking. We assume the disk block size is 4K(4086 bytes ) We also assume that the data file can be equally divided into a number of blocks. And the size of each block is a multiple of the disk block size NOTE: This class only works for BasicBlock so far.
Field Summary |
---|
Fields inherited from class edu.unh.sdb.datasource.PhysicalDataSource |
---|
BIG_ENDIAN, bufferBounds, bufferDimension, bufferSteps, byteBuffers, directMemoryLimit, endian, LITTLE_ENDIAN, maxBufferSize, maxGapSize, readCounter, readLength, url |
Fields inherited from class edu.unh.sdb.datasource.DataSource |
---|
fdlDescriptor, isActivated, name, wsName |
Fields inherited from class edu.unh.sdb.datasource.DataCollection |
---|
attributeOrder, axisOrdering, bounds, dataOrder, numAttributes, pointOrder, recordDesc |
Constructor Summary | |
---|---|
ChunkedDataSource(java.lang.String name,
ISBounds partitioningBounds,
ISBounds spaceBounds,
java.lang.String fileName,
AxisOrdering order,
RecordDescriptor recordDesc)
Creates a ChunkedDataSource object from 'fileName', how many chunks are on each direction are specified by 'partitioningBounds', the dimensions and placement of the volume given by 'spaceBounds', axis ordering 'order' and records described by 'recordDesc'. |
Method Summary | |
---|---|
void |
activate()
Open the binary data file for this datasource. |
void |
datum(Datum datum,
IndexSpaceID dataId)
load the data from the data source into the argument datum |
void |
datum(Datum datum,
IndexSpaceID did,
FieldIDMapper fmap)
Return the Datum corresponding to the given IndexSpaceID. |
void |
deactivate()
The DataSource will release any resources used during the readling or processing of data. |
ISBounds |
getChunkBounds()
Return an ISBounds indicating the dimensions of a chunk. |
int |
getChunkByteSize()
get the byte size of each chunk |
IndexSpaceID |
getChunkDimensions()
get the dimensions of each chunk in grid space |
ISBounds |
getPartitionSpaceBounds()
return the ISBounds of this chunkedDataSource in partitioned Space |
protected void |
loadChunk(long chunkIndex,
Values data)
Given a chunk index, read the data from the chunk into a Values object |
static void |
main(java.lang.String[] args)
|
int |
numOfChunks()
return number of chunks contained by the datasource |
void |
setOrder(java.nio.ByteBuffer buffer)
set the byte order for the given buffer |
void |
subblock(DataBlock dstBlock,
ISBounds dstBounds,
ISBounds srcBounds,
FieldIDMapper mp)
Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds. |
Methods inherited from class edu.unh.sdb.datasource.PhysicalDataSource |
---|
allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, deleteBuffer, deleteBuffer, deleteBuffers, equals, getBuffer, getBuffer, getBufferSize, getBufferSize, getByteOrder, getDataFileString, getMaxBufferSize, getReadCounter, getReadLength, getURL, initializeBuffers, isBigEndian, makeBestBuffer, resetReadCounter, setBufferByteOrder, setMaxBufferSize, setMaxGapSize, subblock, subblock, toString, toString |
Methods inherited from class edu.unh.sdb.datasource.DataSource |
---|
checkActivated, clearCache, copyBestID, create, create, create, createRemote, createRemote, createRemoteClient, createRemoteClient, createRemoteDataSource, createRemoteDataSource, createRemoteDataSourceUDP, createRemoteUDP, createRemoteUDP, dumpData, getName, getValues, isActivated |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ChunkedDataSource(java.lang.String name, ISBounds partitioningBounds, ISBounds spaceBounds, java.lang.String fileName, AxisOrdering order, RecordDescriptor recordDesc)
Method Detail |
---|
public ISBounds getPartitionSpaceBounds()
public void activate()
activate
in class DataSource
public void deactivate()
deactivate
in class PhysicalDataSource
public void setOrder(java.nio.ByteBuffer buffer)
public int getChunkByteSize()
public IndexSpaceID getChunkDimensions()
public ISBounds getChunkBounds()
public void datum(Datum datum, IndexSpaceID dataId)
datum
in interface Indexable
datum
in class DataCollection
public void datum(Datum datum, IndexSpaceID did, FieldIDMapper fmap)
datum
in interface Indexable
datum
in class DataCollection
protected void loadChunk(long chunkIndex, Values data)
public int numOfChunks()
public static void main(java.lang.String[] args)
public void subblock(DataBlock dstBlock, ISBounds dstBounds, ISBounds srcBounds, FieldIDMapper mp)
subblock
in interface Indexable
subblock
in class PhysicalDataSource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |