Skip to content
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* 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.solr.client.api.endpoint;

import io.swagger.v3.oas.annotations.Operation;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import org.apache.solr.client.api.model.NodeSystemInfoResponse;

/** V2 API definition to fetch node system info, analogous to the v1 /admin/info/system. */
@Path("/node/info/system")
public interface NodeSystemInfoApi {

@GET
@Operation(
summary = "Retrieve node system info.",
tags = {"system"})
NodeSystemInfoResponse getNodeSystemInfo();
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,42 +20,50 @@
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.solr.client.api.util.ReflectWritable;

/** Response from /node/system */
public class NodeSystemResponse extends SolrJerseyResponse {
/** Response from /node/info/system */
public class NodeSystemInfoResponse extends SolrJerseyResponse {

@JsonProperty public String mode;
@JsonProperty public String zkHost;
@JsonProperty public NodeSystemInfo nodeInfo;

@JsonProperty("solr_home")
public String solrHome;
/** wrapper around the node info */
public static class NodeSystemInfo implements ReflectWritable {
@JsonProperty public String node;
@JsonProperty public String mode;
@JsonProperty public String zkHost;

@JsonProperty("core_root")
public String coreRoot;
@JsonProperty("solr_home")
public String solrHome;

@JsonProperty public String environment;
@JsonProperty("core_root")
public String coreRoot;

@JsonProperty(value = "environment_label")
public String environmentLabel;
@JsonProperty public String environment;

@JsonProperty(value = "environment_color")
public String environmentColor;
@JsonProperty(value = "environment_label")
public String environmentLabel;

@JsonProperty public String node;
@JsonProperty public Lucene lucene;
@JsonProperty public JVM jvm;
@JsonProperty public Security security;
@JsonProperty public GPU gpu;
@JsonProperty public Map<String, String> system;
@JsonProperty(value = "environment_color")
public String environmentColor;

@JsonProperty public Core core;
@JsonProperty public Lucene lucene;
@JsonProperty public JVM jvm;
@JsonProperty public Security security;
@JsonProperty public GPU gpu;
@JsonProperty public Map<String, String> system;
}

/** /node/system/security */
public static class Security {
@JsonProperty public boolean tls;
@JsonProperty public String authenticationPlugin;
@JsonProperty public String authorizationPlugin;
@JsonProperty public String username;
@JsonProperty public List<String> roles;
@JsonProperty public List<String> permissions;
@JsonProperty public Set<String> roles;
@JsonProperty public Set<String> permissions;
}

/** /node/system/lucene */
Expand Down Expand Up @@ -121,6 +129,22 @@ public static class GPU {
@JsonProperty public boolean available;
@JsonProperty public long count;
@JsonProperty public MemoryRaw memory;
@JsonProperty Map<String, Object> devices;
@JsonProperty public Map<String, Object> devices;
}

public static class Core {
@JsonProperty public String schema;
@JsonProperty public String host;
@JsonProperty public Date now;
@JsonProperty public Date start;
@JsonProperty public Directory directory;
}

public static class Directory {
@JsonProperty public String cwd;
@JsonProperty public String instance;
@JsonProperty public String data;
@JsonProperty public String dirimpl;
@JsonProperty public String index;
}
}
Loading