Skip to content

Commit

Permalink
remove jackson-core and other libs
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhmaurya committed Nov 25, 2024
1 parent 10c1466 commit 66febdf
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 125 deletions.
28 changes: 1 addition & 27 deletions libs/arrow-spi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ dependencies {

runtimeOnly "com.google.flatbuffers:flatbuffers-java:${versions.flatbuffers}"
implementation "org.slf4j:slf4j-api:${versions.slf4j}"
implementation "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
implementation "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${versions.jackson}"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${versions.jackson}"
runtimeOnly "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
api "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"

implementation "commons-codec:commons-codec:${versions.commonscodec}"
Expand All @@ -45,29 +42,6 @@ tasks.named('thirdPartyAudit').configure {
'org.slf4j.impl.StaticLoggerBinder',
'org.slf4j.impl.StaticMDCBinder',
'org.slf4j.impl.StaticMarkerBinder',
// SnakeYAML classes
'org.yaml.snakeyaml.DumperOptions',
'org.yaml.snakeyaml.DumperOptions$FlowStyle',
'org.yaml.snakeyaml.DumperOptions$LineBreak',
'org.yaml.snakeyaml.DumperOptions$ScalarStyle',
'org.yaml.snakeyaml.DumperOptions$Version',
'org.yaml.snakeyaml.LoaderOptions',
'org.yaml.snakeyaml.emitter.Emitter',
'org.yaml.snakeyaml.error.Mark',
'org.yaml.snakeyaml.error.MarkedYAMLException',
'org.yaml.snakeyaml.error.YAMLException',
'org.yaml.snakeyaml.events.AliasEvent',
'org.yaml.snakeyaml.events.CollectionStartEvent',
'org.yaml.snakeyaml.events.Event',
'org.yaml.snakeyaml.events.Event$ID',
'org.yaml.snakeyaml.events.ImplicitTuple',
'org.yaml.snakeyaml.events.MappingStartEvent',
'org.yaml.snakeyaml.events.NodeEvent',
'org.yaml.snakeyaml.events.ScalarEvent',
'org.yaml.snakeyaml.nodes.NodeId',
'org.yaml.snakeyaml.nodes.Tag',
'org.yaml.snakeyaml.parser.ParserImpl',
'org.yaml.snakeyaml.resolver.Resolver',

// Reactor BlockHound
'reactor.blockhound.BlockHound$Builder',
Expand Down
1 change: 0 additions & 1 deletion libs/arrow-spi/licenses/jackson-core-2.17.2.jar.sha1

This file was deleted.

8 changes: 0 additions & 8 deletions libs/arrow-spi/licenses/jackson-core-LICENSE

This file was deleted.

20 changes: 0 additions & 20 deletions libs/arrow-spi/licenses/jackson-core-NOTICE

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions libs/arrow-spi/licenses/jackson-dataformat-yaml-LICENSE.txt

This file was deleted.

21 changes: 0 additions & 21 deletions libs/arrow-spi/licenses/jackson-dataformat-yaml-NOTICE.txt

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions libs/arrow-spi/licenses/jackson-datatype-jsr310-LICENSE.txt

This file was deleted.

17 changes: 0 additions & 17 deletions libs/arrow-spi/licenses/jackson-datatype-jsr310-NOTICE.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
import io.netty.handler.ssl.SslContextBuilder;
import io.netty.handler.ssl.util.InsecureTrustManagerFactory;

// TODO - add comment
/** Client for Flight services. */
public class OpenSearchFlightClient implements AutoCloseable {
private static final int PENDING_REQUESTS = 5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
import io.netty.handler.ssl.SslContext;
import io.netty.handler.ssl.SslContextBuilder;

// TODO - add comment
public class OpenSearchFlightServer implements AutoCloseable {
private static final Logger logger = LogManager.getLogger(OpenSearchFlightServer.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void getStream(CallContext context, Ticket ticket, ServerStreamListener l
throw e;
} finally {
listener.completed();
streamManager.removeStreamProvider(streamTicket);
streamManager.removeStreamProducer(streamTicket);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ public StreamProducerHolder getStreamProducer(StreamTicket ticket) {
}

/**
* Removes the stream associated with the given StreamTicket.
* Removes the StreamProducer with the given StreamTicket.
*
* @param ticket The StreamTicket of the stream to remove.
* @param ticket The StreamTicket against StreamProducer to remove.
*/
public void removeStreamProvider(StreamTicket ticket) {
public void removeStreamProducer(StreamTicket ticket) {
streamProducers.invalidate(ticket.getTicketID());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public void testGetStream_SuccessfulFlow() throws Exception {
assertEquals(3, listener.getPutNextCount());
assertEquals(3, flushCount.get());

verify(streamManager).removeStreamProvider(any(FlightStreamTicket.class));
verify(streamManager).removeStreamProducer(any(FlightStreamTicket.class));
verify(root).close();
}

Expand Down Expand Up @@ -224,7 +224,7 @@ public void testGetStream_WithSlowClient() throws Exception {
assertEquals(5, listener.getPutNextCount());
assertEquals(5, flushCount.get());

verify(streamManager).removeStreamProvider(any(FlightStreamTicket.class));
verify(streamManager).removeStreamProducer(any(FlightStreamTicket.class));
verify(root).close();
}

Expand Down Expand Up @@ -268,7 +268,7 @@ public void testGetStream_WithSlowClientTimeout() throws Exception {
assertEquals(0, listener.getPutNextCount());
assertEquals(0, flushCount.get());

verify(streamManager).removeStreamProvider(any(FlightStreamTicket.class));
verify(streamManager).removeStreamProducer(any(FlightStreamTicket.class));
verify(root).close();
}

Expand Down Expand Up @@ -311,7 +311,7 @@ public void testGetStream_WithClientCancel() throws Exception {
assertEquals(4, listener.getPutNextCount());
assertEquals(4, flushCount.get());

verify(streamManager).removeStreamProvider(any(FlightStreamTicket.class));
verify(streamManager).removeStreamProducer(any(FlightStreamTicket.class));
verify(root).close();
}

Expand Down Expand Up @@ -350,7 +350,7 @@ public void testGetStream_WithUnresponsiveClient() throws Exception {
assertEquals(0, listener.getPutNextCount());
assertEquals(0, flushCount.get());

verify(streamManager).removeStreamProvider(any(FlightStreamTicket.class));
verify(streamManager).removeStreamProducer(any(FlightStreamTicket.class));
verify(root).close();
}

Expand Down Expand Up @@ -389,7 +389,7 @@ public void testGetStream_WithServerBackpressure() throws Exception {
assertEquals(5, listener.getPutNextCount());
assertEquals(5, flushCount.get());

verify(streamManager).removeStreamProvider(any(FlightStreamTicket.class));
verify(streamManager).removeStreamProducer(any(FlightStreamTicket.class));
verify(root).close();
}

Expand Down Expand Up @@ -431,7 +431,7 @@ public void testGetStream_WithServerError() throws Exception {
assertEquals(4, listener.getPutNextCount());
assertEquals(4, flushCount.get());

verify(streamManager).removeStreamProvider(any(FlightStreamTicket.class));
verify(streamManager).removeStreamProducer(any(FlightStreamTicket.class));
verify(root).close();
}

Expand All @@ -447,7 +447,7 @@ public void testGetStream_StreamNotFound() throws Exception {
assertTrue(listener.getError().getMessage().contains("Stream not found"));
assertEquals(0, listener.getPutNextCount());

verify(streamManager).removeStreamProvider(any(FlightStreamTicket.class));
verify(streamManager).removeStreamProducer(any(FlightStreamTicket.class));
}

public void testProxyStreamProviderCreationWithDifferentNodeIDs() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ grant {

// needed by vendored Guice
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.vm.annotation";

// checked by scripting engines, and before hacks and other issues in
// third party code, to safeguard these against unprivileged code like scripts.
permission org.opensearch.SpecialPermission;
Expand Down

0 comments on commit 66febdf

Please sign in to comment.