Skip to content

Commit

Permalink
Fix security policy
Browse files Browse the repository at this point in the history
Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>
  • Loading branch information
rishabhmaurya committed Feb 10, 2025
1 parent cce6730 commit c87aad5
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 153 deletions.
4 changes: 4 additions & 0 deletions plugins/arrow-flight-rpc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ dependencies {
}
}

tasks.internalClusterTest {
jvmArgs += ["--add-opens", "java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED"]
}

tasks.named('test').configure {
jacoco {
excludes = ['org/apache/arrow/flight/**']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,6 @@ public void close() throws Exception {
grpcExecutor.shutdown();
}

private record ClientHolder(Location location, OSFlightClient flightClient) {
}

/**
* Returns the ID of the local node in the cluster.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

package org.opensearch.arrow.flight.bootstrap;

import org.opensearch.arrow.flight.api.FlightServerInfoAction;
import org.opensearch.arrow.flight.api.NodesFlightInfoAction;
import org.opensearch.arrow.flight.api.TransportNodesFlightInfoAction;
import org.opensearch.arrow.flight.api.flightinfo.FlightServerInfoAction;
import org.opensearch.arrow.flight.api.flightinfo.NodesFlightInfoAction;
import org.opensearch.arrow.flight.api.flightinfo.TransportNodesFlightInfoAction;
import org.opensearch.arrow.spi.StreamManager;
import org.opensearch.cluster.metadata.IndexNameExpressionResolver;
import org.opensearch.cluster.node.DiscoveryNode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ grant codeBase "${codebase.grpc-core}" {
permission java.lang.RuntimePermission "*", "setContextClassLoader";
};

grant codeBase "${codebase.arrow-flight-rpc}" {
grant {
// arrow flight service permissions
permission java.util.PropertyPermission "arrow.allocation.manager.type", "write";
permission java.util.PropertyPermission "arrow.enable_null_check_for_get", "write";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public void testClusterChangedWithNodesChanged() throws Exception {
for (DiscoveryNode node : newState.nodes()) {
assertBusy(
() -> { assertNotNull("Flight client isn't built in time limit", clientManager.getFlightClient(node.getId())); },
2,
5,
TimeUnit.SECONDS
);
}
Expand Down Expand Up @@ -374,17 +374,16 @@ public void testFailedClusterUpdateButSuccessfulDirectRequest() throws Exception

ClusterChangedEvent event = new ClusterChangedEvent("test", newState, ClusterState.EMPTY_STATE);
clientManager.clusterChanged(event);

assertBusy(() -> { assertFalse("first call should be invoked", firstCall.get()); }, 5, TimeUnit.SECONDS);
// Verify that the client can still be created successfully on direct request
clientManager.buildClientAsync(nodeId);
assertBusy(
() -> {
assertNotNull("Flight client should be created successfully on direct request", clientManager.getFlightClient(nodeId));
},
2,
5,
TimeUnit.SECONDS
);
assertFalse("first call should be invoked", firstCall.get());
}

private void validateNodes() {
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit c87aad5

Please sign in to comment.