Scala - 3. Scala data Array

1. Array definition Fixed Array length ArrayBuffer variable length If you do not use new when providing the initial value, the bottom layer will directly call the apply method Constant Array Val A1 = array (element 1, element 2,... )We don't need new. The underlying calls apply() to help us wi ...

Added by alvinho on Fri, 01 Nov 2019 07:59:06 +0200

Gatling for Performance Testing

How many people did performance testing before the application went live? It is estimated that most developers pay more attention to functional testing and will provide some use cases for unit testing and integration testing. However, sometimes the impact of performance vulnerabilities is more serious than that of undiscovered business vulnerab ...

Added by pmt2k on Thu, 03 Oct 2019 04:29:44 +0300

spring boot integration Kafka spring-kafka in-depth exploration

Preface Kafka is a message queue product. Based on Topic partitions design, it can achieve very high performance of message sending and processing. Spring created a project called Spring-kafka, which encapsulates Apache's Kafka-client for rapid integration of Kafka in Spring projects. In addition to simple messaging, Spring-kafka also provides ...

Added by atholon on Wed, 28 Aug 2019 13:18:55 +0300

Restapi-do it the functional way, review functional programming

Looking at the source code of the previous blog again, I found I couldn't understand even myself.Think about returning to the OOP line mode in order to make time for delivery. Look at this code: (post & parameters('pid,'desc.?,'width.as[Int].?,'heigth.as[Int].?)) { (pid, optDesc, optWid, optHgh) => val futCount: Fut ...

Added by Fallen_angel on Sat, 24 Aug 2019 06:47:59 +0300

Arrays, mappings, tuples, collections of spark notes

1.1. Array 1.1.1. Fixed-length and variable-length arrays (1) Definition format of fixed-length array: val arr=new ArrayT (2) Variable-length array definition format: val arr = ArrayBuffer[T]() Note the need for a guide: import scala. collection. mutable. Array Buffer package cn.itcast.scala import scala.collection.mutable.ArrayBuffer object ...

Added by Avi on Tue, 13 Aug 2019 10:14:47 +0300

Flink Actual Warfare - Time & Windows Programming

0 Relevant source code Master Flink three commonly used Time processing methods, master the use of rolling window and sliding window in Flink, and understand the watermark ing in Flink. Flink supports different time concepts in stream processing engineering. Processing time The system time of the machine that performs the corresponding operato ...

Added by method_man on Tue, 23 Jul 2019 08:02:46 +0300

Explanation of Chapter 10 in Quick Learning Scala Exercises

The 1 java. awt. Rectangle class has two useful methods translate and grow, but unfortunately there are no classes like java.awt.geom.Ellipse2D. In Scala, you can solve this problem. Define a RenctangleLike trait and add specific translate and group methods. Provide any abstract method you need to implement so that you can incorporate this fea ...

Added by RedDragon on Thu, 18 Jul 2019 03:21:29 +0300

RDD blood relationship source code details!

I. Dependency of RDD RDD dependencies fall into two categories: wide dependencies and narrow dependencies. We can think of it as follows: (1) Narrow dependencies: The partition of each parent RDD is used by at most one partition of the child RDD. (2) Wide dependency: Each parent RDD partition is used by multiple child RDD partitions. Narrow ...

Added by infomamun on Wed, 26 Jun 2019 23:38:31 +0300

Akka series (7): Akka persistence of Actor persistence

This time, I mention this part of the content to now, because the project developed during this period has just met some difficulties in this area, so I am ready to share my experience with you. When we use Akka, we often encounter some scenarios to store the internal state of Actor. In the normal operation of the system, we do not need to worr ...

Added by Sianide on Wed, 12 Jun 2019 01:39:59 +0300

Spark MLlib Data Preprocessing-Feature Transform

Tokenizer (Word segmentation device Introduction to the algorithm: Tokenization divides text into separate individuals (usually words). RegexTokenizer provides more partitioning options based on regular expressions. By default, the parameter "pattern" is a delimiter for dividing text. Or you can specify the parameter "g ...

Added by axm on Fri, 31 May 2019 21:05:00 +0300