forked from awslabs/amazon-kinesis-client
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
'Version 1.0.0 of the Amazon Kinesis Client Library'
- Loading branch information
Showing
86 changed files
with
10,086 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
target/ | ||
AwsCredentials.properties |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
Amazon Software License | ||
|
||
This Amazon Software License (“License”) governs your use, reproduction, and distribution of the accompanying software as specified below. | ||
1. Definitions | ||
|
||
“Licensor” means any person or entity that distributes its Work. | ||
|
||
“Software” means the original work of authorship made available under this License. | ||
|
||
“Work” means the Software and any additions to or derivative works of the Software that are made available under this License. | ||
|
||
The terms “reproduce,” “reproduction,” “derivative works,” and “distribution” have the meaning as provided under U.S. copyright law; provided, however, that for the purposes of this License, derivative works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work. | ||
|
||
Works, including the Software, are “made available” under this License by including in or with the Work either (a) a copyright notice referencing the applicability of this License to the Work, or (b) a copy of this License. | ||
2. License Grants | ||
|
||
2.1 Copyright Grant. Subject to the terms and conditions of this License, each Licensor grants to you a perpetual, worldwide, non-exclusive, royalty-free, copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense and distribute its Work and any resulting derivative works in any form. | ||
|
||
2.2 Patent Grant. Subject to the terms and conditions of this License, each Licensor grants to you a perpetual, worldwide, non-exclusive, royalty-free patent license to make, have made, use, sell, offer for sale, import, and otherwise transfer its Work, in whole or in part. The foregoing license applies only to the patent claims licensable by Licensor that would be infringed by Licensor’s Work (or portion thereof) individually and excluding any combinations with any other materials or technology. | ||
3. Limitations | ||
|
||
3.1 Redistribution. You may reproduce or distribute the Work only if (a) you do so under this License, (b) you include a complete copy of this License with your distribution, and (c) you retain without modification any copyright, patent, trademark, or attribution notices that are present in the Work. | ||
|
||
3.2 Derivative Works. You may specify that additional or different terms apply to the use, reproduction, and distribution of your derivative works of the Work (“Your Terms”) only if (a) Your Terms provide that the use limitation in Section 3.3 applies to your derivative works, and (b) you identify the specific derivative works that are subject to Your Terms. Notwithstanding Your Terms, this License (including the redistribution requirements in Section 3.1) will continue to apply to the Work itself. | ||
|
||
3.3 Use Limitation. The Work and any derivative works thereof only may be used or intended for use with the web services, computing platforms or applications provided by Amazon.com, Inc. or its affiliates, including Amazon Web Services, Inc. | ||
|
||
3.4 Patent Claims. If you bring or threaten to bring a patent claim against any Licensor (including any claim, cross-claim or counterclaim in a lawsuit) to enforce any patents that you allege are infringed by any Work, then your rights under this License from such Licensor (including the grants in Sections 2.1 and 2.2) will terminate immediately. | ||
|
||
3.5 Trademarks. This License does not grant any rights to use any Licensor’s or its affiliates’ names, logos, or trademarks, except as necessary to reproduce the notices described in this License. | ||
|
||
3.6 Termination. If you violate any term of this License, then your rights under this License (including the grants in Sections 2.1 and 2.2) will terminate immediately. | ||
4. Disclaimer of Warranty. | ||
|
||
THE WORK IS PROVIDED “AS IS” WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OR CONDITIONS OF M ERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT. YOU BEAR THE RISK OF UNDERTAKING ANY ACTIVITIES UNDER THIS LICENSE. SOME STATES’ CONSUMER LAWS DO NOT ALLOW EXCLUSION OF AN IMPLIED WARRANTY, SO THIS DISCLAIMER MAY NOT APPLY TO YOU. | ||
5. Limitation of Liability. | ||
|
||
EXCEPT AS PROHIBITED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE SHALL ANY LICENSOR BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATED TO THIS LICENSE, THE USE OR INABILITY TO USE THE WORK (INCLUDING BUT NOT LIMITED TO LOSS OF GOODWILL, BUSINESS INTERRUPTION, LOST PROFITS OR DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY OTHER COMM ERCIAL DAMAGES OR LOSSES), EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: Amazon Kinesis Client Library for Java | ||
Bundle-SymbolicName: com.amazonaws.kinesisclientlibrary;singleton:=true | ||
Bundle-Version: 1.0.0 | ||
Bundle-Vendor: Amazon Technologies, Inc | ||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7 | ||
Require-Bundle: org.apache.commons.codec;bundle-version="1.3.0", | ||
org.apache.commons.logging;bundle-version="1.1.1";visibility:=reexport, | ||
com.fasterxml.jackson.core.jackson-databind;bundle-version="2.1.1", | ||
com.fasterxml.jackson.core.jackson-core;bundle-version="2.1.1", | ||
com.fasterxml.jackson.core.jackson-annotations;bundle-version="2.1.1", | ||
org.apache.httpcomponents.httpcore;bundle-version="4.2.0", | ||
org.apache.httpcomponents.httpclient;bundle-version="4.2.0" | ||
com.amazonaws.sdk;bundle-version="1.6.9", | ||
Export-Package: com.amazonaws.services.kinesis, | ||
com.amazonaws.services.kinesis.clientlibrary, | ||
com.amazonaws.services.kinesis.clientlibrary.exceptions, | ||
com.amazonaws.services.kinesis.clientlibrary.exceptions.internal, | ||
com.amazonaws.services.kinesis.clientlibrary.interfaces, | ||
com.amazonaws.services.kinesis.clientlibrary.types, | ||
com.amazonaws.services.kinesis.clientlibrary.proxies, | ||
com.amazonaws.services.kinesis.clientlibrary.lib, | ||
com.amazonaws.services.kinesis.clientlibrary.lib.checkpoint, | ||
com.amazonaws.services.kinesis.clientlibrary.lib.worker, | ||
com.amazonaws.services.kinesis.leases, | ||
com.amazonaws.services.kinesis.leases.exceptions, | ||
com.amazonaws.services.kinesis.leases.impl, | ||
com.amazonaws.services.kinesis.leases.interfaces, | ||
com.amazonaws.services.kinesis.leases.util, | ||
com.amazonaws.services.kinesis.metrics, | ||
com.amazonaws.services.kinesis.metrics.impl, | ||
com.amazonaws.services.kinesis.metrics.interfaces |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
AmazonKinesisClientLibrary | ||
Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,33 @@ | ||
amazon-kinesis-client | ||
===================== | ||
# Amazon Kinesis Client Library for Java | ||
|
||
The **Amazon Kinesis Client Library for Java** enables Java developers to easily consume and process data from [Amazon Kinesis][kinesis]. | ||
|
||
* [Kinesis Product Page][kinesis] | ||
* [Forum][kinesis-forum] | ||
* [Issues][kinesis-client-library-issues] | ||
|
||
## Features | ||
|
||
* Provides an easy-to-use programming model for processing data using Amazon Kinesis | ||
* Helps with scale-out and fault-tolerant processing | ||
|
||
## Getting Started | ||
|
||
1. **Sign up for AWS** — Before you begin, you need an AWS account. For more information about creating an AWS account and retrieving your AWS credentials, see [AWS Account and Credentials][docs-signup] in the AWS SDK for Java Developer Guide. | ||
1. **Sign up for Amazon Kinesis** — Go to the Amazon Kinesis console to sign up for the service and create an Amazon Kinesis stream. For more information, see [Create an Amazon Kinesis Stream][kinesis-guide-create] in the Amazon Kinesis Developer Guide. | ||
1. **Minimum requirements** — To use the Amazon Kinesis Client Library, you'll need **Java 1.7+**. For more information about Amazon Kinesis Client Library requirements, see [Before You Begin][kinesis-guide-begin] in the Amazon Kinesis Developer Guide. | ||
1. **Using the Amazon Kinesis Client Library** — The best way to get familiar with the Amazon Kinesis Client Library is to read [Developing Record Consumer Applications][kinesis-guide-applications] in the Amazon Kinesis Developer Guide. | ||
|
||
## Building from Source | ||
|
||
After you've downloaded the code from GitHub, you can build it using Maven. To disable GPG signing in the build, use this command: `mvn clean install -Dgpg.skip=true` | ||
|
||
[kinesis]: http://aws.amazon.com/kinesis | ||
[kinesis-forum]: http://developer.amazonwebservices.com/connect/forum.jspa?forumID=169 | ||
[kinesis-client-library-issues]: https://github.com/awslabs/amazon-kinesis-client/issues | ||
[docs-signup]: http://docs.aws.amazon.com/AWSSdkDocsJava/latest/DeveloperGuide/java-dg-setup.html | ||
[kinesis-guide]: http://docs.aws.amazon.com/kinesis/latest/dev/introduction.html | ||
[kinesis-guide-begin]: http://docs.aws.amazon.com/kinesis/latest/dev/before-you-begin.html | ||
[kinesis-guide-create]: http://docs.aws.amazon.com/kinesis/latest/dev/step-one-create-stream.html | ||
[kinesis-guide-applications]: http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-record-processor-app.html | ||
|
||
Client library for Amazon Kinesis |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
source.. = src/main/java,\ | ||
src/main/resources | ||
output.. = bin/ | ||
|
||
bin.includes = LICENSE.txt,\ | ||
NOTICE.txt,\ | ||
META-INF/,\ | ||
. | ||
|
||
jre.compilation.profile = JavaSE-1.7 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>amazon-kinesis-client</artifactId> | ||
<packaging>jar</packaging> | ||
<name>Amazon Kinesis Client Library for Java</name> | ||
<version>1.0.0</version> | ||
<description> | ||
|
||
</description> | ||
<url>https://aws.amazon.com/kinesis</url> | ||
|
||
<scm> | ||
<url>https://github.com/awslabs/amazon-kinesis-client.git</url> | ||
</scm> | ||
|
||
<licenses> | ||
<license> | ||
<name>Amazon Software License</name> | ||
<url>https://aws.amazon.com/asl</url> | ||
<distribution>repo</distribution> | ||
</license> | ||
</licenses> | ||
|
||
<properties> | ||
<aws-java-sdk.version>1.6.9.1</aws-java-sdk.version> | ||
<jackson.version>2.1.1</jackson.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-java-sdk</artifactId> | ||
<version>${aws-java-sdk.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-logging</groupId> | ||
<artifactId>commons-logging</artifactId> | ||
<version>1.1.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.httpcomponents</groupId> | ||
<artifactId>httpclient</artifactId> | ||
<version>4.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-codec</groupId> | ||
<artifactId>commons-codec</artifactId> | ||
<version>1.3</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-core</artifactId> | ||
<version>${jackson.version}</version> | ||
<type>jar</type> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
<version>${jackson.version}</version> | ||
<type>jar</type> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-annotations</artifactId> | ||
<version>${jackson.version}</version> | ||
<type>jar</type> | ||
<scope>compile</scope> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<developers> | ||
<developer> | ||
<id>amazonwebservices</id> | ||
<organization>Amazon Web Services</organization> | ||
<organizationUrl>https://aws.amazon.com</organizationUrl> | ||
<roles> | ||
<role>developer</role> | ||
</roles> | ||
</developer> | ||
</developers> | ||
|
||
<build> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>1.7</source> | ||
<target>1.7</target> | ||
<encoding>UTF-8</encoding> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
|
||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-gpg-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>sign-artifacts</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>sign</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
40 changes: 40 additions & 0 deletions
40
...n/java/com/amazonaws/services/kinesis/clientlibrary/exceptions/InvalidStateException.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Amazon Software License (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* A copy of the License is located at | ||
* | ||
* http://aws.amazon.com/asl/ | ||
* | ||
* or in the "license" file accompanying this file. This file is distributed | ||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
package com.amazonaws.services.kinesis.clientlibrary.exceptions; | ||
|
||
/** | ||
* This is thrown when the Amazon Kinesis Client Library encounters issues with its internal state (e.g. DynamoDB table | ||
* is not found). | ||
*/ | ||
public class InvalidStateException extends KinesisClientLibNonRetryableException { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
/** | ||
* @param message provides more details about the cause and potential ways to debug/address. | ||
*/ | ||
public InvalidStateException(String message) { | ||
super(message); | ||
} | ||
|
||
/** | ||
* @param message provides more details about the cause and potential ways to debug/address. | ||
* @param e Cause of the exception | ||
*/ | ||
public InvalidStateException(String message, Exception e) { | ||
super(message, e); | ||
} | ||
|
||
} |
41 changes: 41 additions & 0 deletions
41
...zonaws/services/kinesis/clientlibrary/exceptions/KinesisClientLibDependencyException.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Amazon Software License (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* A copy of the License is located at | ||
* | ||
* http://aws.amazon.com/asl/ | ||
* | ||
* or in the "license" file accompanying this file. This file is distributed | ||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
package com.amazonaws.services.kinesis.clientlibrary.exceptions; | ||
|
||
/** | ||
* This is thrown when the Amazon Kinesis Client Library encounters issues talking to its dependencies | ||
* (e.g. fetching data from Kinesis, DynamoDB table reads/writes, emitting metrics to CloudWatch). | ||
* | ||
*/ | ||
public class KinesisClientLibDependencyException extends KinesisClientLibRetryableException { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
/** | ||
* @param message provides more details about the cause and potential ways to debug/address. | ||
*/ | ||
public KinesisClientLibDependencyException(String message) { | ||
super(message); | ||
} | ||
|
||
/** | ||
* @param message provides more details about the cause and potential ways to debug/address. | ||
* @param e Cause of the exception | ||
*/ | ||
public KinesisClientLibDependencyException(String message, Exception e) { | ||
super(message, e); | ||
} | ||
|
||
} |
45 changes: 45 additions & 0 deletions
45
...va/com/amazonaws/services/kinesis/clientlibrary/exceptions/KinesisClientLibException.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Amazon Software License (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* A copy of the License is located at | ||
* | ||
* http://aws.amazon.com/asl/ | ||
* | ||
* or in the "license" file accompanying this file. This file is distributed | ||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
package com.amazonaws.services.kinesis.clientlibrary.exceptions; | ||
|
||
/** | ||
* Abstract class for exceptions of the Amazon Kinesis Client Library. | ||
* This exception has two subclasses: | ||
* 1. KinesisClientLibNonRetryableException | ||
* 2. KinesisClientLibRetryableException. | ||
*/ | ||
public abstract class KinesisClientLibException extends Exception { | ||
private static final long serialVersionUID = 1L; | ||
|
||
/** | ||
* Constructor. | ||
* | ||
* @param message Message of with details of the exception. | ||
*/ | ||
public KinesisClientLibException(String message) { | ||
super(message); | ||
} | ||
|
||
/** | ||
* Constructor. | ||
* | ||
* @param message Message with details of the exception. | ||
* @param cause Cause. | ||
*/ | ||
public KinesisClientLibException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
} |
Oops, something went wrong.