Collection of some quiz questions of Hive, my friend does a lot of Hive but also has difficult sentences =)), everyone try it
Q1: in hive when the schema doesn’t match the file content
A. Cannot read file
B. Can only read string data
C. Just throw the error and stop reading the file
D. Returns null data for fields that do not match.
Q2: In hive you can copy
A. Schema has no data
B. Data without schema
C. Both the schema and its data
D. Neither the schema nor its data
Q3: User can transfer configuration information to SerDe using
A. SET SERDEPRPERTIES
B. WITH SERDEPRPERTIES
C. BY SERDEPRPERTIES
D. CONFIG SERDEPRPERTIES
Q4: When the result of the STRING data type is returned by querying the array data type using an index, the result has:
A – without quotes
B – quotation mark
C – apostrophe
D – There is no space
Q5: The performance of the aggregate query is improved by which of the following is correct?
A – hive.map.group
B – hive.map.aggr
C – hive.map.sort
D – hive.map.sum
Q6: Query Create table TABLE_NAME LIKE VIEW_NAME
A – create a table that is a copy of the view
B – not valid
C – only runs if the view has data
D – only runs if the view is in the same directory as the table
Q7 – What is the downside of using too many partitions in the Hive table?
A – It slows down the namenode
B – Waste space is wasted
C – Join quires becomes sluggish
D – Everything
Q8: Can Hive automatically decide to run local mode by setting which of the following parameters in hive-site.xml?
A – hive.exec.mode.local.enable
B – hive.exec.mode.cluster.disable
C – hive.exec.mode.local.first
D – hive.exec.mode.local.auto
Q9: The reverse () function reverses a string passed to it in a Hive query. Here is an example of
A – UDF standard
B – Synthetic UDF
C – UDF creation table
D – Not at all
Q10: The MACRO is created in Hive capable
A – Automatically run multiple functions on the same data set
B – Call another function and operator in HIve
C – Data streaming query
D – Create functions that can be used outside of the Hive
Q11: The default separator in hive to separate elements in STRUCT is
A – ‘ 001’
B – ‘ oo2’
C – ‘ oo3’
D – ‘ oo4’
Q12: The string function CONCAT in Hive can concatenate
A – there are only 2 strings
B – any number of concatenated strings
C – any number of strings
D – only strings of equal length
Q13: Which file controls the logging of commands entered into the CLI?
A – hive-log4j.properties
B – hive-exec-log4j.properties
C – hive-cli-log4j.properties
D – hive-create-log4j.properties
Q14: Hive metadata can be created and edited easily using A – HCatalog
B – HMetamanager
C – Hweblog
D – Hue
Q15: Index can be created
A – on managed boards only
B – on view only
C – Only on external boards
D – on partitioned views only
Q16. Q – The following expression in where clause
RLIKE ‘. * (Chicago | Ontario). * ‘;
give consistent results
A – words that contain both Chicago and Ontario
B – words containing Chicago or Ontario
C – words Ending in Chicago or Ontario
D – words that begin with Chicago or Ontario
Q17: When removing an external table
A – The schema is removed without data loss
B – The data is discarded without the schema removal
C – An error has been reported
D – Both the schema and the data are discarded
Q18: The partitioning of tables in Hive creates a lot
A – subdirectory under the database name
B – subdirectory under the table name
C – file under the databse name
D – files under the table name
Q19: When the Hive query combines 3 tables, how many mapreduce jobs will be initiated?
A – 1
B – 2
C – 3
D – 0
Q20: To select all columns that begin with the word ‘Sell’, the query GROSS_SELL table is
A – select ‘$ Sell *’ from GROSS_SELL
B – select ‘Sell *’ from GROSS_SELL
C – select ‘sell. *’ From GROSS_SELL
D – select ‘sell [*]’ from GROSS_SELL
Answer
Answer Q1: D.
Explanation: Instead of returning an error, Hive returns a null value for the mismatch between the schema and the actual data.
Q2: A
Explanation: Data copying is done by the operating system command, not by the Hive
Q3: B
Explanation: SerDe’s function is used to customize Hive for many file formats
Q4: Answer: A
Explain that STRINGS returns as ARRAYS will contain no quotes.
Q5: B
Interpret SET hive.map.aggr = true;
Q6: A
Q7: Answer: D
Explanation Too many partitions create too many files and too many metadata is stored by namenode.
Q8: Answer: D
Explanation This parameter is used to set the local mode. Q9: Answer: A
The reverse (‘abcd’) explanation yields ‘dcba’. So it is a standard UDF.
Q 10: Answer: B
Explain Macros are created for the purpose of calling other functions
Q11: Answer: B
Explanation The four default delimiters are: n for record delimiters,
001 for field separator
002 for the element separator in ARRAY or STRUCT
003 for the element separator in MAP
Q12: Answer: C
Explanation The CONCAT function accepts any number of arguments
Q13: Answer: A
Explanation This property controls login to the command line Interface. Q14: Answer: A
Interpretation Hcatalog stores metadata information for many Hadoop tools such as Hive and Mapreduce. It can be accessed through the web interface
Q15: Answer: A
Explanation Since external table data is managed by other applications, hive does not create indexes on them.
Q16: Answer: B
Explanation Hive supports java-based regular expressions to query.
Q17: Answer: A
Explanation Since the data is stored externally, Hive only discards the schema.
Q18: Answer: B
Explanation The sections of a table create more subdirectories below it.
Q19: B
Explanation: Hive creates a mapreduce job for the first table pair and the second table pair, along with a common table between both pairs.
Q20: Answer: C
Explanation Hive supports java-based regular expressions to query its metadata.