Skip to content

Commit

Permalink
GEOMESA-2165 Tutorial refactoring, standardization (#58)
Browse files Browse the repository at this point in the history
* Updated version to 2.0.0
* Updated namespace to org.geomesa.example
* Standardized quick start logic into common module
* Standardized feature types into common module
* Replaced READMEs with links to GeoMesa docs
* Verified all quickstarts against GeoMesa 2.0.0-SNAPSHOT
  (f54e31e2eeb10969adb55d03d4fc8268253033a5 with HBase ZK parameter)

Signed-off-by: Emilio Lahr-Vivaz <elahrvivaz@ccri.com>
  • Loading branch information
elahrvivaz committed Feb 13, 2018
1 parent e9d778e commit d47776c
Show file tree
Hide file tree
Showing 49 changed files with 6,068 additions and 4,871 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
GeoMesa Tutorials and Examples
==============================

See the official GeoMesa [documentation](http://www.geomesa.org/documentation/tutorials/index.html) for instructions.
633 changes: 4 additions & 629 deletions geomesa-examples-authorizations/README.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions geomesa-examples-authorizations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.example.geomesa</groupId>
<groupId>org.geomesa.example</groupId>
<artifactId>geomesa-tutorials</artifactId>
<version>1.4.0.0-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>geomesa-examples-authorizations</artifactId>
Expand Down Expand Up @@ -52,8 +52,8 @@
<version>3.1.0.RELEASE</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<groupId>com.beust</groupId>
<artifactId>jcommander</artifactId>
</dependency>
<dependency>
<groupId>log4j</groupId>
Expand Down
53 changes: 2 additions & 51 deletions geomesa-examples-avro/README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,5 @@
GeoMesa Avro Binary Format Example
==================================

This example shows Java code for creating a `SimpleFeatureCollection`, serializing
and immediately deserializing to and from the Avro format.

Prerequisites
-------------

None.

Download and Build the Tutorial
-------------------------------

Pick a reasonable directory on your machine, and run:

```bash
$ git clone https://github.com/geomesa/geomesa-tutorials.git
$ cd geomesa-tutorials
```

> :warning: Note: You may need to download a particular release of the tutorials project
> to target a particular GeoMesa release.
To build, run

```bash
$ mvn clean install -pl geomesa-examples-avro
```

Run the Tutorial
----------------

On the command-line, run:

```bash
$ java -cp geomesa-examples-avro/target/geomesa-examples-avro-$VERSION.jar com.example.geomesa.avro.AvroExample
```

The code will print out the 10 arbitrary SimpleFeatures which were created and then serialized / deserialized. Example output follows.

Creating 10 features.
Writing features to Avro binary format.
Reading features from Avro binary format.
1. Addams|0|Tue Sep 02 09:28:00 EDT 2014|POINT (-76.0577293170671 -37.615979973322965)|null
2. Bierce|1|Thu Apr 17 06:10:54 EDT 2014|POINT (-77.48469253216224 -38.87427143505418)|null
3. Clemens|2|Wed Jul 16 04:25:53 EDT 2014|POINT (-77.23040004571872 -37.8682338758089)|null
4. Addams|3|Fri Jan 03 02:06:31 EST 2014|POINT (-77.77384710048051 -37.79568311691846)|null
5. Bierce|4|Fri Jun 13 10:42:56 EDT 2014|POINT (-76.36255550435658 -38.115857985800844)|null
6. Clemens|5|Wed May 28 08:31:41 EDT 2014|POINT (-76.10591453732893 -38.85666776208012)|null
7. Addams|6|Thu Dec 18 06:31:37 EST 2014|POINT (-76.40849622595168 -38.268406683218565)|null
8. Bierce|7|Wed Oct 15 14:52:04 EDT 2014|POINT (-76.11437368081457 -37.10612535467402)|null
9. Clemens|8|Tue Feb 04 04:46:52 EST 2014|POINT (-77.26323925805912 -38.7179185982736)|null
10. Addams|9|Mon May 26 21:02:15 EDT 2014|POINT (-77.86991721689314 -38.958277119863986)|null
See the official GeoMesa [documentation](http://www.geomesa.org/documentation/tutorials/geomesa-examples-avro.html)
for instructions.
15 changes: 4 additions & 11 deletions geomesa-examples-avro/pom.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--********************************************************************
* Copyright (c) 2013-2016 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0 which
* accompanies this distribution and is available at
* http://www.opensource.org/licenses/apache2.0.php.
*********************************************************************-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.example.geomesa</groupId>
<groupId>org.geomesa.example</groupId>
<artifactId>geomesa-tutorials</artifactId>
<version>1.4.0.0-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>geomesa-examples-avro</artifactId>
Expand Down
Loading

0 comments on commit d47776c

Please sign in to comment.