Giter Site home page Giter Site logo

simplesparkapp's Introduction

Simple Spark Application

A simple Spark application that counts the occurrence of each word in a corpus and then counts the occurrence of each character in the most popular words. Includes the same program implemented in Java and Scala.

To make a jar:

mvn package

To run from a gateway node in a CDH5 cluster:

spark-submit --class com.cloudera.sparkwordcount.SparkWordCount --master local \
  target/sparkwordcount-0.0.1-SNAPSHOT.jar <input file> 2

This will run the application in a single local process. If the cluster is running a Spark standalone cluster manager, you can replace "--master local" with "--master spark://<master host>:<master port>".

If the cluster is running YARN, you can replace "--master local" with "--master yarn".

simplesparkapp's People

Contributors

bingyupj avatar srowen avatar sryza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simplesparkapp's Issues

How to run java main and scala main

From where i need to run this command
spark-submit --class com.cloudera.sparkwordcount.SparkWordCount --master local
target/sparkwordcount-0.0.1-SNAPSHOT.jar 2

Do I able to ran java example also with above command?

Maven build fails with unresolved dependencies

I attempted to run the maven build on a clean clone of the repo, and got the following error. It's possible that there is an issue with my maven configuration, as I am not an expert user.

[ERROR] Failed to execute goal on project sparkwordcount: Could not resolve dependencies for project com.cloudera.sparkwordcount:sparkwordcount:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at org.apache.spark:spark-core_2.10:jar:1.0.0-cdh5.1.0 -> org.eclipse.jetty:jetty-plus:jar:8.1.14.v20131031: Failed to read artifact descriptor for org.eclipse.jetty:jetty-plus:jar:8.1.14.v20131031: Could not find artifact org.eclipse.jetty:jetty-parent:pom:20 in scala-tools.org (http://scala-tools.org/repo-releases) -> [Help 1]
[ERROR] 

problem on cdh5.3.1

Hi,

Could you please help me in making this example work on 2.5.0-cdh5.3.1, i tried using different cloudera repo and dependency in the pom.xml but i m getting all the time:

Exception in thread "main" java.io.IOException: No FileSystem for scheme: dfs

regards,
Dalibor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.