/** * 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()); } }
@Override public Change apply(History input) { return new ChangeBuilder(input.getChangeId()) .with(input).with(input.getDelta()).build(); } }).iterator();
public static AuditBuilder from(Audit audit) { return new AuditBuilder().setAll(audit.getAll()); }
private String getPlacement(Table table, boolean useMasterPlacement) { if (!useMasterPlacement) { TableAvailability availability = table.getAvailability(); if (availability != null) { return availability.getPlacement(); } // If the table isn't available locally then defer to it's placement from the table options. // If the user doesn't have permission the permission check will fail. If he does the permission // check won't fail but another more informative exception will likely be thrown. } return table.getOptions().getPlacement(); } }
@Override public String getNextToken(Map<String, Object> object) { return Intrinsic.getId(object); } });
private FacadeOptions replacePlacementIfMoveInProgress(FacadeOptions options) { String placement = options.getPlacement(); if (_placementsUnderMove.containsKey(placement)) { return new FacadeOptionsBuilder().setPlacement(_placementsUnderMove.get(placement)).build(); } return options; }
@Override public URI getStashRoot() throws StashNotAvailableException { return _delegate.getStashRoot(); } }
@Override public String getNextToken(Table table) { return table.getName(); } });
@Override public void createFacade(String table, FacadeOptions options, Audit audit) throws TableExistsException { _authDataStore.createFacade(_apiKey, table, options, audit); }
@Override public void dropFacade(String table, String placement, Audit audit) throws UnknownTableException { _authDataStore.dropFacade(_apiKey, table, placement, audit); }
@Override public void createTable(String table, TableOptions options, Map<String, ?> template, Audit audit) throws TableExistsException { _authDataStore.createTable(_apiKey, table, options, template, audit); }
@Override public long getTableApproximateSize(String table, int limit) throws UnknownTableException { return _authDataStore.getTableApproximateSize(_apiKey, table, limit); }
@Override public void setTableTemplate(String table, Map<String, ?> template, Audit audit) throws UnknownTableException { _authDataStore.setTableTemplate(_apiKey, table, template, audit); }
/** * 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()); } }
public static AuditBuilder from(Audit audit) { return new AuditBuilder().setAll(audit.getAll()); }
@Override public Change apply(History input) { return new ChangeBuilder(input.getChangeId()) .with(input).with(input.getDelta()).build(); } }).iterator();
@Override public String getNextToken(Map<String, Object> object) { return Intrinsic.getId(object); } });
@Override public URI getStashRoot() throws StashNotAvailableException { return _delegate.getStashRoot(); } }
@Override public void createFacade(String table, FacadeOptions options, Audit audit) throws TableExistsException { _authDataStore.createFacade(_apiKey, table, options, audit); }