/** * Creates the qualified name. * * @param nameSupplier supplier * @return name */ public QualifiedName qualifyName(final Supplier<QualifiedName> nameSupplier) { try { return nameSupplier.get(); } catch (Exception e) { log.error("Invalid qualified name", e); throw new MetacatBadRequestException(e.getMessage()); } }
collectRequestExceptionMetrics(tags, e.getClass().getSimpleName()); log.error(e.getMessage(), e); throw new MetacatBadRequestException(String.format("%s.%s", e.getMessage(), e.getCause() == null ? "" : e.getCause().getMessage())); } catch (Exception e) {
collectRequestExceptionMetrics(tags, e.getClass().getSimpleName()); log.error(e.getMessage(), e); throw new MetacatBadRequestException( String.format("%s.%s", e.getMessage(), e.getCause() == null ? "" : e.getCause().getMessage())); } catch (TablePreconditionFailedException e) {
private void validAndUpdateVirtualView(final Table table) { if (isVirtualView(table) && Strings.isNullOrEmpty(table.getViewOriginalText())) { throw new MetacatBadRequestException( String.format("Invalid view creation for %s/%s. Missing viewOrginialText", table.getDbName(), table.getDbName())); } if (Strings.isNullOrEmpty(table.getViewExpandedText())) { //set viewExpandedText to viewOriginalTest table.setViewExpandedText(table.getViewOriginalText()); } //setting dummy string to view to avoid dropping view issue in hadoop Path org.apache.hadoop.fs if (Strings.isNullOrEmpty(table.getSd().getLocation())) { table.getSd().setLocation("file://tmp/" + table.getDbName() + "/" + table.getTableName()); } }
private void validAndUpdateVirtualView(final Table table) { if (isVirtualView(table) && Strings.isNullOrEmpty(table.getViewOriginalText())) { throw new MetacatBadRequestException( String.format("Invalid view creation for %s/%s. Missing viewOrginialText", table.getDbName(), table.getDbName())); } if (Strings.isNullOrEmpty(table.getViewExpandedText())) { //set viewExpandedText to viewOriginalTest table.setViewExpandedText(table.getViewOriginalText()); } //setting dummy string to view to avoid dropping view issue in hadoop Path org.apache.hadoop.fs if (Strings.isNullOrEmpty(table.getSd().getLocation())) { table.getSd().setLocation("file://tmp/" + table.getDbName() + "/" + table.getTableName()); } }
throw new MetacatBadRequestException("Iceberg filter parse error"); } catch (IllegalStateException e) { registry.counter(registry.createId(IcebergRequestMetrics.CounterGetPartitionsExceedThresholdFailure
throw new MetacatBadRequestException("Iceberg filter parse error"); } catch (IllegalStateException e) { registry.counter(registry.createId(IcebergRequestMetrics.CounterGetPartitionsExceedThresholdFailure
return new MetacatNotSupportedException(message); case 400: //BAD_REQUEST return new MetacatBadRequestException(message); case 403: //Forbidden return new MetacatUnAuthorizedException(message);