/** * If a table exists but is empty then it will not be stashed. This method will surface this exception * only if the table exists. Otherwise it converts it to an UnknownTableException. */ private RuntimeException propagateTableNotStashed(TableNotStashedException e) throws TableNotStashedException, UnknownTableException { if (_dataStore.getTableExists(e.getTable())) { throw e; } throw new UnknownTableException(e.getTable()); } }
private Iterator<S3ObjectSummary> getS3ObjectSummariesForTable(String table) throws TableNotStashedException { String prefix = getPrefix(table); Iterator<S3ObjectSummary> summaryIterator = getS3ObjectSummaries(prefix); if (!summaryIterator.hasNext()) { throw new TableNotStashedException(table); } return summaryIterator; }
private Iterator<S3ObjectSummary> getS3ObjectSummariesForTable(String table) throws TableNotStashedException { String prefix = getPrefix(table); Iterator<S3ObjectSummary> summaryIterator = getS3ObjectSummaries(prefix); if (!summaryIterator.hasNext()) { throw new TableNotStashedException(table); } return summaryIterator; }
/** * If a table exists but is empty then it will not be stashed. This method will surface this exception * only if the table exists. Otherwise it converts it to an UnknownTableException. */ private RuntimeException propagateTableNotStashed(TableNotStashedException e) throws TableNotStashedException, UnknownTableException { if (_dataStore.getTableExists(e.getTable())) { throw e; } throw new UnknownTableException(e.getTable()); } }