Apache Spark MasterClass Chapter 2 – Episode 5
-
Why choose the “Eclipse IDE for Java EE Developers” distribution over the standard Java distribution? Show answer
It bundles additional tooling (web, enterprise, server adapters) that many data and backend projects need. Either distribution works; EE mirrors the screenshots/flow referenced and reduces post-install plugin hunting. You can still add/remove features later via Help → Install New Software…
-
What is an Eclipse workspace, and why might you use multiple workspaces? Show answer
A workspace is the physical folder that stores project files and Eclipse metadata (.metadata). Multiple workspaces isolate unrelated codebases, plugins, and settings (per client or per course). Switch via File → Switch Workspace to keep environments clean.
-
How do you verify Maven installed correctly, and what should you look for in the output? Show answer
Run: mvn -version. Expect Maven version, Java version/vendor, Java home, OS name/arch, and encoding. Mismatches (e.g., unexpected Java) often explain build or plugin errors.
-
Compare installing Maven on macOS (Homebrew) vs. Ubuntu (APT) vs. RHEL/EMR (YUM + repo). Show answer
macOS: brew install maven (kept up to date by Homebrew). Ubuntu: sudo apt install maven (Debian packages). RHEL/EMR: add epel-apache-maven repo → yum install -y apache-maven; ensure Java 1.8 with alternatives.
-
When importing a Maven project into Eclipse, why do you see many downloads, and how can you monitor them? Show answer
Maven resolves dependencies (and plugins) to your local ~/.m2 repository. Eclipse’s progress bar shows background jobs; click it to see details. The first build is the heaviest; subsequent builds reuse cached artifacts.
-
What’s the practical difference between the Java and Git perspectives in Eclipse? Show answer
Java perspective: editing/building/running Java code; views like Package Explorer, Outline, Problems. Git perspective: repository tasks (clone, fetch, pull, push), staging, history, branching. Switching perspectives aligns the UI with the task at hand.
-
How do you ensure mvn uses the intended JDK on Linux, especially on EMR? Show answer
Set system default with alternatives –config java and alternatives –config javac to select Java 1.8. Confirm via mvn -version; check the Java home it reports. If needed, set JAVA_HOME and update PATH in your shell profile.
-
You installed Git on Windows/macOS/Linux. What is one quick command to verify it’s available? Show answer
git –version. It prints the installed Git version and confirms your PATH is configured.
-
What are common PATH-related pitfalls when setting up Maven and Git? Show answer
For manual installs, forgetting to add the bin directory to PATH so mvn or git isn’t found. Having multiple JDKs and PATH/JAVA_HOME pointing to different versions than Eclipse uses. Opening a new terminal after updating PATH so changes take effect.
-
What are the benefits of cloning a repo through Eclipse’s Git perspective instead of command line? Show answer
Built-in wizard guides URI/branch/target directory selection and auto-detects Maven projects. Immediate ‘Import Projects’ flow into the workspace. History, staging, and diffs are available in-IDE without context switching.
-
How would you import an existing Git project into Eclipse if you already cloned it via the command line? Show answer
File → Import… → Maven → Existing Maven Projects (or Existing Projects into Workspace). Select the cloned directory; Eclipse discovers the pom.xml and configures the project.
-
On EMR/RHEL, why might you need to change the $releasever in the Maven repo file and how is it done? Show answer
To align the EPEL repo with the base image version used by EMR so Maven packages resolve. The script uses: sudo sed -i s/\\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
-
What is the fastest way to confirm Eclipse is pointing at the intended JDK/JRE? Show answer
Eclipse → Preferences → Java → Installed JREs; ensure the expected JDK is checked. Also verify Project → Properties → Java Build Path for per-project overrides.
-
If mvn -version reports Java 1.7 but your code needs 1.8+, what concrete steps fix it on EMR? Show answer
Run alternatives –config java and choose the Java 1.8 path. Run alternatives –config javac to switch the compiler to 1.8 as well. Re-run mvn -version to confirm the change.
-
What’s the minimal end-to-end flow to get code building in Eclipse from the chapter repo? Show answer
Install Git + Maven + Eclipse. Clone: git clone https://github.com/jgperrin/net.jgp.books.spark.ch01.git. Eclipse → Git perspective → Import Projects (or File → Import… → Maven → Existing Maven Projects). Wait for dependency downloads; then build/run.

Comments
No comments yet. Be the first!
You must log in to comment.