2016-03-29 19 views
0

Aşağıdaki genişletilmiş RichGroupReduceFunction sınıfı derlenmiyor. İmza, görünüşte arayüzle uyuşmuyor. Farkı söyleyemem.RichGroupReduceFunction için doğru yöntem imzası?

class SPointReduce extends RichGroupReduceFunction[Int, Int] { 
     override def reduce (
           values: Iterable[Int], 
           out: Collector[Int]): Unit = { 
     values.foreach { 
      value: Int => 
      out.collect(value) 
     } 
     } 
    } 

derleyici raporları:

Error:(62, 16) method reduce overrides nothing. Note: the super classes of class SPointReduce contain the following, non final members named reduce: def reduce(x$1: Iterable[Nothing],x$2: org.apache.flink.util.Collector[Nothing]): Unit override def reduce (

cevap

0

Sen RichGroupReduceFunction ait reduce yöntemini geçersiz zaman java.lang.Iterable içe olduğundan emin olmak gerekir. Aksi takdirde yukarıda belirtilen hatayı alacaksınız.

+0

Bu mantıklı. Teşekkürler. –

İlgili konular