Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.13 #2150

Merged
merged 2 commits into from
Apr 24, 2022
Merged

0.13 #2150

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions kafka/src/test/scala/mtest/kafka/stream/KafkaStreamingTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ object KafkaStreamingData {
val s1Data: Stream[IO, ProducerRecords[Int, StreamOne]] = Stream
.emits(
List(
ProducerRecord[Int, StreamOne](s1Topic.topicName.value, 101, StreamOne("na", -1)),
ProducerRecord[Int, StreamOne](s1Topic.topicName.value, 102, StreamOne("na", -1)),
ProducerRecord[Int, StreamOne](s1Topic.topicName.value, 103, StreamOne("na", -1)),
ProducerRecord[Int, StreamOne](s1Topic.topicName.value, 1, StreamOne("a", 0)),
ProducerRecord[Int, StreamOne](s1Topic.topicName.value, 2, StreamOne("b", 1)),
ProducerRecord[Int, StreamOne](s1Topic.topicName.value, 3, StreamOne("c", 2)),
ProducerRecord[Int, StreamOne](s1Topic.topicName.value, 201, StreamOne("d", 3)),
ProducerRecord[Int, StreamOne](s1Topic.topicName.value, 202, StreamOne("e", 4))
s1Topic.fs2ProducerRecord(101, StreamOne("na", -1)),
s1Topic.fs2ProducerRecord(102, StreamOne("na", -1)),
s1Topic.fs2ProducerRecord(103, StreamOne("na", -1)),
s1Topic.fs2ProducerRecord(1, StreamOne("a", 0)),
s1Topic.fs2ProducerRecord(2, StreamOne("b", 1)),
s1Topic.fs2ProducerRecord(3, StreamOne("c", 2)),
s1Topic.fs2ProducerRecord(201, StreamOne("d", 3)),
s1Topic.fs2ProducerRecord(202, StreamOne("e", 4))
).map(ProducerRecords.one))
.covary[IO]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import eu.timepit.refined.api.Refined
import io.circe.generic.JsonCodec
import io.circe.refined.*
import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.fs.Path
import org.apache.hadoop.fs.{LocatedFileStatus, Path}
import org.apache.parquet.hadoop.util.{HadoopInputFile, HadoopOutputFile}

import java.net.URI
Expand Down Expand Up @@ -51,10 +51,11 @@ final case class NJPath private (root: PathRoot, segments: List[PathSegment]) {
}
object NJPath {

def apply(root: PathRoot): NJPath = NJPath(root, Nil)
def apply(hp: Path): NJPath = NJPath(PathRoot.unsafeFrom(hp.toString))
def apply(uri: URI): NJPath = NJPath(PathRoot.unsafeFrom(uri.toASCIIString))
def apply(s3: S3Path): NJPath = NJPath(PathRoot.unsafeFrom(s3.s3a))
def apply(root: PathRoot): NJPath = NJPath(root, Nil)
def apply(hp: Path): NJPath = apply(PathRoot.unsafeFrom(hp.toString))
def apply(uri: URI): NJPath = apply(PathRoot.unsafeFrom(uri.toASCIIString))
def apply(s3: S3Path): NJPath = apply(PathRoot.unsafeFrom(s3.s3a))
def apply(lfs: LocatedFileStatus): NJPath = apply(lfs.getPath)

implicit val showNJPath: Show[NJPath] = _.pathStr

Expand Down