forked from opensearch-project/data-prepper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-dyn-crashes
Signed-off-by: Chase <[email protected]>
- Loading branch information
Showing
372 changed files
with
11,127 additions
and
3,519 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
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
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
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
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
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
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
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
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
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 |
---|---|---|
|
@@ -19,7 +19,7 @@ jobs: | |
build: | ||
strategy: | ||
matrix: | ||
java: [11, 17] | ||
java: [11, 17, 21] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
|
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
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,9 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
plugins { | ||
id 'java-gradle-plugin' | ||
id 'java' | ||
} |
24 changes: 24 additions & 0 deletions
24
buildSrc/src/main/java/org/opensearch/dataprepper/gradle/end_to_end/DockerProviderTask.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,24 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.dataprepper.gradle.end_to_end; | ||
|
||
import org.gradle.api.DefaultTask; | ||
import org.gradle.api.provider.Property; | ||
import org.gradle.api.tasks.Input; | ||
|
||
/** | ||
* A task which can provide a Docker image to use for an end-to-end test. | ||
*/ | ||
public abstract class DockerProviderTask extends DefaultTask { | ||
/** | ||
* The Docker image with both the name and tag in the standard string | ||
* format - <i>my-image:mytag</i> | ||
* | ||
* @return The Docker image | ||
*/ | ||
@Input | ||
abstract Property<String> getImageId(); | ||
} |
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
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
17 changes: 17 additions & 0 deletions
17
...er-api/src/main/java/org/opensearch/dataprepper/model/acknowledgements/ProgressCheck.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,17 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.dataprepper.model.acknowledgements; | ||
|
||
public interface ProgressCheck { | ||
/** | ||
* Returns the pending ratio | ||
* | ||
* @return returns the ratio of pending to the total acknowledgements | ||
* @since 2.6 | ||
*/ | ||
Double getRatio(); | ||
} | ||
|
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
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
90 changes: 90 additions & 0 deletions
90
data-prepper-api/src/main/java/org/opensearch/dataprepper/model/buffer/DelegatingBuffer.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,90 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.dataprepper.model.buffer; | ||
|
||
import org.opensearch.dataprepper.model.CheckpointState; | ||
import org.opensearch.dataprepper.model.record.Record; | ||
|
||
import java.time.Duration; | ||
import java.util.Collection; | ||
import java.util.Map; | ||
import java.util.Objects; | ||
import java.util.concurrent.TimeoutException; | ||
|
||
/** | ||
* An implementation of {@link Buffer} which delegates all calls to a delgate | ||
* (or inner) buffer. | ||
* <p> | ||
* This class exists to help with writing decorators of the {@link Buffer} interface. | ||
* | ||
* @param <T> The type of data in the buffer | ||
* | ||
* @since 2.6 | ||
*/ | ||
public abstract class DelegatingBuffer<T extends Record<?>> implements Buffer<T> { | ||
private final Buffer<T> delegateBuffer; | ||
|
||
/** | ||
* Constructor for subclasses to use. | ||
* | ||
* @param delegateBuffer The delegate (or inner) buffer. | ||
* | ||
* @since 2.6 | ||
*/ | ||
protected DelegatingBuffer(final Buffer<T> delegateBuffer) { | ||
this.delegateBuffer = Objects.requireNonNull(delegateBuffer); | ||
} | ||
|
||
@Override | ||
public void write(final T record, final int timeoutInMillis) throws TimeoutException { | ||
delegateBuffer.write(record, timeoutInMillis); | ||
} | ||
|
||
@Override | ||
public void writeAll(final Collection<T> records, final int timeoutInMillis) throws Exception { | ||
delegateBuffer.writeAll(records, timeoutInMillis); | ||
} | ||
|
||
@Override | ||
public void writeBytes(final byte[] bytes, final String key, final int timeoutInMillis) throws Exception { | ||
delegateBuffer.writeBytes(bytes, key, timeoutInMillis); | ||
} | ||
|
||
@Override | ||
public Map.Entry<Collection<T>, CheckpointState> read(final int timeoutInMillis) { | ||
return delegateBuffer.read(timeoutInMillis); | ||
} | ||
|
||
@Override | ||
public void checkpoint(final CheckpointState checkpointState) { | ||
delegateBuffer.checkpoint(checkpointState); | ||
} | ||
|
||
@Override | ||
public boolean isEmpty() { | ||
return delegateBuffer.isEmpty(); | ||
} | ||
|
||
@Override | ||
public boolean isByteBuffer() { | ||
return delegateBuffer.isByteBuffer(); | ||
} | ||
|
||
@Override | ||
public Duration getDrainTimeout() { | ||
return delegateBuffer.getDrainTimeout(); | ||
} | ||
|
||
@Override | ||
public boolean isWrittenOffHeapOnly() { | ||
return delegateBuffer.isWrittenOffHeapOnly(); | ||
} | ||
|
||
@Override | ||
public void shutdown() { | ||
delegateBuffer.shutdown(); | ||
} | ||
} |
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
Oops, something went wrong.