Install GeoAnalytics Engine on Amazon EMR
Amazon EMR is a platform for rapidly processing, analyzing, and applying machine learning (ML) to big data using open-source frameworks. Using the steps outlined below, GeoAnalytics Engine can be leveraged within a PySpark notebook hosted in Amazon EMR.
The table below summarizes the Amazon EMR runtimes supported by each version of GeoAnalytics Engine.
GeoAnalytics Engine | Amazon EMR |
---|---|
1.0.x | 6.1.0-6.6.0 |
1.1.x | 6.1.0-6.9.0 |
1.2.x | 6.1.0-6.11.0 |
To complete this install you will need:
- An active AWS subscription
GeoAnalytics Engine install files. If you have a GeoAnalytics Engine subscription with a username and password, you can download the ArcGIS GeoAnalytics Engine distribution here after signing in. If you have a license file, follow the instructions provided with your license file to download the GeoAnalytics Engine distribution.
A GeoAnalytics Engine subscription, or a license file.
Prepare the workspace
Sign in to the AWS Management Console.
Create a bucket in S3 or choose an existing one to stage setup files in.
Upload the jar and whl files to your S3 bucket.
Copy and paste the text below into a text editor and change the
BUCKET_
variable value to the path of the bucket or folder where you uploaded the jar and wheel. If you copy the bucket path from S3 using Copy S3 URI, make sure to remove thePATH /
character that is added at the end, as your script will break otherwise. ChangeWHEEL_
andNAME JAR_
to the names of the wheel file and jar file respectively. Save the file using ".sh" as the file extension and upload it to your S3 bucket.NAME Use dark colors for code blocks Copy If you are using the supplemental projection data jars, add the line below to the script before uploading the script to S3 and update the file name. Make sure to follow these steps for every projection data jar used.
Use dark colors for code blocks Copy
Create a Spark pool
Navigate to Amazon EMR and click Create cluster.
Under Name and applications choose any supported EMR release for Amazon EMR release. See About Amazon EMR Releases for details on release components. For Application bundle select "Custom" and ensure that at least the following applications are checked:
- Hadoop
- Hive
- Spark
- JupyterHub
- JupyterEnterpriseGateway
Under Cluster configuration, choose your preferred configuration.
Configure the Networking for your cluster.
Under Bootstrap Actions - optional click "Add". For Script location, specify the path to the
.sh
script youuploaded to S3 earlier and click Add bootstrap action.
Under Software settings - optional select "Enter configuration" and copy and paste the text below into the text box.
Use dark colors for code blocks Copy Set the Security configuration and permissions for your cluster.
Accept the defaults for all other parameters in the previous steps or change them based on your needs.
Click Create cluster. If the create fails, check the cluster logs to diagnose the issue.
(Optional) Check cluster status and view logs
If the cluster is created successfully, you should see Running or Waiting next to the cluster name. Under the cluster list in the EMR console, select the down arrow next to the cluster name. You should see the Master and Core codes both show running.
If the cluster didn't create successfully, you should see Terminated with errors next to the cluster name. To check logs related to the errors, click on the cluster from the cluster list in the EMR console, and click on the folder icon next to Log URL under Summary tab , and select the subfoloder with the component that is relevant to the error. For example, if the cluster failed to provision, look for the subfolder called
provision-node
for more details.If cluster terminated with unclear errors, checkout EMR documentation on troubleshooting failed clusters for more tips on triaging cluster creation failures.
Authorize GeoAnalytics Engine
- Create a Workspace in your EMR Studio to run notebook code or open an existing one and attach it to your cluster.
Import the geoanalytics library and authorize it using your username and password or a license file. See Authorization for more information. For example:
Use dark colors for code blocks Copy Try out the API by importing the SQL functions as an easy-to-use alias like
ST
and listing the first 20 functions in a notebook cell:Use dark colors for code blocks Copy
What’s next?
You can now use any SQL function or analysis tool in the geoanalytics
module.
See Data sources and Using DataFrames to learn more about how to access your data from your notebook. Also see Visualize results to get started with viewing your data on a map. For examples of what else is possible with GeoAnalytics Engine, check out the sample notebooks, tutorials, and blog posts.