This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RequestMapping(value = "/rest/services/InfoUSA/MapServer", method = RequestMethod.GET) | |
public void doMapServer( | |
final HttpServletResponse response | |
) throws IOException | |
{ | |
response.setStatus(HttpServletResponse.SC_OK); | |
response.setContentType("application/json"); | |
response.setContentLength(m_byteArrayOutputStream.size()); | |
m_byteArrayOutputStream.writeTo(response.getOutputStream()); | |
response.getOutputStream().flush(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import arcpy | |
arcpy.ImportToolbox("C:/mraad/DataRushToolbox.tbx") | |
arcpy.gp.toolbox = "C:/mraad/DataRushToolbox.tbx"; | |
arcpy.gp.DataRushTool("C:/tmp/workflow.dr", "C:/tmp/workflow.properties", "local", "0") | |
density = "C:/tmp/density2" | |
arcpy.FloatToRaster_conversion("C:/tmp/raster.flt", density) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class App | |
{ | |
public static void main(String[] args) throws IOException | |
{ | |
if (args.length != 4) | |
{ | |
System.err.println("Usage: " + App.class + " workflow.dr workflow.properties num-parallelism local|dr://dr-host:1099"); | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class AppDistance | |
{ | |
public static void main(String[] args) | |
{ | |
final boolean local = args.length == 0; | |
final LogicalGraph graph = LogicalGraphFactory.newLogicalGraph("AppDistance"); | |
final TextRecord schema = SchemaBuilder.define( | |
SchemaBuilder.DOUBLE("LON"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<hdp:job id="mr-job" | |
jar-by-class="com.esri.density.Main" | |
input-path="/user/mraad_admin/infousa" | |
output-path="/user/mraad_admin/raster" | |
mapper="com.esri.density.CellFilterMapper" | |
combiner="com.esri.density.CellReducer" | |
reducer="com.esri.density.CellReducer"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:hdp="http://www.springframework.org/schema/hadoop" | |
xsi:schemaLocation=" | |
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | |
http://www.springframework.org/schema/hadoop http://www.springframework.org/schema/hadoop/spring-hadoop.xsd"> | |
<hdp:configuration id="hadoopConfiguration"> | |
fs.defaultFS=hdfs://10.12.51.70:8020 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:hdp="http://www.springframework.org/schema/hadoop" | |
xsi:schemaLocation=" | |
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | |
http://www.springframework.org/schema/hadoop http://www.springframework.org/schema/hadoop/spring-hadoop.xsd"> | |
<hdp:configuration id="hadoopConfiguration"> | |
fs.defaultFS=hdfs://10.12.51.70:8020 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void reduce( | |
final Text key, | |
final Iterable<DoubleWritable> values, | |
final Context context) throws IOException, InterruptedException | |
{ | |
double sum = 0.0; | |
for (final DoubleWritable doubleWritable : values) | |
{ | |
sum += doubleWritable.get(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void map( | |
final LongWritable key, | |
final Text value, | |
final Context context) throws IOException, InterruptedException | |
{ | |
final String[] tokens = value.toString().split("\t"); | |
if (tokens.length != 4) | |
{ | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function () { | |
'use strict'; | |
var mapServerInfo; | |
document.getElementById('buttonLocate').addEventListener('click', function (e) { | |
e.preventDefault(); | |
var level = $('#inputLevel').val(), | |
row = $('#inputRow').val(), | |
col = $('#inputCol').val(); | |
console.log(level, row, col); | |
/* |
NewerOlder