You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/05/19 23:48:11 UTC

[GitHub] [iceberg] xingfanx opened a new pull request, #4821: handle certain glue exceptions as iceberg errors

xingfanx opened a new pull request, #4821:
URL: https://github.com/apache/iceberg/pull/4821

   Handle certain glue exceptions as iceberg errors to be further processed as user errors instead of server internal errors


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] xingfanx commented on a diff in pull request #4821: AWS: handle certain glue exceptions as iceberg errors

Posted by GitBox <gi...@apache.org>.
xingfanx commented on code in PR #4821:
URL: https://github.com/apache/iceberg/pull/4821#discussion_r877696474


##########
aws/src/main/java/org/apache/iceberg/aws/glue/GlueTableOperations.java:
##########
@@ -128,6 +131,16 @@ protected void doCommit(TableMetadata base, TableMetadata metadata) {
     } catch (software.amazon.awssdk.services.glue.model.AlreadyExistsException e) {
       throw new AlreadyExistsException(e,
           "Cannot commit %s because its Glue table already exists when trying to create one", tableName());
+    } catch (software.amazon.awssdk.services.glue.model.EntityNotFoundException e) {
+      throw new NotFoundException(e,
+              "Cannot commit %s because Glue cannot find the requested entity", tableName());

Review Comment:
   applied the code style xml and fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] xiaoxuandev commented on a diff in pull request #4821: AWS: handle certain glue exceptions as iceberg errors

Posted by GitBox <gi...@apache.org>.
xiaoxuandev commented on code in PR #4821:
URL: https://github.com/apache/iceberg/pull/4821#discussion_r877630643


##########
aws/src/main/java/org/apache/iceberg/aws/glue/GlueTableOperations.java:
##########
@@ -128,6 +131,16 @@ protected void doCommit(TableMetadata base, TableMetadata metadata) {
     } catch (software.amazon.awssdk.services.glue.model.AlreadyExistsException e) {
       throw new AlreadyExistsException(e,
           "Cannot commit %s because its Glue table already exists when trying to create one", tableName());
+    } catch (software.amazon.awssdk.services.glue.model.EntityNotFoundException e) {
+      throw new NotFoundException(e,
+              "Cannot commit %s because Glue cannot find the requested entity", tableName());

Review Comment:
   Indent should be 4 here



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] xiaoxuandev commented on a diff in pull request #4821: AWS: handle certain glue exceptions as iceberg errors

Posted by GitBox <gi...@apache.org>.
xiaoxuandev commented on code in PR #4821:
URL: https://github.com/apache/iceberg/pull/4821#discussion_r877631019


##########
aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogCommitFailure.java:
##########
@@ -244,6 +249,75 @@ private void concurrentCommitAndThrowException(GlueTableOperations realOps, Glue
     }).when(spyOperations).persistGlueTable(Matchers.any(), Matchers.anyMap(), Matchers.any());
   }
 
+  @Test
+  public void testCreateTableWithInvalidDB() {
+    Table table = setupTable();
+    GlueTableOperations ops = (GlueTableOperations) ((HasTableOperations) table).operations();
+
+    TableMetadata metadataV1 = ops.current();
+    TableMetadata metadataV2 = updateTable(table, ops);
+
+    GlueTableOperations spyOps = Mockito.spy(ops);
+    failCommitAndThrowException(spyOps, EntityNotFoundException.builder().build());
+
+    AssertHelpers.assertThrows(
+            "Should throw not found exception",

Review Comment:
   Indent should be 4



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] jackye1995 merged pull request #4821: AWS: handle certain glue exceptions as iceberg errors

Posted by GitBox <gi...@apache.org>.
jackye1995 merged PR #4821:
URL: https://github.com/apache/iceberg/pull/4821


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org