use of org.locationtech.geowave.core.cli.utils.FirstElementListComparator in project geowave by locationtech.
the class DescribeStoreCommand method execute.
@Override
public void execute(OperationParams params) throws Exception {
Map<String, String> configMap = computeResults(params);
List<List<Object>> rows = new ArrayList<List<Object>>(configMap.size());
Iterator<Map.Entry<String, String>> entryIter = configMap.entrySet().iterator();
while (entryIter.hasNext()) {
Map.Entry<String, String> entry = entryIter.next();
List<Object> values = new ArrayList<Object>(2);
values.add(entry.getKey());
values.add(entry.getValue());
rows.add(values);
}
Collections.sort(rows, new FirstElementListComparator());
new ConsoleTablePrinter(params.getConsole()).print(Arrays.asList("Config Parameter", "Value"), rows);
}
use of org.locationtech.geowave.core.cli.utils.FirstElementListComparator in project geowave by locationtech.
the class ListStoresCommand method execute.
@Override
public void execute(OperationParams params) throws Exception {
Map<String, String> storeMap = computeResults(params);
List<List<Object>> rows = new ArrayList<List<Object>>(storeMap.size());
storeMap.entrySet().forEach(entry -> {
List<Object> values = new ArrayList<Object>(2);
String key = entry.getKey();
values.add(key.substring(6, key.length() - ".type".length()));
values.add(entry.getValue());
rows.add(values);
});
Collections.sort(rows, new FirstElementListComparator());
new ConsoleTablePrinter(params.getConsole()).print(Arrays.asList("Data Store", "Type"), rows);
}
Aggregations