-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds push-based-ingestion plugin POC
- Loading branch information
Showing
20 changed files
with
1,427 additions
and
0 deletions.
There are no files selected for viewing
237 changes: 237 additions & 0 deletions
237
pinot-plugins/pinot-stream-ingestion/pinot-pulsar/pom.xml.versionsBackup
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,237 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
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 OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
--> | ||
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<artifactId>pinot-stream-ingestion</artifactId> | ||
<groupId>org.apache.pinot</groupId> | ||
<version>1.2.0-SNAPSHOT</version> | ||
<relativePath>..</relativePath> | ||
</parent> | ||
|
||
<artifactId>pinot-pulsar</artifactId> | ||
<name>Pinot Pulsar</name> | ||
<url>https://pinot.apache.org/</url> | ||
|
||
<properties> | ||
<phase.prop>package</phase.prop> | ||
<pinot.root>${basedir}/../../..</pinot.root> | ||
<pulsar.version>2.11.0</pulsar.version> | ||
<jetty-server.version>9.4.51.v20230217</jetty-server.version> | ||
<javax.servlet-api.version>3.1.0</javax.servlet-api.version> | ||
<javax.ws.rs-api.version>2.1</javax.ws.rs-api.version> | ||
<jersey-container-grizzly2-http.version>2.39</jersey-container-grizzly2-http.version> | ||
<simpleclient_common.version>0.16.0</simpleclient_common.version> | ||
<grpc-proto.version>2.29.0</grpc-proto.version> | ||
<grpc-context.version>1.60.1</grpc-context.version> | ||
<bouncycastle.version>1.75</bouncycastle.version> | ||
<caffeine.version>2.6.2</caffeine.version> | ||
<codehaus-annotations.version>1.17</codehaus-annotations.version> | ||
<javax.annotation-api.version>1.2</javax.annotation-api.version> | ||
<commons-collections.version>4.4</commons-collections.version> | ||
<grpc-protobuf-lite.version>1.19.0</grpc-protobuf-lite.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.eclipse.jetty</groupId> | ||
<artifactId>jetty-server</artifactId> | ||
<version>${jetty-server.version}</version> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>javax.servlet-api</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.testcontainers</groupId> | ||
<artifactId>pulsar</artifactId> | ||
<version>1.17.1</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.pulsar</groupId> | ||
<artifactId>pulsar-client-original</artifactId> | ||
<version>${pulsar.version}</version> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>javax.ws.rs</groupId> | ||
<artifactId>javax.ws.rs-api</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>commons-codec</groupId> | ||
<artifactId>commons-codec</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>org.bouncycastle</groupId> | ||
<artifactId>bcpkix-jdk15on</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>org.bouncycastle</groupId> | ||
<artifactId>bcprov-ext-jdk15on</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>org.eclipse.jetty</groupId> | ||
<artifactId>jetty-util</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.pulsar</groupId> | ||
<artifactId>pulsar-client-admin-original</artifactId> | ||
<version>${pulsar.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>javax.servlet-api</artifactId> | ||
<version>${javax.servlet-api.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.ws.rs</groupId> | ||
<artifactId>javax.ws.rs-api</artifactId> | ||
<version>${javax.ws.rs-api.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.glassfish.jersey.containers</groupId> | ||
<artifactId>jersey-container-grizzly2-http</artifactId> | ||
<version>${jersey-container-grizzly2-http.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.glassfish.jersey.core</groupId> | ||
<artifactId>jersey-server</artifactId> | ||
<version>${jersey-container-grizzly2-http.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.glassfish.jersey.containers</groupId> | ||
<artifactId>jersey-container-servlet-core</artifactId> | ||
<version>${jersey-container-grizzly2-http.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.netty</groupId> | ||
<artifactId>netty-resolver</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.prometheus</groupId> | ||
<artifactId>simpleclient_common</artifactId> | ||
<version>${simpleclient_common.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.api.grpc</groupId> | ||
<artifactId>proto-google-common-protos</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.grpc</groupId> | ||
<artifactId>grpc-context</artifactId> | ||
<version>${grpc-context.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-codec</groupId> | ||
<artifactId>commons-codec</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.prometheus</groupId> | ||
<artifactId>simpleclient</artifactId> | ||
<version>${simpleclient_common.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.jetty</groupId> | ||
<artifactId>jetty-servlet</artifactId> | ||
<version>${jetty-server.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.squareup.okio</groupId> | ||
<artifactId>okio</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.prometheus</groupId> | ||
<artifactId>simpleclient_hotspot</artifactId> | ||
<version>${simpleclient_common.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.grpc</groupId> | ||
<artifactId>grpc-protobuf-lite</artifactId> | ||
<version>${grpc-protobuf-lite.version}</version> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>io.grpc</groupId> | ||
<artifactId>grpc-context</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-collections4</artifactId> | ||
<version>${commons-collections.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.annotation</groupId> | ||
<artifactId>javax.annotation-api</artifactId> | ||
<version>${javax.annotation-api.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>animal-sniffer-annotations</artifactId> | ||
<version>${codehaus-annotations.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.github.ben-manes.caffeine</groupId> | ||
<artifactId>caffeine</artifactId> | ||
<version>${caffeine.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.netty</groupId> | ||
<artifactId>netty-codec-socks</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.bouncycastle</groupId> | ||
<artifactId>bcpkix-jdk15to18</artifactId> | ||
<version>${bouncycastle.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.bouncycastle</groupId> | ||
<artifactId>bcprov-ext-jdk15to18</artifactId> | ||
<version>${bouncycastle.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.bouncycastle</groupId> | ||
<artifactId>bcprov-jdk15to18</artifactId> | ||
<version>${bouncycastle.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.pinot</groupId> | ||
<artifactId>pinot-spi</artifactId> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>commons-codec</groupId> | ||
<artifactId>commons-codec</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>commons-logging</groupId> | ||
<artifactId>commons-logging</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
</dependencies> | ||
</project> |
86 changes: 86 additions & 0 deletions
86
pinot-plugins/pinot-stream-ingestion/pinot-push-api/pom.xml
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,86 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
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 OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
--> | ||
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<artifactId>pinot-stream-ingestion</artifactId> | ||
<groupId>org.apache.pinot</groupId> | ||
<version>1.4.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>pinot-push-api</artifactId> | ||
<name>Pinot Pused-Based Ingestion</name> | ||
<url>https://pinot.apache.org/</url> | ||
<properties> | ||
<pinot.root>${basedir}/../../..</pinot.root> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.pinot</groupId> | ||
<artifactId>pinot-avro</artifactId> | ||
</dependency> | ||
<!-- Jersey Libraries --> | ||
<dependency> | ||
<groupId>org.glassfish.jersey.core</groupId> | ||
<artifactId>jersey-server</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.glassfish.jersey.containers</groupId> | ||
<artifactId>jersey-container-grizzly2-http</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.glassfish.jersey.inject</groupId> | ||
<artifactId>jersey-hk2</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.glassfish.jersey.media</groupId> | ||
<artifactId>jersey-media-json-jackson</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
<profiles> | ||
<profile> | ||
<id>build-shaded-jar</id> | ||
<activation> | ||
<property> | ||
<name>skipShade</name> | ||
<value>!true</value> | ||
</property> | ||
</activation> | ||
<properties> | ||
<shade.phase.prop>package</shade.phase.prop> | ||
</properties> | ||
</profile> | ||
<profile> | ||
<id>pinot-fastdev</id> | ||
<properties> | ||
<shade.phase.prop>none</shade.phase.prop> | ||
</properties> | ||
</profile> | ||
</profiles> | ||
</project> |
50 changes: 50 additions & 0 deletions
50
...tion/pinot-push-api/src/main/java/org/apache/pinot/plugin/stream/push/BufferedRecord.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,50 @@ | ||
/** | ||
* 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 OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package org.apache.pinot.plugin.stream.push; | ||
|
||
public class BufferedRecord { | ||
private final byte[] _value; | ||
private final long _arrivalTimestamp; | ||
private volatile long _offset; | ||
|
||
public BufferedRecord(byte[] value) { | ||
_value = value; | ||
_arrivalTimestamp = System.nanoTime(); | ||
} | ||
|
||
void setOffset(long offset) { | ||
_offset = offset; | ||
} | ||
|
||
public byte[] getValue() { | ||
return _value; | ||
} | ||
|
||
public long getArrivalTimestampNanos() { | ||
return _arrivalTimestamp; | ||
} | ||
|
||
public long getOffset() { | ||
return _offset; | ||
} | ||
|
||
public int getValueSize() { | ||
return _value.length; | ||
} | ||
} |
Oops, something went wrong.