1. Which of the following data sources can be accessed by Spark?
Spark可以访问以下哪些数据源?
Hive
HDFS
Cassandra
All of these
2. With which of the following modes Apache Spark can run?
Apache Spark可以使用以下哪种模式运行?
Yarn
Standalone
Mesos
All of these
- Which of the following is called a driver?
以下哪项称为driver
SparkContext
SparkConf
HiveContext
SparkStreaming
4. You have created a jar file for the word count example written in Java. Which of the following is the correct command to submit a job in Spark? Your jar name is firstprogram.jar and the main class is com.example.WordCount.java, which requires an input file name and output directory as input parameters.
您已经为用Java编写的单词计数示例创建了一个jar文件。以下哪项是在Spark中提交作业的正确命令?您的jar名称是firstprogram.jar,主要类是com.实例字数.java,它需要输入文件名和输出目录作为输入参数。
./spark-submit -class 'com.example.WordCount' -master localhost[4] firstprogram.jar input_file output_file
./spark-submit -class 'com.example.WordCount' -master localhost[4] firstprogram.jar output_file input_file
./spark-submit-master localhost[4] firstprogram.jar input_file output_file -class 'com.example.WordCount'
./spark-submit-master localhost[4] input_file output_file -class 'com.example.WordCount' firstprogram.jar
5. Which of the following is the correct statement regarding RDDs?
以下哪项是关于RDD的正确陈述
RDD是一个不可变的分布式对象集合
An RDD is an immutable distributed collection of objects
RDD可以包含用户定义的类
An RDD can contain user-defined classes
一旦创建了RDD,就不能将其拆分为多个分区
Once an RDD is created, it cannot be split into multiple partitions
A & B
6. Which of the following statement is true about the tail method in Scala?
关于Scala中的tail方法,以下哪项陈述是正确的?
此方法返回一个由除第一个元素以外的所有元素组成的列表。
This method returns a list consisting all elements except the first.
此方法返回列表的第一个元素。
This method returns the first element of a list.
此方法将贴图转换为有限的函数。
This method turns maps to limited functions.
如果列表为空,则此方法返回true,否则返回false。
This method returns true if the list is empty otherwise false.
7. Which of the following is the correct statement regarding importing SparkContext?
以下哪项是关于导入SparkContext的正确陈述
import org.apache.spark.SparkContext
import org.apache.spark.sql.SparkContext
import org.apache.sql.SparkContext
import org.apache.SparkContext
8. Which of the following is the correct statement regarding importing SparkContext?
以下哪项是关于导入SparkContext的正确陈述?
Only one SparkContext may be active per JVM.
Only two SparkContext may be active per JVM.
Only three SparkContext may be active per JVM.
Only four SparkContext may be active per JVM.
- Which of the following operations can cause a shuffle include repartition operations?
以下哪项操作会导致无序排列包括重新分区操作
groupByKey
reduceByKey
cogroup and join
All of these
10.Which of the below methods are used for persisting an RDD into memory?
以下哪种方法用于将RDD持久化到内存中
Persist
Cache
Store
A & B
11.Which of the following can be used to implement counters (as in MapReduce) or sums?
以下哪项可用于实现计数器(如MapReduce)或求和
Accumulators
Broadcast
Shared variables
Non-shared variables
12.Which of the following built-in sources are supported in Spark SQL?
Spark SQL支持以下哪些内置源
JSON
Parquet
JDBC
All of these
13.Which of the following clustering algorithms are supported in Spark?
Spark支持以下哪种聚类算法
K-means
Gaussian mixture
Power iteration clustering
All of these
14. Which of the following statement is true about the saveAsObjectFile method?
关于saveAsObjectFile方法,以下哪项陈述是正确的
Saves a DStream's contents as a SequenceFile of serialized Java objects
Saves a DStream's contents as a text files
Saves a DStream's contents as an Avro file in Hadoop
Applies a function, func, to each RDD generated from the stream
15. Which of the following Machine Learning API is built over RDDs?
以下哪种机器学习API是基于RDD构建的
spark.mllib
spark.ml
Both A and B
Clustering algorithm
- Which of the following can transform one DataFrame into another DataFrame?
以下哪项可以将一个数据帧转换为另一个数据帧
DataFrame
Estimator
Transformer
Modify
17. Machine Learning can be applied to which of the following data types?
机器学习可以应用于以下哪种数据类型
Images
Vectors
Text
All of these
18. Which of the following complex data types are supported by DataFrames and Spark SQL?
DataFrames和Spark SQL支持以下哪种复杂数据类型
窗体顶端
ArrayType
StructType
MapType
All of these
19. Which of the following Hive features are not yet supported by Spark?
Spark尚不支持以下哪些配置单元功能
Index
View
Partition
Both view and partition
窗体底端
20. Which of the following mode(s) is/are supported by Spark SQL for converting existing RDDs into DataFrames?
Spark SQL支持以下哪种模式将现有RDD转换为数据帧
Reflection to infer the schema of an RDD that contains specific types of objects
A programmatic interface that allows you to construct a schema and then apply it to an existing RDD
Both A and B
By calling convertToFrame on RDDS
窗体底端
- Which of the following statement is true about 'SaveMode.Ignore' in Spark SQL?
关于“SaveMode”,以下哪项陈述是正确的。Spark SQL中的“忽略”
将数据帧保存到数据源时,如果数据已经存在,则会引发异常。
When saving a DataFrame to a data source, if data already exists, an exception is expected to be thrown.
将数据帧保存到数据源时,如果数据/表已经存在,则数据帧的内容将附加到现有数据中。
When saving a DataFrame to a data source, if data/table already exists, contents of the DataFrame are expected to be appended to existing data.
如果数据已经存在,则保存操作预计不会保存数据框的内容,也不会更改现有数据。
If data already exists, the save operation is expected to not save the contents of the DataFrame and to not change the existing data.
如果数据/表格已经存在,则现有数据将被数据框的内容覆盖
If data/table already exists, the existing data is expected to be overwritten by the contents of the DataFrame.
窗体底端
22. Which of the following in Spark ML helps running a sequence of algorithms to process and learn from data?
Spark ML中的以下哪项有助于运行一系列算法来处理和学习数据
窗体顶端
Estimator
Pipeline
Transformer
DataFrame
23. Which of the following class is used for model selection in the Spark.ml library?
以下哪一类用于Spark中的型号选择Spark.ml library
CrossValidator
ParamGridBuilder
Estimator
Tokenizer
24. Which among following is a collaborative filtering technique?
以下是一种协同过滤技术
Gaussian mixture
Latent Dirichlet Allocation (LDA)
Alternating Least Squares (ALS)
Power Iteration Clustering (PIC)
窗体底端
25. Which of the following are classification and regression techniques?
以下哪项是分类和回归技术
Naive bayes
Decision tree
Linear models
All of these



