public static String extractLilyTableName(String repositoryName, String hbaseTableName) { if (isDefaultRepository(repositoryName)) { return hbaseTableName; } else { String prefix = repositoryName + REPOSITORY_TABLE_SEPARATOR; if (!hbaseTableName.startsWith(prefix)) { throw new IllegalArgumentException(String.format("HBase table '%s' does not belong to repository '%s'", hbaseTableName, repositoryName)); } return hbaseTableName.substring(prefix.length()); } }