use of org.apache.hadoop.hbase.hbtop.terminal.TerminalSize in project hbase by apache.
the class TerminalImpl method queryTerminalSize.
private TerminalSize queryTerminalSize() {
String sizeString = doStty("size");
int rows = 0;
int columns = 0;
StringTokenizer tokenizer = new StringTokenizer(sizeString);
int rc = Integer.parseInt(tokenizer.nextToken());
if (rc > 0) {
rows = rc;
}
rc = Integer.parseInt(tokenizer.nextToken());
if (rc > 0) {
columns = rc;
}
return new TerminalSize(columns, rows);
}
Aggregations