Skip to content

Commit

Permalink
Fixing xcontent imports (#410)
Browse files Browse the repository at this point in the history
* Fixing xcontent imports

Signed-off-by: Khushboo Rajput <[email protected]>

---------

Signed-off-by: Khushboo Rajput <[email protected]>
  • Loading branch information
khushbr authored Mar 29, 2023
1 parent b03c2ca commit f89e7e8
Show file tree
Hide file tree
Showing 33 changed files with 32 additions and 26 deletions.
1 change: 0 additions & 1 deletion licenses/netty-buffer-4.1.86.Final.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/netty-buffer-4.1.90.Final.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
937eb60c19c5f5c1326b96123c9ec3d33238d4d5
1 change: 0 additions & 1 deletion licenses/netty-codec-4.1.86.Final.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/netty-codec-4.1.90.Final.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9992a22c82e18b8fd4f34989535f3e504e55aa37
1 change: 0 additions & 1 deletion licenses/netty-codec-http-4.1.86.Final.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/netty-codec-http-4.1.90.Final.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
19bbcd46f8ee0d118486f98eff22fe665b9689e5
1 change: 0 additions & 1 deletion licenses/netty-codec-http2-4.1.86.Final.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/netty-codec-http2-4.1.90.Final.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ea3be877ea976b3d71e1a872958d32854b24db66
1 change: 0 additions & 1 deletion licenses/netty-codec-socks-4.1.86.Final.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/netty-codec-socks-4.1.90.Final.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7397535a4e03d2f74c71aa2282eb7a2760ffc37b
1 change: 0 additions & 1 deletion licenses/netty-common-4.1.86.Final.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/netty-common-4.1.90.Final.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
43597a09382c6ae2bef469a9b3a41e8a17850638
1 change: 0 additions & 1 deletion licenses/netty-handler-4.1.86.Final.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/netty-handler-4.1.90.Final.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
64f6946ce4d9189cec5341d3f5f86ac5653099b5
1 change: 0 additions & 1 deletion licenses/netty-handler-proxy-4.1.86.Final.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/netty-handler-proxy-4.1.90.Final.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6ab526a43a14f7796434fa6a705c34201603235f
1 change: 0 additions & 1 deletion licenses/netty-resolver-4.1.86.Final.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/netty-resolver-4.1.90.Final.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
47c415d8c83f08b820ba00e6497a6cf19dd0155f
1 change: 0 additions & 1 deletion licenses/netty-transport-4.1.86.Final.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/netty-transport-4.1.90.Final.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
82d68da212f62b076c763f5efa9b072d2abc018f

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e42282002cf22105e7e993651aead231246d0220
1 change: 0 additions & 1 deletion licenses/performanceanalyzer-rca-2.5.0.0-SNAPSHOT.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/performanceanalyzer-rca-2.7.0.0-SNAPSHOT.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5b6981ded955c77a09b5f241cbbefe68e5663c24
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import org.opensearch.common.settings.SettingsFilter;
import org.opensearch.common.util.PageCacheRecycler;
import org.opensearch.common.util.concurrent.ThreadContext;
import org.opensearch.common.xcontent.NamedXContentRegistry;
import org.opensearch.core.xcontent.NamedXContentRegistry;
import org.opensearch.discovery.Discovery;
import org.opensearch.env.Environment;
import org.opensearch.env.NodeEnvironment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
import org.apache.logging.log4j.Logger;
import org.opensearch.client.node.NodeClient;
import org.opensearch.common.settings.Settings;
import org.opensearch.common.xcontent.XContentBuilder;
import org.opensearch.common.xcontent.XContentHelper;
import org.opensearch.common.xcontent.XContentType;
import org.opensearch.core.xcontent.XContentBuilder;
import org.opensearch.performanceanalyzer.config.PluginSettings;
import org.opensearch.performanceanalyzer.config.setting.handler.NodeStatsSettingHandler;
import org.opensearch.performanceanalyzer.config.setting.handler.PerformanceAnalyzerClusterSettingHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import org.apache.logging.log4j.Logger;
import org.opensearch.client.node.NodeClient;
import org.opensearch.common.inject.Inject;
import org.opensearch.common.xcontent.XContentBuilder;
import org.opensearch.common.xcontent.XContentHelper;
import org.opensearch.core.xcontent.XContentBuilder;
import org.opensearch.performanceanalyzer.config.PerformanceAnalyzerController;
import org.opensearch.performanceanalyzer.config.PluginSettings;
import org.opensearch.rest.BaseRestHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
import org.apache.logging.log4j.Logger;
import org.opensearch.client.node.NodeClient;
import org.opensearch.common.settings.Settings;
import org.opensearch.common.xcontent.XContentBuilder;
import org.opensearch.common.xcontent.XContentHelper;
import org.opensearch.common.xcontent.XContentType;
import org.opensearch.core.xcontent.XContentBuilder;
import org.opensearch.performanceanalyzer.config.overrides.ConfigOverrides;
import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesHelper;
import org.opensearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import java.io.IOException;
import org.opensearch.action.ActionResponse;
import org.opensearch.common.io.stream.StreamOutput;
import org.opensearch.common.xcontent.ToXContent;
import org.opensearch.common.xcontent.XContentBuilder;
import org.opensearch.core.xcontent.ToXContent;
import org.opensearch.core.xcontent.XContentBuilder;

public class WhoAmIResponse extends ActionResponse implements ToXContent {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
import org.opensearch.common.settings.ClusterSettings;
import org.opensearch.common.settings.Settings;
import org.opensearch.common.util.concurrent.ThreadContext;
import org.opensearch.common.xcontent.NamedXContentRegistry;
import org.opensearch.common.xcontent.XContentBuilder;
import org.opensearch.common.xcontent.XContentFactory;
import org.opensearch.common.xcontent.XContentType;
import org.opensearch.core.xcontent.NamedXContentRegistry;
import org.opensearch.core.xcontent.XContentBuilder;
import org.opensearch.indices.breaker.BreakerSettings;
import org.opensearch.indices.breaker.CircuitBreakerService;
import org.opensearch.indices.breaker.HierarchyCircuitBreakerService;
Expand Down Expand Up @@ -178,7 +179,9 @@ private FakeRestRequest buildRequest(String requestPath) throws IOException {
return new FakeRestRequest.Builder(NamedXContentRegistry.EMPTY)
.withMethod(RestRequest.Method.POST)
.withPath(requestPath)
.withContent(BytesReference.bytes(builder), builder.contentType())
.withContent(
BytesReference.bytes(builder),
XContentType.fromMediaType(builder.contentType()))
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
import org.opensearch.common.settings.ClusterSettings;
import org.opensearch.common.settings.Settings;
import org.opensearch.common.util.concurrent.ThreadContext;
import org.opensearch.common.xcontent.NamedXContentRegistry;
import org.opensearch.common.xcontent.XContentBuilder;
import org.opensearch.common.xcontent.XContentFactory;
import org.opensearch.common.xcontent.XContentType;
import org.opensearch.core.xcontent.NamedXContentRegistry;
import org.opensearch.core.xcontent.XContentBuilder;
import org.opensearch.indices.breaker.BreakerSettings;
import org.opensearch.indices.breaker.CircuitBreakerService;
import org.opensearch.indices.breaker.HierarchyCircuitBreakerService;
Expand Down Expand Up @@ -310,7 +311,9 @@ private FakeRestRequest buildRequest(String requestPath, boolean shouldEnable)
return new FakeRestRequest.Builder(NamedXContentRegistry.EMPTY)
.withMethod(RestRequest.Method.POST)
.withPath(requestPath)
.withContent(BytesReference.bytes(builder), builder.contentType())
.withContent(
BytesReference.bytes(builder),
XContentType.fromMediaType(builder.contentType()))
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import org.opensearch.common.settings.ClusterSettings;
import org.opensearch.common.settings.Settings;
import org.opensearch.common.util.concurrent.ThreadContext;
import org.opensearch.common.xcontent.NamedXContentRegistry;
import org.opensearch.common.xcontent.XContentType;
import org.opensearch.core.xcontent.NamedXContentRegistry;
import org.opensearch.indices.breaker.BreakerSettings;
import org.opensearch.indices.breaker.CircuitBreakerService;
import org.opensearch.indices.breaker.HierarchyCircuitBreakerService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import org.opensearch.action.ActionListener;
import org.opensearch.action.support.ActionFilters;
import org.opensearch.common.io.stream.Writeable.Reader;
import org.opensearch.common.xcontent.XContentBuilder;
import org.opensearch.common.xcontent.XContentType;
import org.opensearch.core.xcontent.XContentBuilder;
import org.opensearch.indices.IndicesService;
import org.opensearch.performanceanalyzer.OpenSearchResources;
import org.opensearch.tasks.Task;
Expand Down

0 comments on commit f89e7e8

Please sign in to comment.