Skip to content

Commit a96f463

Browse files
authored
Fix arrow blob extention and add (#1108)
Co-authored-by: Johannes Terblanche <Affie@users.noreply.github.com>
1 parent 02a94c6 commit a96f463

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

ext/BlobArrow.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ using Arrow
44
using DistributedFactorGraphs
55
using DistributedFactorGraphs: _MIMETypes
66

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

912
# kwargs: compress = :lz4,
1013
function DFG.packBlob(::Type{format"Arrow"}, data; kwargs...)

src/DataBlobs/services/BlobPacking.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ push!(_MIMETypes, MIME("application/octet-stream/json") => format"JSON")
1717
push!(_MIMETypes, MIME("application/bson") => format"BSON")
1818
push!(_MIMETypes, MIME("image/png") => format"PNG")
1919
push!(_MIMETypes, MIME("image/jpeg") => format"JPG")
20-
push!(_MIMETypes, MIME("application/octet-stream; ext=las") => format"LAS")
20+
push!(_MIMETypes, MIME("application/vnd.las") => format"LAS")
21+
push!(_MIMETypes, MIME("application/vnd.apache.parque") => format"Parquet") # Provided by FileIO with ParquetFiles
2122

2223
"""
2324
packBlob

src/DataBlobs/services/BlobStores.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ struct FolderStore{T} <: AbstractBlobStore{T}
181181
folder::String
182182
end
183183

184+
#TODO rename key to label for consistency
185+
getLabel(store::FolderStore) = store.key
186+
184187
function FolderStore(foldername::String; label = :default_folder_store, createfolder = true)
185188
if createfolder && !isdir(foldername)
186189
@info "Folder '$foldername' doesn't exist - creating."

src/DistributedFactorGraphs.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ export hasBlobEntry,
227227
getBlobEntry,
228228
getBlobEntryFirst,
229229
addBlobEntry!,
230+
addBlobEntries!,
230231
updateBlobEntry!,
231232
deleteBlobEntry!,
232233
listBlobEntrySequence,

0 commit comments

Comments
 (0)