A List of Apache Spark Books

99 Apache Spark Interview Questions for Professionals by Yogesh Kumar
Advanced Analytics with Spark: Patterns for Learning from Data at Scale by Juliet Hougland, Uri Laserson, Sean Owen, Sandy Ryza and Josh Wills
Apache Spark 2 for Beginners by Rajanarayanan Thottuvaikkatumana
Apache Spark in 24 Hours, Sams Teach Yourself by Jeffrey Aven
Apache Spark for Data Science Cookbook by Padma Priya Chitturi
Apache Spark for Java Developers by Sumit Kumar and Sourav Gulati
Apache Spark Graph Processing by Rindra Ramamonjison
Apache Spark Interview Question &

How Do You Test If a Variable Is a String or a Numeric Data Type in Ruby?

Problem scenario
You want to test if a given variable is a Numeric or String.  These are built-in data types that Ruby has.

What should you do?

Solution
Append “.is_a? Numeric” or “.is_a? String” to variable.  For an example, here is code that explicitly prints out if the data type is a Numeric or String.

var1 = 123
an = var1.is_a?

nixCraft at cyberciti.biz Has a Number of Great Articles

How Do You Configure Two Linux Guest Servers Running on Oracle VirtualBox to Have Network Connectivity with Each Other?

Problem scenario:  On a Windows host you have Oracle VirtualBox.  You want to establish TCP/IP connectivity with the two guest CentOS Linux virtual servers.  When you try to ping one from the other, you get “destination host unreachable.”  The servers have Internet connectivity.  How do you get them to communicate with each other via a networking protocol?

Solution
On each guest server,

How Do You Find the Amount of RAM Your Linux Server Has in GB?

Problem scenario
You want to find the total RAM a Linux server has.  You do not want the number to be in kilobytes.  You want human-readable output.  What do you do?

Solution
Run this command:

free -g | grep Mem | awk ‘{print $2 ” gigabytes of RAM total (sum of in use and available combined)”}’

If the amount of GB is less than 0.5,

How Do You Install PostgreSQL on an EC2 SUSE (AWS Instance of Linux SUSE)?

Problem scenario
You want to install Postgres on Linux SUSE.   This AWS server is in a security group with the ability to get to the Internet.  How do you install PostgreSQL on it?

Solution
1.  Log into the SUSE server with the default ec2-user.  The default user for AWS SUSE instances used to be root.  But now it is ec2-user.

2.  Run these five commands (taken from 

How Do You Write a Backend PHP Script to Query Postgres and Create a Database Name “foobar”?

Problem scenario
You are running Ubuntu Linux, and you want to create a .php script to be ran at the command prompt like this:

php good.php

You want this to open a PosgreSQL connection and issue a DDL command to create a database.  This is not a PHP web page.

Solution
This solution is only slightly more complicated than using PHP to run a basic SQL query in a Postgres database.

​How Can PHP Accept Data from a Form and Assign It to Variables for Future Retrieval?

Problem scenario
You want a web page to request user input.  After the user clicks “Submit” you want the values to be assigned to variables for future usage (e.g., an algorithm could retrieve the values to manipulate them).  How do you use PHP to assign input from a web page to be variables on the back end?

Solution
You need two files.  

How Do You Troubleshoot the PHP Error “role is not permitted to log in” So Your Script Can Log into a Postgres Database?

Problem scenario
You are trying to use a .php script on the back end to connect to your PostgreSQL database.  However, you get an error like this when you try to run it:

‘PHP Warning:  pg_connect(): Unable to connect to PostgreSQL server: FATAL:  role  “funuser” is not permitted to log in in /tmp/d.php on line 7’

How can your .php script log into the Postgres database?

How Do You Troubleshoot a PHP Error “call to undefined function pg_connect()” So Your Script Can Log into a Postgres Database?

Problem scenario
You are trying to use a .php script on the back end to connect to your PostgreSQL database.  However, you get an error like this when you try to run it:  ‘PHP Fatal error:  Call to undefined function pg_connect() in ‘

Solution
Install php5-pgsql.  For Ubuntu you would run a command like this:  sudo apt-get install php5-pgsql