单项选择题
下列哪个操作能够实现“基于窗口将DStream[(K,V)]中的值V按键K使用聚合函数func聚合得到新的DStream”()
A.count
B.reduceByKeyAndWidow
C.countByValue
D.reduceByKey
点击查看答案&解析
相关考题
-
单项选择题
MLlib供的分布式矩阵中,不包含行、列索引信息的矩阵类型是()
A.RowMatrix
B.IndexedRowMatrix
C.Matrix
D.CoordinateMatrix -
单项选择题
MLlib中创建稀疏矩阵((0.0,2.0),(3.0,0.0),(0.0,6.0))的语句是()
A.val dm:Matrix=Matrices.dense(3,2,Array(0.0,3.0,0.0,2.0,0.0,6.0))
B.val dm:Matrix=Matrices.sparse(3,2,Array(0.0,2.0,3.0,0.0,0.0,6.0))
C.val sm:Matrix=Matrices.sparse(3,2,Array(0,1,2),Array(1,0,1),Array(2,3,6))
D.val sm:Matrix=Matrices.dense(3,2,Array(0,1,2),Array(1,0,1),Array(2,3,6)) -
单项选择题
基于密集向量(1.0,0.0,3.0)创建一个LabledPoint,设其标识值为1.0,以下正确的选项为()
A.val pos=LabeledPoint(1.0,Vectors.dense(1.0,0.0,3.0))
B.val pos=LabeledPoint(1.0,(1.0,0.0,3.0))
C.val pos=LabeledPoint(Vectors.dense(1.0,0.0,3.0),1.0)
D.val pos=LabeledPoint((1.0,0.0,3.0),1.0)
