Skip to content

Commit

Permalink
Remove unused DeadlockAnalyzer (elastic#87664)
Browse files Browse the repository at this point in the history
Random find, this class and a couple of other spots in the package are unused.
  • Loading branch information
original-brownbear committed Jun 16, 2022
1 parent 36cffef commit 1f21565
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 271 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,6 @@ public HotThreads ignoreIdleThreads(boolean ignoreIdleThreads) {
return this;
}

public HotThreads threadElementsSnapshotDelay(TimeValue threadElementsSnapshotDelay) {
this.threadElementsSnapshotDelay = threadElementsSnapshotDelay;
return this;
}

public HotThreads threadElementsSnapshotCount(int threadElementsSnapshotCount) {
this.threadElementsSnapshotCount = threadElementsSnapshotCount;
return this;
Expand Down
95 changes: 1 addition & 94 deletions server/src/main/java/org/elasticsearch/monitor/jvm/JvmInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

public class JvmInfo implements ReportingService.Info {

private static JvmInfo INSTANCE;
private static final JvmInfo INSTANCE;

static {
RuntimeMXBean runtimeMXBean = ManagementFactory.getRuntimeMXBean();
Expand Down Expand Up @@ -342,68 +342,6 @@ public String getVersion() {
return this.version;
}

public int versionAsInteger() {
try {
int i = 0;
StringBuilder sVersion = new StringBuilder();
for (; i < version.length(); i++) {
if (Character.isDigit(version.charAt(i)) == false && version.charAt(i) != '.') {
break;
}
if (version.charAt(i) != '.') {
sVersion.append(version.charAt(i));
}
}
if (i == 0) {
return -1;
}
return Integer.parseInt(sVersion.toString());
} catch (Exception e) {
return -1;
}
}

public int versionUpdatePack() {
try {
int i = 0;
StringBuilder sVersion = new StringBuilder();
for (; i < version.length(); i++) {
if (Character.isDigit(version.charAt(i)) == false && version.charAt(i) != '.') {
break;
}
if (version.charAt(i) != '.') {
sVersion.append(version.charAt(i));
}
}
if (i == 0) {
return -1;
}
Integer.parseInt(sVersion.toString());
int from;
if (version.charAt(i) == '_') {
// 1.7.0_4
from = ++i;
} else if (version.charAt(i) == '-' && version.charAt(i + 1) == 'u') {
// 1.7.0-u2-b21
i = i + 2;
from = i;
} else {
return -1;
}
for (; i < version.length(); i++) {
if (Character.isDigit(version.charAt(i)) == false && version.charAt(i) != '.') {
break;
}
}
if (from == i) {
return -1;
}
return Integer.parseInt(version.substring(from, i));
} catch (Exception e) {
return -1;
}
}

public String getVmName() {
return this.vmName;
}
Expand Down Expand Up @@ -432,18 +370,6 @@ public String[] getInputArguments() {
return this.inputArguments;
}

public String getBootClassPath() {
return this.bootClassPath;
}

public String getClassPath() {
return this.classPath;
}

public Map<String, String> getSystemProperties() {
return this.systemProperties;
}

public long getConfiguredInitialHeapSize() {
return configuredInitialHeapSize;
}
Expand Down Expand Up @@ -484,14 +410,6 @@ public long getG1RegionSize() {
return g1RegionSize;
}

public String[] getGcCollectors() {
return gcCollectors;
}

public String[] getMemoryPools() {
return memoryPools;
}

@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
builder.startObject(Fields.JVM);
Expand Down Expand Up @@ -591,16 +509,5 @@ public ByteSizeValue getHeapMax() {
return new ByteSizeValue(heapMax);
}

public ByteSizeValue getNonHeapInit() {
return new ByteSizeValue(nonHeapInit);
}

public ByteSizeValue getNonHeapMax() {
return new ByteSizeValue(nonHeapMax);
}

public ByteSizeValue getDirectMemoryMax() {
return new ByteSizeValue(directMemoryMax);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -463,13 +463,6 @@ public ByteSizeValue getMax() {
return new ByteSizeValue(max);
}

public ByteSizeValue getPeakUsed() {
return new ByteSizeValue(peakUsed);
}

public ByteSizeValue getPeakMax() {
return new ByteSizeValue(peakMax);
}
}

public static class Mem implements Writeable, Iterable<MemoryPool> {
Expand Down

0 comments on commit 1f21565

Please sign in to comment.