Skip to content

Commit

Permalink
Fix arrow blob extention and add
Browse files Browse the repository at this point in the history
  • Loading branch information
Affie committed Nov 15, 2024
1 parent 02a94c6 commit e845d25
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
5 changes: 4 additions & 1 deletion ext/BlobArrow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ using Arrow
using DistributedFactorGraphs
using DistributedFactorGraphs: _MIMETypes

push!(_MIMETypes, MIME("application/vnd.apache.arrow.file") => format"Arrow") # see issue #507
function __init__()
@info "Including Arrow blobs support in DFG."
return push!(_MIMETypes, MIME("application/vnd.apache.arrow.file") => format"Arrow") # see issue #507
end

# kwargs: compress = :lz4,
function DFG.packBlob(::Type{format"Arrow"}, data; kwargs...)
Expand Down
3 changes: 2 additions & 1 deletion src/DataBlobs/services/BlobPacking.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ push!(_MIMETypes, MIME("application/octet-stream/json") => format"JSON")
push!(_MIMETypes, MIME("application/bson") => format"BSON")
push!(_MIMETypes, MIME("image/png") => format"PNG")
push!(_MIMETypes, MIME("image/jpeg") => format"JPG")
push!(_MIMETypes, MIME("application/octet-stream; ext=las") => format"LAS")
push!(_MIMETypes, MIME("application/vnd.las") => format"LAS")
push!(_MIMETypes, MIME("application/vnd.apache.parque") => format"Parquet") # Provided by FileIO with ParquetFiles

"""
packBlob
Expand Down
3 changes: 3 additions & 0 deletions src/DataBlobs/services/BlobStores.jl
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ struct FolderStore{T} <: AbstractBlobStore{T}
folder::String
end

#TODO rename key to label for consistency
getLabel(store::FolderStore) = store.key

function FolderStore(foldername::String; label = :default_folder_store, createfolder = true)
if createfolder && !isdir(foldername)
@info "Folder '$foldername' doesn't exist - creating."
Expand Down
1 change: 1 addition & 0 deletions src/DistributedFactorGraphs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ export hasBlobEntry,
getBlobEntry,
getBlobEntryFirst,
addBlobEntry!,
addBlobEntries!,
updateBlobEntry!,
deleteBlobEntry!,
listBlobEntrySequence,
Expand Down

0 comments on commit e845d25

Please sign in to comment.