Skip to content

Commit

Permalink
test: ignore me
Browse files Browse the repository at this point in the history
  • Loading branch information
betarixm committed Nov 27, 2023
1 parent bd064ea commit d2b03e0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
11 changes: 9 additions & 2 deletions rpc/src/main/scala/WorkerServer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ import org.apache.logging.log4j.scala.Logging

import scala.concurrent.ExecutionContext
import scala.reflect.io.Directory

import worker._

import kr.ac.postech.paranode.core.WorkerMetadata

class WorkerServer(
executionContext: ExecutionContext,
me: WorkerMetadata,
port: Int,
inputDirectories: Array[Directory],
outputDirectory: Directory
Expand All @@ -18,7 +20,12 @@ class WorkerServer(
.forPort(port)
.addService(
WorkerGrpc.bindService(
new WorkerService(executionContext, inputDirectories, outputDirectory),
new WorkerService(
executionContext,
me,
inputDirectories,
outputDirectory
),
executionContext
)
)
Expand Down
2 changes: 2 additions & 0 deletions rpc/src/main/scala/WorkerService.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import Implicit._

class WorkerService(
executionContext: ExecutionContext,
me: WorkerMetadata,
inputDirectories: Array[Directory],
outputDirectory: Directory
) extends WorkerGrpc.Worker
Expand Down Expand Up @@ -182,6 +183,7 @@ class WorkerService(

val targetWorkers = workers
.filter(_.keyRange.get.includes(block.records.head.key))
.filter(_.host != me.host)
.toList

logger.info(s"[WorkerServer] Sending $block to $targetWorkers")
Expand Down
1 change: 1 addition & 0 deletions worker/src/main/scala/Worker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ object Worker extends Logging {

val server = new WorkerServer(
executionContext,
workerMetadata,
workerPort,
workerArguments.inputDirectories,
workerArguments.outputDirectory
Expand Down

0 comments on commit d2b03e0

Please sign in to comment.