Blobs and BlobEntries
Types
DistributedFactorGraphs.BlobEntry
— Typestruct BlobEntry
A BlobEntry
is a small about of structured data that holds reference information to find an actual blob. Many BlobEntry
s can exist on different graph nodes spanning Agents and Factor Graphs which can all reference the same Blob
.
Notes:
blobId
s should be unique within a blobstore and are immutable.
Functions
DistributedFactorGraphs.addBlobEntry!
— MethodaddBlobEntry!(var, entry)
Add Data Entry to a DFG variable Should be extended if DFG variable is not returned by reference.
Also see: getBlobEntry
, addBlob!
, mergeBlobEntries!
DistributedFactorGraphs.buildSourceString
— MethodbuildSourceString(dfg, label)
Function to generate source string - agentLabel|graphLabel|varLabel
DistributedFactorGraphs.deleteBlobEntry!
— MethoddeleteBlobEntry!(var, key)
Delete a blob entry from the factor graph. Note this doesn't remove it from any data stores.
Notes:
- users responsibility to delete data in db before deleting entry
DistributedFactorGraphs.getBlobEntries
— MethodgetBlobEntries(var)
Get blob entries, Vector{BlobEntry}
DistributedFactorGraphs.getBlobEntriesVariables
— MethodgetBlobEntriesVariables(
dfg,
bLblPattern;
varList,
dropEmpties
)
Get all blob entries matching a Regex pattern over variables
Notes
- Use
dropEmpties=true
to not include empty lists in result. - Use keyword
varList
for which variables to search through.
DistributedFactorGraphs.getBlobEntry
— MethodDistributedFactorGraphs.getBlobEntryFirst
— MethodgetBlobEntryFirst(var, key)
Finds and returns the first blob entry that matches the regex.
Also see: getBlobEntry
DistributedFactorGraphs.hasBlobEntry
— MethodhasBlobEntry(var, blobLabel)
Does a blob entry (element) exist with blobLabel
.
DistributedFactorGraphs.incrDataLabelSuffix
— MethodincrDataLabelSuffix(dfg, vla, bllb; datalabel)
If the blob label datalabel
already exists, then this function will return the name datalabel_1
. If the blob label datalabel_1
already exists, then this function will return the name datalabel_2
.
DistributedFactorGraphs.listBlobEntries
— MethodlistBlobEntries(var)
List the blob entries associated with a particular variable.
DistributedFactorGraphs.listBlobEntrySequence
— FunctionlistBlobEntrySequence(dfg, lb, pattern)
listBlobEntrySequence(dfg, lb, pattern, _sort)
List a collection of blob entries per variable that match a particular pattern::Regex
.
Notes
- Optional sort function argument, default is unsorted.
- Likely use of
sortDFG
for basic Symbol sorting.
- Likely use of
Example
listBlobEntrySequence(fg, :x0, r"IMG_CENTER", sortDFG)
15-element Vector{Symbol}:
:IMG_CENTER_21676
:IMG_CENTER_21677
:IMG_CENTER_21678
:IMG_CENTER_21679
...
DistributedFactorGraphs.mergeBlobEntries!
— MethodmergeBlobEntries!(dst, dlbl, src, slbl, bllb)
Add a blob entry into the destination variable which already exists in a source variable.
See also: addBlobEntry!
, getBlobEntry
, listBlobEntries
, getBlob
DistributedFactorGraphs.updateBlobEntry!
— MethodupdateBlobEntry!(var, bde)
Update data entry
DevNote
- DF, unclear if
update
verb is applicable in this case, see #404
DistributedFactorGraphs.addBlob!
— FunctionAdds a blob to the blob store or dfg with the given entry.
Related addBlobEntry!
addBlob!(store, _, _)
addBlob!(dfg, entry, data)
addBlob!(store, entry, data)
addBlob!(store, data)
addBlob!(store, blobId, data, _)
addBlob!(store, data, _)
addBlob!(store, blobId, data)
addBlob!(store, blobId, data)
addBlob!(store, entry, linkfile)
addBlob!(store, blobId, blob, linkfile)
addBlob!(store, blobId, blob)
DistributedFactorGraphs.deleteBlob!
— FunctionDelete a blob from the blob store or dfg with the given entry.
Related deleteBlobEntry!
deleteBlob!(store, _)
deleteBlob!(dfg, entry)
deleteBlob!(store, entry)
deleteBlob!(store, blobId)
deleteBlob!(store, blobId)
deleteBlob!(store, args)
deleteBlob!(store, _)
deleteBlob!(store, _)
deleteBlob!(store, blobId)
DistributedFactorGraphs.getBlob
— FunctionGet the data blob for the specified blobstore or dfg.
Related getBlobEntry
getBlob(store, _)
getBlob(dfg, entry)
getBlob(store, entry)
getBlob(store, blobId)
getBlob(store, blobId)
getBlob(store, blobId)
getBlob(store, blobId)
DistributedFactorGraphs.listBlobs
— FunctionList all ids in the blob store.
DistributedFactorGraphs.updateBlob!
— FunctionUpdate a blob to the blob store or dfg with the given entry. Related updateBlobEntry!
updateBlob!(store, _, _)
updateBlob!(dfg, entry, data)
updateBlob!(store, entry, data)
updateBlob!(store, blobId, data)
updateBlob!(store, blobId, data)
updateBlob!(store, blobId, blob)
DevNotes
- TODO TBD update verb on data since data blobs and entries are restricted to immutable only.
DistributedFactorGraphs.packBlob
— FunctionpackBlob
Convert a file (JSON, JPG, PNG, BSON, LAS) to Vector{UInt8} for use as a Blob. Returns the blob and MIME type.
DistributedFactorGraphs.unpackBlob
— FunctionunpackBlob
Convert a Blob back to the origanal typ using the MIME type or DataFormat type.
DistributedFactorGraphs.addData!
— FunctionAdd both a BlobEntry and Blob to a distributed factor graph or BlobStore. Related addBlobEntry!
addData!(dfg, label, entry, blob; hashfunction, checkhash)
addData!(
dfg,
blobstore,
label,
entry,
blob;
hashfunction,
checkhash
)
addData!(
dfg,
blobstorekey,
vLbl,
bLbl,
blob,
timestamp;
kwargs...
)
addData!(dfg, blobstorekey, vLbl, bLbl, blob; ...)
addData!(
dfg,
blobstore,
vLbl,
bLbl,
blob,
timestamp;
description,
metadata,
mimeType,
id,
blobId,
originId,
hashfunction
)
addData!(dfg, blobstore, vLbl, bLbl, blob; ...)
addData!(
dfg,
blobstore,
vLbl,
blobLabel,
blob,
timestamp;
description,
metadata,
mimeType,
origin
)
addData!(dfg, blobstore, vLbl, blobLabel, blob; ...)
DistributedFactorGraphs.deleteData!
— FunctionDelete a blob entry and blob from the blob store or dfg. Related deleteBlobEntry!
deleteData!(dfg, vLbl, bLbl)
deleteData!(dfg, blobstore, vLbl, entry)
deleteData!(dfg, blobstore, vLbl, bLbl)
DistributedFactorGraphs.getData
— FunctionGet the blob entry and blob for the specified blobstore or dfg retured as a tuple. Related getBlobEntry
getData(dfg, vlabel, key; hashfunction, checkhash, getlast)
getData(
dfg,
blobstore,
label,
key;
hashfunction,
checkhash,
getlast
)
DistributedFactorGraphs.updateData!
— FunctionUpdate a blob entry or blob to the blob store or dfg. Related updateBlobEntry!
updateData!(
dfg,
label,
entry,
blob;
hashfunction,
checkhash
)
updateData!(
dfg,
blobstore,
label,
entry,
blob;
hashfunction
)