flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Drewes <dre...@campus.tu-berlin.de>
Subject env.fromElements produces TypeInformation error
Date Sat, 04 Jun 2016 15:34:36 GMT

Hi,

compiling the code:

def minimize(f:DF, init:T):T = {

   //create execution environment val env = ExecutionEnvironment.getExecutionEnvironment

   valinitialstate =initialState(f, init)

val iterativestate= env.fromElements(initialstate).iterate(10000) {
     iterationInput: DataSet[State] =>
     val result = iterationInput.map {
         oldstate => computeNextState(adjustedFun, oldstate)
       }
       result
   }
}

objectIterationsFirstOrderMinimizer {
case class State[+T,+ConvergenceInfo,+History] (x:T,
                                                    value: Double, grad:T,
                                                    adjustedValue: Double, adjustedGradient:T,
                                                    iter: Int,
                                                    initialAdjVal: Double,
                                                    history:History,
                                                    convergenceInfo:ConvergenceInfo,
                                                    searchFailed: Boolean =false) {
   }

... fails with the error: could not find implicit value for evidence 
parameter of type 
org.apache.flink.api.common.typeinfo.TypeInformation[IterationsFirstOrderMinimizer.this.State]

     val iterativestate= env.fromElements(initialState(f, 
init)).iterate(10000) {                                         ^ Google 
only told me toimport org.apache.flink.api.scala._     which i do. The 
other suggested solution for generic methods 
(https://ci.apache.org/projects/flink/flink-docs-master/internals/types_serialization.html)

does also not apply because it's the fromElements call that produces the 
error. I am very new to Flink and Scala and because I don't know if the 
code I posted above is enough to say what I'm doing wrong, you can find 
the complete scala file attached. Thanks in advance for any ideas and 
hints. Best, Dan


---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren gepr├╝ft.
https://www.avast.com/antivirus

Mime
View raw message