Now, here are the steps to build your development environment:Because Scala is a language on the JVM, we first install the Java Runtime environment. Download and install JDK8 from Oracle official website. Note that Scala only needs to run the Java environment, that is, to install only: JRE, but in order to facilitate future Java development, we still install the Java development environment. After the insta
There are several zip-related functions in Scala, such as zip,zipall,zipped, Zipwithindex, and so on. We often see such functions in our code, and this article mainly introduces the differences and uses of these functions.1, the ZIP function will pass in two parameters in the corresponding position of the elements to form a pair array. If one of the parameter elements is longer, then the extra parameters are deleted. Look at the English introduction:R
(Bus). Only through horizontal expansion (scale out), that is, distribution expansion by increasing the computer server and then using the distributed computing technology to divide the computational task into discrete servers for processing; This is the core of big data technology.Predictably, we will face the future: distributed data, high concurrency processing, parallel computing, NoSQL and very large interactive complex network platform programming. As a veteran programmer, experienced fro
Scala list/sequence faq:how do I iterate over a Scala List (or more generally, a sequence) using the foreach method or for loop?There is a number of ways to iterate over a Scala List using the foreach method (which was available to Scala sequences like ,,,, List Array ArrayBuffer Vector Seq , etc.) for and comprehensio
1. JDK official website address: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Scala is based on Java and uses a large number of Java class libraries and variables. Therefore, you must install Java before using Scala.
Install JDK and select the installation path
Check whether the installation is successful
Open CMD and enter Java-version. If the Java version is
1. Download Scala 2.9.2
Since the latest Scala 2.10 stabilizer is not finished, it's best to download the latest Scala stable version: 2.9.2.Download Address: Http://www.scala-lang.org/downloads/distrib/files/scala-2.9.2.msiThe advantage of downloading the MSI version is that the environment variable is automatically
First, download Scala installation package
From the official Scala website address: http://www.scala-lang.org/download/Download Scala binary package, in 2.11.8 version For example two, installation
1. Move the downloaded binary package to the/usr/local directory and unzip the package
Tar zxvf scala-2.11.8.tgz
MV
Tags: in addition to the input situation Eclipse blog free org Speed waterBuild maven Scala projects with eclipse1. Install the Scala IDE first, help-->eclipse Marketplace---> Enter scala--and install.2, select the following 4 need to install3, then install down, until the installation is complete.Second, in addition to installing the
01. Introduction and installation of Scala 1.1 Scala introductionScala is the Java language scripting, the feature is that the Java language is not scripted to use the script, so that it has a simple script language, WYSIWYG features, and high programming efficiency, fast implementation and other characteristics. In the big Data world, the famous frameworks for Spark and Kafka are written in the
Functional Object
Advantages and disadvantages of immutable object
Adv 1. Immutable objects are more likely to be inferred because they do not change values over time.
Adv 2. immutable objects can be automatically transmitted without changes. To transfer a mutable object, you must first back up the mutable object to prevent modification to the object state in other processes.
Adv 3. The thread cannot change the state of an immutable object (corruption, corruption). It is destined to be thread-sa
1.scala InterpreterThe installation process is similar to a JDK installation, you need to install the JDK first, and then download and install Scala to configure the PATH environment variable.2. Run cmd in the win environment using WIN+R, bring up the command window, execute the callout command①scala Support TAB Command Auto-completion②
As we all know, Scala is a functional programming language of the Geek type, and the features supported include:
The function has a "class citizen" status;
Support for anonymous functions (volume of function numbers)
Supports higher order functions
Support closures
Partial application functions
Currying
The first point to note is that there are two forms of methods and function objects in
(transformation) and the Action (action). The main difference between the two types of functions is that transformation accepts the RDD and returns the RDD, while the action accepts the RDD to return the non-rdd.The transformation operation is deferred, meaning that a conversion operation that generates another RDD from an RDD is not performed immediately, and the operation is actually triggered when there is an action action.The action operator triggers spark to submit job jobs and outputs the
Avoid null useMost languages have a special keyword or object that represents an object that refers to a "none", in Java, which is null. In Java, null is a keyword, not an object, so it is illegal to call any method on it. But this is a confusing choice for language designers. Why do you want to return a keyword when the programmer wants to return an object?The option type of ScalaIn order for everything to be more consistent with the object's goal, and to follow the habit of functional programm
Reprinted from Fineqtbull http://fineqtbull.iteye.com/blog/477994One of the JE Students came to me and asked me about the Scala type parameter covariance, inversion, type upper bound and type of the lower bound of the use of methods and principles, although I have just learned, in the main investigation of the "programing in Scala" Chapter 19, try to do a summary below. If there are errors, please correct t
This article describes how to implement the basic Scala language types.Java basic type
Java data types can be roughly divided into two types: Basic (Primitive) Type and object type. There are eight basic types: Boolean, byte, short, Char, Int, long, float, and double. To integrate the basic types into the OO system, Java provides (Wrapper). Package class in packageJava. LangThere are a total of 8 corresponding to the basic types: Boolean, byte, short,
Built-in control structures built-in control structure 1 if control structure
Scala's if structure is the same as that of Java, and the function is not much different. Scala's saying is that if can return a value
Val filename = If (! Args. isempty) ARGs (0) else "default.txt"
This statement is relatively common, but a VaR is not introduced here, but the Val is used.
Println (filename) is equivalent to println (if (! Args. isempty) ARGs (0) else "default.txt"), which is also an advantage of Val,
Note: The Scala version I used is 2.11.8
First, the Hello World code, as follows:
Object helloscala{
def main (args:array[string]): Unit = {
println ("Hello World ...")}
}
Here is a brief description of some of Scala's knowledge Points: first, Scala data types
Scala's data types include: Byte, Char, short, Int, Long, Float, Double, Boolean
Note: Scala
Actorsystem Jian Masteractor.Akka's actor is a tree-shaped structure that can be used to find actors that are distributed across multiple machines, as well as to inherit some of the configuration to sub-actors.The Masteractor is the receiving and forwarding side of the message.Actorsystem run out to shutdown.650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/73/0C/wKioL1Xy6jLg3na0AAHWtddXN6k639.jpg "title=" Akka_ Practice.png "alt=" Wkiol1xy6jlg3na0aahwtddxn6k639.jpg "/>DT Big Data Dream
Win7 installing Scala 2.111. Download Scala 2.11http://download.csdn.net/download/u014393736/7107595I really download the Scala installation files, in fact, is a compressed package, just need to extract the files can be!You can also download the MSI suffix file on the website to install it.The installation process is as follows:The advantage of downloading the MS
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.