Skip to content

Commit a7ad89d

Browse files
committed
Added snapshotToHdfs to the IvoryRetire api
1 parent 1934e29 commit a7ad89d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

ivory-api/src/main/scala/com/ambiata/ivory/api/IvoryRetire.scala

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ object IvoryRetire {
3434
val dictionaryToIvory = com.ambiata.ivory.storage.legacy.IvoryStorage.dictionaryToIvory _
3535

3636
val snapshotFromHdfs = com.ambiata.ivory.storage.legacy.SnapshotStorageV1.snapshotFromHdfs _
37+
val snapshotToHdfs = com.ambiata.ivory.storage.legacy.SnapshotStorageV1.snapshotToHdfs _
3738

3839
val createRepository = com.ambiata.ivory.storage.legacy.CreateRepository.onHdfs _
3940

ivory-storage/src/main/scala/com/ambiata/ivory/storage/legacy/SnapshotStorage.scala

+3
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,7 @@ object SnapshotStorageV1 {
3131
ScoobiAction.scoobiJob({ implicit sc: ScoobiConfiguration =>
3232
SnapshotLoader(path).loadScoobi
3333
})
34+
35+
def snapshotToHdfs(dlist: DList[Fact], path: Path, codec: Option[CompressionCodec]): ScoobiAction[DList[Fact]] =
36+
ScoobiAction.scoobiJob({ implicit sc: ScoobiConfiguration => SnapshotStorer(path, codec).storeScoobi(dlist) })
3437
}

0 commit comments

Comments
 (0)