Member since
08-05-2016
7
Posts
9
Kudos Received
0
Solutions
08-06-2016
06:06 PM
6 Kudos
@sivakumar sudhakarannair girijakumari ESRI spatial framework for Hadoop could use to store geometry data as text or as json. For example, you can store the following MULTIPOLYGON data as text (string in Hive, for example) 'MULTIPOLYGON (((-158.91661716771827 10.33741051185143, -67.59825779273768 10.33741051185143,-67.59825779273768 53.55389082595917, -158.91661716771827 53.55389082595917, -158.91661716771827 10.33741051185143)))' If you wish to apply one of operations supported by ESRI framework for Hive, e.g. ST_Intersects, you need first to convert text to geometry using ST_GeomFromText function. Most of the ESRI spatial functions would require you to convert text to geometry first. ESRI spatial framework for Hive supports also json. The approach is similar. You need to convert json to geometry before applying a function like ST_Intersects. More details about JSON format here: https://github.com/Esri/spatial-framework-for-hadoop/wiki/JSON-Formats
... View more
08-06-2016
06:16 PM
5 Kudos
@sivakumar sudhakarannair girijakumari If you wish to use a function only during the active session, use temporary keyword in its creation statement. Examples: create temporary function ST_AsText as 'com.esri.hadoop.hive.ST_AsText'; create temporary function ST_Intersects as 'com.esri.hadoop.hive.ST_Intersects'; This is not specific for ESRI spatial functions. It works similarly for any user defined function (UDF) when invoked in Hive.
... View more
08-06-2016
06:21 PM
4 Kudos
@sivakumar sudhakarannair girijakumari If you want the function to be available globally, across multiple sessions, you need to create a permanent function,e.g. create function ST_AsText as 'com.esri.hadoop.hive.ST_AsText'; You should issue "create function" statements via a global script. Assuming that you modified a function, in order to recreate it, you would need first to drop it. This script should be executed as part of Hive service start/restart such that functions will still be available. drop function ST_AsText as 'com.esri.hadoop.hive.ST_AsText';
... View more
08-06-2016
06:45 PM
5 Kudos
@sivakumar sudhakarannair girijakumari Step 1: Build geometry-api (this is a pre-requisite for the spatial framework for hadoop)
clone this repository: https://github.com/Esri/geometry-api-java edit pom.xml to use Java 1.8, Hive 1.2 and Hadoop 2.7 save pom.xml and build with mvn Step 2: build spatial framework for hadoop
clone this repository https://github.com/Esri/spatial-framework-for-hadoop edit pom.xml to use Java 1.8, Hive 1.2 and Hadoop 2.7 save pom.xml and build with mvn Build with ant is also supported, see build.xml. Some changes are necessary.
... View more
08-11-2016
02:18 AM
4 Kudos
@sivakumar sudhakarannair girijakumari Yes. Hive supports parallel transactions. Your error could be generated by a global setting override at session level. If your global tez.grouping_min-size is not low enough to allow you to set your session tez.grouping.max-size to a value higher than the global tez.grouping.min-size, you may want to change the global tez.grouping.min-size to a lower value to satisfy the condition. This seems to be similar to: https://community.hortonworks.com/questions/50008/while-executing-a-select-sql-on-hive-we-are-seeing.html#comment-50558 Let me know if this is different.
... View more