Giter Club home page Giter Club logo

geomesa-twitter's Introduction

GeoMesa Twitter

GeoMesa Twitter provides three example projects to collect, ingest, and analyze Twitter data in GeoMesa.

Getting Started

You'll first need to clone and build the GeoMesa 1.0.0-SNAPSHOT from LocationTech GeoMesa Github.

Checkout, build, and install GeoMesa with maven:

git clone [email protected]:locationtech/geomesa.git
cd geomesa
mvn clean install

Next clone geomesa-twitter and build geomesa-twitter:

git clone [email protected]:geomesa/geomesa-twitter.git
cd geomesa-twitter
mvn clean install

Collected Twitter Data

Sign up for twitter and get developer keys...more info coming soon

Ingesting Twitter into GeoMesa

Run the ingest jar to see a list of arguments for ingest:

$> java -jar twitter-ingest/target/twitter-ingest-accumulo1.5-1.0-SNAPSHOT.jar 
0 [main] INFO geomesa.example.twitter.ingest.Runner  - Error parsing arguments: The following options are required: --instanceId, -i --zookeepers, -z --tableName, -t --password, -p --user, -u --featureName, -f 
Usage: <main class> [options] files
  Options:
  * --featureName, -f
       featureName to assign to the data
        --indexSchemaFormat
       Schema for indexing data
  * --instanceId, -i
       Name of the Accumulo Instance
  * --password, -p
       Accumulo password
    --shards, -s
       number of shards to use for data
  * --tableName, -t
       Accumulo table name
        --useExtendedFeatures
       parse extended features or the minimal set
  * --user, -u
       Accumulo user name
  * --zookeepers, -z
       Comma separated list of zookeepers

After collecting some twitter data, you can ingest files which have one tweet as JSON per line:

java -jar twitter-ingest/target/twitter-ingest-accumulo1.5-1.0-SNAPSHOT.jar -u user -p password -z zoo1,zoo2,zoo3 -t geomesa_catalog -i my instance -f twitter tweet_file1.json tweet_file2.json tweet_file3.json

Running the Spark Job

After setting up spark on your cluster, copy the shade jar over and run it:

/opt/spark/bin/spark-submit --master yarn-client --num-executors 40 --executor-cores 4 twitter-spark-accumulo1.5-1.0-SNAPSHOT.jar  --deploy-mode client --class geomesa.example.twitter.spark.Runner twitter

geomesa-twitter's People

Contributors

jahhulbert-ccri avatar elahrvivaz avatar andrewannex avatar jnh5y avatar

Watchers

shoufengwei avatar

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.