Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.apache.hbase.thirdparty.com.google.common.base.Splitter;
import org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine;
import org.apache.hbase.thirdparty.org.apache.commons.cli.DefaultParser;
import org.apache.hbase.thirdparty.org.apache.commons.cli.HelpFormatter;
Expand Down Expand Up @@ -119,6 +120,7 @@ public int run(String[] args) throws Exception {
try {
delay = Integer.parseInt(commandLine.getOptionValue("delay"));
} catch (NumberFormatException ignored) {
// Deliberately ignored, we handle the issue below.
}

if (delay < 1) {
Expand Down Expand Up @@ -163,7 +165,7 @@ public int run(String[] args) throws Exception {
}

if (commandLine.hasOption("fields")) {
String[] fields = commandLine.getOptionValue("fields").split(",");
Iterable<String> fields = Splitter.on(',').split(commandLine.getOptionValue("fields"));
initialFields = new ArrayList<>();
for (String field : fields) {
Optional<FieldInfo> fieldInfo = initialMode.getFieldInfos().stream()
Expand All @@ -177,7 +179,7 @@ public int run(String[] args) throws Exception {
}

if (commandLine.hasOption("filters")) {
String[] filters = commandLine.getOptionValue("filters").split(",");
Iterable<String> filters = Splitter.on(',').split(commandLine.getOptionValue("filters"));
List<Field> fields = initialMode.getFieldInfos().stream().map(FieldInfo::getField)
.collect(Collectors.toList());
for (String filter : filters) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* Represents a display mode in the top screen.
*/
@InterfaceAudience.Private
@SuppressWarnings("ImmutableEnumChecker")
public enum Mode {
NAMESPACE("Namespace", "Record per Namespace", new NamespaceModeStrategy()),
TABLE("Table", "Record per Table", new TableModeStrategy()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ private Record createRecord(ServerMetrics serverMetrics, RegionMetrics regionMet
elements.length == 4 ? Integer.valueOf(Bytes.toString(elements[3])).toString() : "";
region = RegionInfo.encodeRegionName(regionMetrics.getRegionName());
} catch (IOException ignored) {
// Exception deliberately ignored
}

builder.put(Field.NAMESPACE, namespaceName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ default TerminalPrinter print(double value) {
return this;
}

@SuppressWarnings("AnnotateFormatMethod")
default TerminalPrinter printFormat(String format, Object... args) {
print(String.format(format, args));
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ private void readerThread() {
} else {
Thread.sleep(20);
}
} catch (InterruptedException ignored) {
} catch (InterruptedException e) {
// Restore interrupt status
Thread.currentThread().interrupt();
done = true;
} catch (IOException e) {
LOGGER.error("Caught an exception", e);
done = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ private String doStty(String sttyOptionsString) {

try {
process.waitFor();
} catch (InterruptedException ignored) {
} catch (InterruptedException e) {
// Restore interrupt status
Thread.currentThread().interrupt();
}

int exitValue = process.exitValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ private static UserMetrics createUserMetrics(String user, long readRequestCount,
.build();
}

@SuppressWarnings("JavaUtilDate")
private static RegionMetrics createRegionMetrics(String regionName, long readRequestCount,
long filteredReadRequestCount, long writeRequestCount, Size storeFileSize,
Size uncompressedStoreFileSize, int storeFileCount, Size memStoreSize, float locality,
Expand Down