service: aws-java-maven # NOTE: update this with your service name
provider:
name: aws
runtime: java8
package:
-
Its a pain to log events with a lambda, given that there is no server to run the agents (splunk, filebeat, etc.) on. Here is a quick and easy way to set up ELK logging by writing directly to logstash via TCP.
-
Make sure the lambda is running in the right Subnet and has the right Security Group to be able to talk to Logstash server:port.
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>4.11</version>
This file contains hidden or 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
FROM java:8-jdk | |
WORKDIR /tmp | |
RUN wget http://archive.apache.org/dist/lucene/solr/6.5.1/solr-6.5.1.tgz | |
RUN tar xvfz solr-6.5.1.tgz | |
EXPOSE 8983 | |
CMD /tmp/solr-6.5.1/bin/solr start -force -f | |
# docker build . | |
# Note the image ID | |
# docker run -p8983:8983 <imageid> | |
# point the browser to localhost:8983 for solr console |
This file contains hidden or 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"?> | |
<!-- Solr managed schema - automatically generated - DO NOT EDIT --> | |
<schema name="nutch" version="1.5"> | |
<uniqueKey>id</uniqueKey> | |
<defaultSearchField>text</defaultSearchField> | |
<solrQueryParser defaultOperator="OR"/> | |
<fieldType name="binary" class="solr.BinaryField"/> | |
<fieldType name="date" class="solr.TrieDateField" omitNorms="true" positionIncrementGap="0" precisionStep="0"/> | |
<fieldType name="double" class="solr.TrieDoubleField" omitNorms="true" positionIncrementGap="0" precisionStep="0"/> | |
<fieldType name="float" class="solr.TrieFloatField" omitNorms="true" positionIncrementGap="0" precisionStep="0"/> |
This file contains hidden or 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" ?> | |
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor | |
license agreements. See the NOTICE file distributed with this work for additional | |
information regarding copyright ownership. The ASF licenses this file to | |
You under the Apache License, Version 2.0 (the "License"); you may not use | |
this file except in compliance with the License. You may obtain a copy of | |
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required | |
by applicable law or agreed to in writing, software distributed under the | |
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS |
This file contains hidden or 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
############################ | |
# MongoDBStore properties # | |
############################ | |
gora.datastore.default=org.apache.gora.mongodb.store.MongoStore | |
gora.mongodb.override_hadoop_configuration=false | |
gora.mongodb.mapping.file=/gora-mongodb-mapping.xml | |
gora.mongodb.servers=localhost:27017 | |
gora.mongodb.db=nutchdb |
This file contains hidden or 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-stylesheet type="text/xsl" href="configuration.xsl"?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
This file contains hidden or 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.marqeta.mqpay; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class Main { | |
public static void main(String[] args) { | |
System.out.println("via Reflection took " + instantiateViaReflection() + " milliseconds"); | |
System.out.println("via New took " + instantiateAsNew() + " milliseconds"); |
This file contains hidden or 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
FROM ubuntu:latest | |
RUN apt-get -y update && apt-get -y upgrade | |
RUN apt-get -y install openjdk-8-jdk wget | |
RUN mkdir /usr/local/tomcat | |
RUN wget http://www-us.apache.org/dist/tomcat/tomcat-8/v8.5.16/bin/apache-tomcat-8.5.16.tar.gz -O /tmp/tomcat.tar.gz | |
RUN cd /tmp && tar xvfz tomcat.tar.gz | |
RUN cp -Rv /tmp/apache-tomcat-8.5.16/* /usr/local/tomcat/ | |
EXPOSE 8080 | |
CMD /usr/local/tomcat/bin/catalina.sh run |
This file contains hidden or 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'?> | |
<project> | |
<actions/> | |
<description></description> | |
<keepDependencies>false</keepDependencies> | |
<properties> | |
<hudson.model.ParametersDefinitionProperty> | |
<parameterDefinitions> | |
<hudson.model.StringParameterDefinition> | |
<name>Build</name> |