public class MatrixObject extends CacheableData<MatrixBlock>
MatrixObject
and MatrixBlock
objects, for cache purposes. Do not change a
MatrixBlock
object without informing its MatrixObject
object.Modifier and Type | Class and Description |
---|---|
static class |
MatrixObject.UpdateType |
CacheableData.CacheStatus
cacheEvictionLocalFilePath, cacheEvictionLocalFilePrefix, CACHING_ASYNC_FILECLEANUP, CACHING_BUFFER_PAGECACHE, CACHING_BUFFER_POLICY, CACHING_BUFFER_SIZE, CACHING_COUNTER_GROUP_NAME, CACHING_EVICTION_FILEEXTENSION, CACHING_THRESHOLD, CACHING_WRITE_CACHE_ON_READ
Constructor and Description |
---|
MatrixObject(MatrixObject mo)
Copy constructor that copies meta data but NO data.
|
MatrixObject(Types.ValueType vt,
String file)
Constructor that takes the value type and the HDFS filename.
|
MatrixObject(Types.ValueType vt,
String file,
MetaData mtd)
Constructor that takes the value type, HDFS filename and associated metadata.
|
Modifier and Type | Method and Description |
---|---|
long |
getBlocksize() |
long |
getNnz() |
String |
getPartitionFileName(IndexRange pred,
int blen) |
ParForProgramBlock.PDataPartitionFormat |
getPartitionFormat() |
int |
getPartitionSize() |
double |
getSparsity() |
MatrixObject.UpdateType |
getUpdateType() |
boolean |
isDiag() |
boolean |
isMarked() |
boolean |
isPartitioned() |
MatrixBlock |
readMatrixPartition(IndexRange pred)
NOTE: for reading matrix partitions, we could cache (in its real sense) the read block
with soft references (no need for eviction, as partitioning only applied for read-only matrices).
|
void |
refreshMetaData()
Make the matrix metadata consistent with the in-memory matrix data
|
void |
setDiag(boolean diag) |
void |
setInMemoryPartition(MatrixBlock block) |
void |
setMarkForLinCache(boolean mark) |
void |
setPartitioned(ParForProgramBlock.PDataPartitionFormat format,
int n) |
void |
setUpdateType(MatrixObject.UpdateType flag) |
void |
unsetPartitioned() |
void |
updateDataCharacteristics(DataCharacteristics dc) |
acquireModify, acquireRead, acquireReadAndRelease, addBroadcastSize, cleanupCacheDir, cleanupCacheDir, clearData, clearData, disableCaching, enableCaching, enableCleanup, exportData, exportData, exportData, exportData, exportData, exportData, freeEvictedBlob, getBroadcastHandle, getBroadcastSize, getDataCharacteristics, getDataSize, getDebugName, getFedMapping, getFileFormatProperties, getFileName, getGPUObject, getMetaData, getNumColumns, getNumRows, getRDDHandle, getStatus, getUniqueID, initCaching, initCaching, isCached, isCachingActive, isCleanupEnabled, isDirty, isFederated, isFederated, isHDFSFileExists, moveData, release, removeMetaData, setBroadcastHandle, setDirty, setEmptyStatus, setFedMapping, setFileFormatProperties, setFileName, setGPUObject, setHDFSFileExists, setMetaData, setRDDHandle, toString
getDataType, getPrivacyConstraint, getValueType, setPrivacyConstraints
public MatrixObject(Types.ValueType vt, String file)
vt
- value typefile
- file namepublic MatrixObject(Types.ValueType vt, String file, MetaData mtd)
vt
- value typefile
- file namemtd
- metadatapublic MatrixObject(MatrixObject mo)
mo
- matrix objectpublic void setUpdateType(MatrixObject.UpdateType flag)
public MatrixObject.UpdateType getUpdateType()
public boolean isDiag()
public void setDiag(boolean diag)
public void setMarkForLinCache(boolean mark)
public boolean isMarked()
public void updateDataCharacteristics(DataCharacteristics dc)
updateDataCharacteristics
in class Data
public void refreshMetaData()
refreshMetaData
in class CacheableData<MatrixBlock>
public long getBlocksize()
public long getNnz()
public double getSparsity()
public void setPartitioned(ParForProgramBlock.PDataPartitionFormat format, int n)
public void unsetPartitioned()
public boolean isPartitioned()
public ParForProgramBlock.PDataPartitionFormat getPartitionFormat()
public int getPartitionSize()
public void setInMemoryPartition(MatrixBlock block)
public MatrixBlock readMatrixPartition(IndexRange pred)
pred
- index rangepublic String getPartitionFileName(IndexRange pred, int blen)
Copyright © 2020 The Apache Software Foundation. All rights reserved.