Skip to content

Instantly share code, notes, and snippets.

[error] java.lang.NoSuchMethodError: scala.reflect.api.Internals$ReificationSupportApi.SyntacticTypeApplied()Lscala/reflect/api/Internals$Reifi$$$$9694e45bc19be932a29ce44fb2993611$$$$ppliedExtractor;
[error] at tapir.generic.FormCodecMacros$.$anonfun$generateForCaseClass$1(FormCodecDerivation.scala:24)
[error] at scala.collection.immutable.List.map(List.scala:286)
[error] at tapir.generic.FormCodecMacros$.generateForCaseClass(FormCodecDerivation.scala:23)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.lang.reflect.Method.invoke(Method.java:498)
[error] at scala.reflect.macros.runtime.JavaReflectionRuntimes$JavaReflectionResolvers.$anonfun$resolveJavaReflectionRuntime$4(JavaReflectionRuntimes.scala:46)
[error] at scal
trait StreamAlg[S[_], KeyedS[_], InEvent] {
def createStream: S[InEvent]
def keyBy[E](stream: S[E]): KeyedS[E]
def flatMapWithState[InE, OutE, State](stream: S[InE])(f: (InE, State) => Seq[OutE]): S[OutE]
def mapWithState[InE, OutE, State](stream: S[InE])(f: (InE, State) => Seq[OutE]): S[OutE]
case class FunctionNPhase[Event, States <: HList, Phases <: HList](
function: Seq[Double] => Double,
functionName: String,
innerPhases: Phases
)(implicit ev: Mapped.Aux[States, ({ type T[State] = NumericPhaseParser[Event, State] })#T, Phases])
extends Pattern[Event, States, Double] {
private val initialStateGetter = new (({ type U[State] = NumericPhaseParser[Event, State] })#U ~> Id) {
override def apply[T](f: NumericPhaseParser[Event, T]): Id[T] = f.initialState
}
{
"uuid": "test",
"source": {same},
"sink": {
"jdbcUrl": "jdbc:postgresql://192.168.1.249:5433/mwm?stringtype=unspecified",
"tableName": "sm_events_sink_test",
"rowSchema": {
"fromTime": ["fromTs", "first(toTs(datetime))"],
"toTime": ["toTs", "last(toTs(datetime))"],
"payload": {
trait FromSlice[C] {
def apply(v: C): Int
}
def tupleSlice[T] = new FromSlice[Tuple[T]] {
def apply(v: Tuple[T]): Int = v.size
}
// ... Same for Either and other
An exception or error caused a run to abort: akka.actor.ActorSystem.shutdown()V
java.lang.NoSuchMethodError: akka.actor.ActorSystem.shutdown()V
at org.apache.flink.runtime.minicluster.FlinkMiniCluster$$anonfun$startInternalShutdown$5$$anonfun$apply$7.apply(FlinkMiniCluster.scala:483)
at org.apache.flink.runtime.minicluster.FlinkMiniCluster$$anonfun$startInternalShutdown$5$$anonfun$apply$7.apply(FlinkMiniCluster.scala:483)
at scala.collection.Iterator$class.foreach(Iterator.scala:893)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at org.apache.flink.runtime.minicluster.FlinkMiniCluster$$anonfun$startInternalShutdown$5.apply(FlinkMiniCluster.scala:483)
readCsv("/mnt/data/110218.csv", 'datetime) { row =>
saveToDb(telemetryConnect, sinkSchema)(row) {
outliersToAvg(5.second)('speed, 'oilPomp, 'KMPos) ~>
enrichWith(weather) ~>
interpolate('speed)
} ~
persistRule(rulesConnect, sinkSchema)(row) & alert(alertConnect, schema)(row) {
Assert('PosKM.as[Double] > 10).timed(max=10.seconds)
} ~
persistRollUp(rollUpsConnect, sinkSchema)(row) {

Исследование эффективности комманд в Google Аристотель [1.2]:

  • Нет ярких отличительных черт в продуктивных командах (строгий или мягкий начальник, наличие умников, ...)
  • Отличительные особенности успешных комманд (психологическая безопасность):
    • Каждый должен быть услышан (ключевой критерий: все говорят примерно одинаковое количество времени) Однако, не настолько же важно будет ли учтён голос человека при принятии решения!
    • Все члены команды имеют высокий эмоциональный интеллект, i.g. хорошую эмпатию (тест "Прочитай мысли по глазам"). Однако они не обязаны быть друзьями.

NUMMI - один из самых плохих заводов GE в США, который, благодаря бережливому производству^, выбился за год в лидеры [1.3] Как:

QuestionsOnInterview

Вопросы по Scala Middle+

Общие:

  • Почему Scala? Как ты пришёл(а) в этот язык, что нравится, что нет?
  • Какими инструментами пользуешься для разработки? ОС, Редактор кода, ...

Type system:

  • Чем отличается var, val и def?
package ru.itclover.streammachine.http
import akka.actor.{Actor, ActorSystem, PoisonPill, Props, Terminated}
import akka.stream.ActorMaterializer
import org.apache.flink.streaming.api.scala.StreamExecutionEnvironment
import scala.concurrent.duration._
import scala.concurrent.{Await, ExecutionContextExecutor}
import scala.io.StdIn
import akka.stream.ActorMaterializer