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
import arcpy | |
class Toolbox(object): | |
def __init__(self): | |
self.label = "TSV Toolbox" | |
self.alias = "TSV Toolbox" | |
self.tools = [TSVTool] | |
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
package com.esri; | |
import cascading.flow.Flow; | |
import cascading.flow.FlowConnector; | |
import cascading.flow.hadoop.HadoopFlowConnector; | |
import cascading.operation.aggregator.Count; | |
import cascading.pipe.Each; | |
import cascading.pipe.Every; | |
import cascading.pipe.GroupBy; | |
import cascading.pipe.Pipe; |
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
alter table log4j add if not exists partition (year=2013,month=09,day=16,hour=21) location '/flume/2013/09/16/21'; |
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
agent.sources=avroSource | |
agent.channels=memoryChannel | |
agent.sinks=hbaseSink | |
agent.sources.avroSource.type=avro | |
agent.sources.avroSource.channels=memoryChannel | |
agent.sources.avroSource.bind=0.0.0.0 | |
agent.sources.avroSource.port=61616 | |
agent.sources.avroSource.interceptors=i1 | |
agent.sources.avroSource.interceptors.i1.type=timestamp |
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
create external table if not exists log4j( | |
mm int, | |
ss int, | |
level string, | |
clazz string, | |
message string | |
) partitioned by (year int, month int, day int, hour int) | |
row format delimited | |
fields terminated by '\t' | |
lines terminated by '\n' |
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
agent.sources=s1 | |
agent.channels=c1 | |
agent.sinks=k1 | |
agent.sources.s1.type=avro | |
agent.sources.s1.channels=c1 | |
agent.sources.s1.bind=0.0.0.0 | |
agent.sources.s1.port=51515 | |
agent.sources.s1.interceptors=i1 | |
agent.sources.s1.interceptors.i1.type=timestamp |
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
log4j.appender.flume = org.apache.flume.clients.log4jappender.Log4jAppender | |
log4j.appender.flume.Hostname = localhost.localdomain | |
log4j.appender.flume.Port = ${flume.Port} | |
log4j.appender.flume.UnsafeMode = true | |
log4j.appender.flume.layout = org.apache.log4j.PatternLayout | |
log4j.appender.flume.layout.ConversionPattern = %d{mm}\t%d{ss}\t%p\t%c{1}\t%m |
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
private Logger m_logger = Logger.getLogger(getClass()); | |
@Override | |
public void doFilter( | |
final ServletRequest servletRequest, | |
final ServletResponse servletResponse, | |
final FilterChain filterChain) throws IOException, ServletException | |
{ | |
if (servletRequest instanceof HttpServletRequest) | |
{ |
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
@WebServlet(urlPatterns = "/log/*", loadOnStartup = 1) | |
public class LogServlet extends HttpServlet | |
{ | |
@Override | |
protected void doGet( | |
final HttpServletRequest req, | |
final HttpServletResponse res) throws ServletException, IOException | |
{ | |
/** | |
* Do some logic here to handle web requests |
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/export", method = {RequestMethod.GET, RequestMethod.POST}) | |
public void doExport( | |
@RequestParam("bbox") final String bbox, | |
@RequestParam(value = "size", required = false) final String size, | |
@RequestParam(value = "layerDefs", required = false) final String layerDefs, | |
@RequestParam(value = "transparent", required = false) final String transparent, | |
final HttpServletResponse response | |
) throws IOException |
NewerOlder