小编Val*_*tin的帖子

如何从另一条管道内排空管道?

我需要以编程方式从另一个管道中排出管道。该DataflowPipelineJob班没有一个drain方法来实现。是否可以drain使用 Java API调用管道?

java google-cloud-dataflow

6
推荐指数
1
解决办法
679
查看次数

Scala mutable.TreeMap 2.12.1中的"to"错误?

花了一些时间来解决一些代码问题,来到curios bug"to".我错过了什么?

Welcome to Scala 2.12.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_121).
Type in expressions for evaluation. Or try :help.

scala> val is = collection.mutable.TreeMap[Int, Int]()
is: scala.collection.mutable.TreeMap[Int,Int] = TreeMap()
scala> is += 0 -> 9 += 70 -> 100
res0: is.type = TreeMap(0 -> 9, 70 -> 100)
scala> is.from(30)
res1: scala.collection.mutable.TreeMap[Int,Int] = TreeMap(70 -> 100)
scala> is.to(30)
res2: scala.collection.mutable.TreeMap[Int,Int] = TreeMap() // !!!!!

scala> val is2 = collection.immutable.TreeMap[Int, Int]()
is2: scala.collection.immutable.TreeMap[Int,Int] = Map()
scala> val is3 = …
Run Code Online (Sandbox Code Playgroud)

scala scala-collections

1
推荐指数
1
解决办法
85
查看次数