Skip to content

Commit

Permalink
Update Jelly
Browse files Browse the repository at this point in the history
The update allows us to remove one ugly hack that prevented message splitting. Now this option is built into Jelly.
  • Loading branch information
Ostrzyciel committed Oct 11, 2023
1 parent 58a9e73 commit 555a86e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resolvers +=
"Sonatype OSS Snapshots" at "https://s01.oss.sonatype.org/content/repositories/snapshots"

lazy val circeV = "0.14.5"
lazy val jellyV = "0.3.0+3-ce121e17-SNAPSHOT"
lazy val jellyV = "0.4.0+2-a22836a1-SNAPSHOT"
lazy val jenaV = "4.7.0"
lazy val pekkoV = "1.0.1"
lazy val pekkoHttpV = "1.0.0"
Expand Down
5 changes: 2 additions & 3 deletions src/main/scala/commands/PackageCommand.scala
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@ object PackageCommand extends Command:
}

// Large target message size to avoid splitting
val sOpt = EncoderFlow.Options(1_000_000_000)
val jOpt = JellyOptions.bigStrict
.withGeneralizedStatements(
metadata.conformance.usesGeneralizedTriples || metadata.conformance.usesGeneralizedRdfDatasets
Expand All @@ -355,11 +354,11 @@ object PackageCommand extends Command:
if metadata.elementType == "triples" then
Flow[(DatasetGraph, Long)]
.map((ds, _) => ds.getDefaultGraph.asTriples)
.via(EncoderFlow.fromGroupedTriples(sOpt, jOpt))
.via(EncoderFlow.fromGroupedTriples(None, jOpt))
else
Flow[(DatasetGraph, Long)]
.map((ds, _) => ds.asQuads)
.via(EncoderFlow.fromGroupedQuads(sOpt, jOpt))
.via(EncoderFlow.fromGroupedQuads(None, jOpt))
)
.via(JellyIo.toBytesDelimited)
.map(ByteString(_))
Expand Down

0 comments on commit 555a86e

Please sign in to comment.