Scala functional programming under functional data structure

previously on Guide to functional programming in Scala Scala functional programming (2) introduction to scala basic syntax scala functional programming (3) scala sets and functions Scala functional programming (four) functional data structure 1.List code analysis The content introduced today is mainly to supplement the scala functional data st ...

Posted by stev979 on Thu, 19 Dec 2019 03:45:09 -0800

Real time log analysis by Flume+Kafka+SparkStreaming+Redis+Mysql ip access times

Novice learning, if there are mistakes, please correct, thank you! 1. Start zookeeper and kafka, and set a topic as test fkss. For the convenience of observation, I added it through kafka manager 2. Configure Flume and start it. The listening file is / home / czh / docker-public-file/testplume.log, which is sent to kafka a ...

Posted by ksduded on Sat, 14 Dec 2019 10:51:38 -0800

[four Twirl template engine] 3. Common templates

Now let's look at the typical usage of templates. layout Now declare a view / main.scala.html template as the main template: @(title: String)(content: Html) <!DOCTYPE html> <html> <head> <title>@title</title> </head> <body> <section class="content">@content</section> ...

Posted by Tryweryn on Sun, 08 Dec 2019 07:13:13 -0800

Scala defines arrays, enhances for traversing Scala arrays, unitl generates subscripts traversing Scala arrays, array conversion, array common algorithms 05

1 fixed length array and variable length array Format of fixed length array definition: val arr = new Array[T] (array length) Variable length array definition format: val arr = ArrayBuffer[T]()Note that you need to import the package: import scala.collection.mutable.ArrayBuffer The code is as follows import scala.colle ...

Posted by sashi34u on Sat, 16 Nov 2019 07:37:04 -0800

2. Principle and Use of spark--spark core

[TOC] 1. Some basic terms in spark RDD: Elastically distributed datasets, the core focus of sparkOperators: Some functions for manipulating RDDapplication: user-written spark Program (DriverProgram + ExecutorProgram)job: an action class operator triggered operationstage: A set of tasks that divide a job into several stages based on dependencie ...

Posted by FeeBle on Fri, 15 Nov 2019 22:22:07 -0800

playframework - Tutorial

play framework 2.x is a framework developed with scala and java. It can't be said to be a framework, but a solution. The advantages of play framework are as follows: High efficiency of development and functional programming of scala. Stateless and scalable. Hot deployment, direct dynamic compilation of source code modificati ...

Posted by cbrian on Sun, 10 Nov 2019 07:15:19 -0800

Understanding closures in Scala

First of all, we need to distinguish the differences between Scala functions and methods, which are two different concepts in scala. Only when we understand these two concepts can we understand the currification. Method scala> def add(x:Int, y: Int) = x + y add: (x: Int, y: Int)Int scala> add(1, 2) res0: Int = 3   function ...

Posted by sactown on Tue, 05 Nov 2019 08:25:54 -0800

flink dynamic broadcast status

flink dynamic broadcast status notes 1. outline Often we need dynamic matching rules when doing the flink task calculation, but we can't redeploy the service every time we modify it, so we need to use the dynamic broadcast state mechanism of flink to deal with our rule changes in real time. ...

Posted by spectsteve7 on Sat, 02 Nov 2019 17:44:14 -0700

Chapter 3 array related operations in notes of quick learning scala Second Edition

Fixed length array Array of constant length, array of Scala: val nums = new Array[Int](10) //Array of type Int, length 10, initial value 0 nums(0) //Array access with parentheses Variable length array Similar to ArrayList in Java, scala uses ArrayBuffer val emptyBuffer = ArrayBuffer[Int]() ...

Posted by jcombs_31 on Tue, 29 Oct 2019 14:56:23 -0700

Flink development issues summary

When installing through brew on mac system, the local default installation address is / usr / local / cell / Apache Flink / 1.5.1 1. Can I call graph algorithm in flink? It can be called in dataSet, and it needs to write its own method in dataStream. It can be implemented in scala by itself, just by r ...

Posted by Rommeo on Sun, 27 Oct 2019 03:13:17 -0700