List of usage examples for com.amazonaws.services.glue.model CreateTableRequest CreateTableRequest
CreateTableRequest
From source file:com.facebook.presto.hive.metastore.glue.GlueHiveMetastore.java
License:Apache License
@Override public void createTable(Table table, PrincipalPrivileges principalPrivileges) { try {/*from w w w .ja va 2s . c om*/ TableInput input = GlueInputConverter.convertTable(table); glueClient.createTable( new CreateTableRequest().withDatabaseName(table.getDatabaseName()).withTableInput(input)); } catch (AlreadyExistsException e) { throw new TableAlreadyExistsException( new SchemaTableName(table.getDatabaseName(), table.getTableName())); } catch (EntityNotFoundException e) { throw new SchemaNotFoundException(table.getDatabaseName()); } catch (AmazonServiceException e) { throw new PrestoException(HIVE_METASTORE_ERROR, e); } }