Skip to content

Commit

Permalink
Fix for test
Browse files Browse the repository at this point in the history
Two things:

we only expect to use toPipe internally, marking it package private helps with where it gets used.

Also the error stems from merging of flowdefs which need to copy the Boxed info between them
  • Loading branch information
ianoc committed Jul 20, 2015
1 parent 4f4d518 commit 282ced2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class RichFlowDef(val fd: FlowDef) {
.foreach { oFS =>
FlowStateMap.mutate(fd) { current =>
// overwrite the items from o with current
(current.copy(sourceMap = oFS.sourceMap ++ current.sourceMap), ())
(current.copy(sourceMap = oFS.sourceMap ++ current.sourceMap, flowConfigUpdates = oFS.flowConfigUpdates ++ current.flowConfigUpdates), ())
}
}
}
Expand Down Expand Up @@ -147,7 +147,7 @@ class RichFlowDef(val fd: FlowDef) {
if (headNames(name)) newfs + kv
else newfs
}
FlowStateMap.mutate(newFd) { oldFS => (oldFS.copy(sourceMap = subFlowState), ()) }
FlowStateMap.mutate(newFd) { oldFS => (oldFS.copy(sourceMap = subFlowState, flowConfigUpdates = thisFS.flowConfigUpdates ++ oldFS.flowConfigUpdates), ()) }
}
newFd
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ trait TypedPipe[+T] extends Serializable {
/**
* Provide the internal implementation to get from a typed pipe to a cascading Pipe
*/
protected def asPipe[U >: T](fieldNames: Fields)(implicit flowDef: FlowDef, mode: Mode, setter: TupleSetter[U]): Pipe
private[typed] def asPipe[U >: T](fieldNames: Fields)(implicit flowDef: FlowDef, mode: Mode, setter: TupleSetter[U]): Pipe

/////////////////////////////////////////////
//
Expand Down Expand Up @@ -866,7 +866,7 @@ class TypedPipeFactory[T] private (@transient val next: NoStackAndThen[(FlowDef,

override def asPipe[U >: T](fieldNames: Fields)(implicit flowDef: FlowDef, mode: Mode, setter: TupleSetter[U]) =
// unwrap in a loop, without recursing
unwrap(this).toPipe[U](fieldNames)(flowDef, mode, setter)
unwrap(this).asPipe[U](fieldNames)(flowDef, mode, setter)

override def toIterableExecution: Execution[Iterable[T]] = Execution.getConfigMode.flatMap {
case (conf, mode) =>
Expand Down

0 comments on commit 282ced2

Please sign in to comment.