Source:
<code>private void extractTablesAndIndexes(PhoenixConnection conn) { String tables = inputTables.trim().split(","); PTable dataTable = null; try { for (String tableName : tables) { HashSet<String> physicalIndexes = new HashSet<>(); dataTable = PhoenixRuntime.getTableNoCache(conn, tableName); String physicalTableName = dataTable.getPhysicalName().getString(); <START> for (PTable indexTable : dataTable.getIndexes()) { <END> if(indexTable.getIndexType().equals(PTable.IndexType.GLOBAL)) { physicalIndexes.add(indexTable.getPhysicalName().getString()); } } HashSet<String> rebuildIndexes = new HashSet<>(); rebuildIndexes.addAll(physicalIndexes); if (MetaDataUtil.hasViewIndexTable(conn, dataTable.getPhysicalName())) { String viewIndexPhysicalName = MetaDataUtil.getViewIndexPhysicalName(physicalTableName); physicalIndexes.add(viewIndexPhysicalName); ResultSet rs = conn.createStatement().executeQuery("SELECT DISTINCT TABLE_NAME FROM " + "SYSTEM.CATALOG WHERE COLUMN_FAMILY = \'"+viewIndexPhysicalName+ "\' AND TABLE_TYPE = \'i\'"); while (rs.next()) { String viewIndexName = rs.getString(1); rebuildIndexes.add(viewIndexName); } } rebuildMap.put(physicalTableName, rebuildIndexes); tablesAndIndexes.put(physicalTableName, physicalIndexes); } } catch (SQLException e) { LOGGER.severe("Exception while splitting tool input "+e); if (dataTable == null) { LOGGER.severe("Unable to find the provided data table"); } } }</code><technical_language>This feature is supported transactional tables. If a table is transactional, skipped this logged</technical_language>

Target:
private boolean extractTablesAndIndexes(PhoenixConnection conn) { String tables = inputTables.trim().split(","); PTable dataTable = null; try { for (String tableName : tables) { HashSet<String> physicalIndexes = new HashSet<>(); dataTable = PhoenixRuntime.getTableNoCache(conn, tableName); String physicalTableName = dataTable.getPhysicalName().getString(); HashMap<String, String> rebuildIndexes = new HashMap<>(); if (!dataTable.isTransactional() && dataTable.getType().equals(PTableType.TABLE)) { for (PTable indexTable : dataTable.getIndexes()) { if (indexTable.getIndexType().equals(PTable.IndexType.GLOBAL)) { physicalIndexes.add(indexTable.getPhysicalName().getString()); rebuildIndexes.put(indexTable.getPhysicalName().getString(), GLOBAL_INDEX_ID); } } if (MetaDataUtil.hasViewIndexTable(conn, dataTable.getPhysicalName())) { String viewIndexPhysicalName = MetaDataUtil.getViewIndexPhysicalName(physicalTableName); physicalIndexes.add(viewIndexPhysicalName); ResultSet rs = conn.createStatement().executeQuery( "SELECT DISTINCT TABLE_NAME, TENANT_ID FROM " + "SYSTEM.CATALOG WHERE COLUMN_FAMILY = \'" + viewIndexPhysicalName +"\' AND TABLE_TYPE = \'i\'"); while (rs.next()) { String viewIndexName = rs.getString(1); String tenantId = rs.getString(2); rebuildIndexes.put(viewIndexName, tenantId); } } rebuildMap.put(physicalTableName, rebuildIndexes); tablesAndIndexes.put(physicalTableName, physicalIndexes); } else { LOGGER.info("Skipping Table " + tableName + " because it is "+ (dataTable.isTransactional() ? "transactional" : "not a data table")); } } return true; } catch (SQLException e) { LOGGER.severe("Failed to find list of indexes "+e); if (dataTable == null) { LOGGER.severe("Unable to find the provided data table"); } return false; } }