if (!conn.tableExists(tableName)) {
retval.out.println("Table not found: " + tableName);
}
else {
final IndexSpecification index = conn.getIndexForTable(indexName, tableName);
if (index == null) {
retval.out.println("Index " + indexName + " not found for table " + tableName);
}
else {
retval.out.println("Index: " + index.getIndexId());
final byte[][] columns = index.getIndexedColumns();
for (final byte[] column : columns)
retval.out.println("Index key: " + Bytes.toString(column));
final byte[][] otherColumns = index.getAdditionalColumns();
if (otherColumns.length > 0) {
retval.out.println("Additional columns in index: ");
for (final byte[] column : otherColumns)
retval.out.println(" " + Bytes.toString(column));
}