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/03/01 11:35:32 UTC
[GitHub] [iceberg] singhpk234 opened a new pull request #4248: AWS : use additionalLocations in glue table to store location info
singhpk234 opened a new pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248
- The new additionalLocations field added in Glue [CodePointer](https://github.com/aws/aws-sdk-java-v2/blob/master/services/glue/src/main/resources/codegen-resources/service-2.json#L12226-L12229)
- store location info present in table properties in this param.
--
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] rajarshisarkar commented on a change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
rajarshisarkar commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r816722985
##########
File path: aws/src/main/java/org/apache/iceberg/aws/glue/GlueTableOperations.java
##########
@@ -207,6 +216,15 @@ void persistGlueTable(Table glueTable, Map<String, String> parameters, TableMeta
SET_VERSION_ID.invoke(updateTableRequest, glueTable.versionId());
}
+ if (!ADDITIONAL_LOCATIONS.isNoop()) {
+ ADDITIONAL_LOCATIONS.invoke(updateTableRequest,
Review comment:
Also, is `additionalLocations` available in the previous SDK version? We might not need reflection in that case.
--
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] singhpk234 edited a comment on pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
singhpk234 edited a comment on pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#issuecomment-1057976891
Thanks @jackye1995 !!
- updated the integration Test for the same and verified it by running locally
---
code is ready for another pass
--
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] rajarshisarkar commented on a change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
rajarshisarkar commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r817336058
##########
File path: aws/src/main/java/org/apache/iceberg/aws/glue/IcebergToGlueConverter.java
##########
@@ -179,8 +196,12 @@ static void validateTableIdentifier(TableIdentifier tableIdentifier) {
*/
static void setTableInputInformation(TableInput.Builder tableInputBuilder, TableMetadata metadata) {
try {
+ StorageDescriptor.Builder storageDescriptor = StorageDescriptor.builder();
+ if (!SET_ADDITIONAL_LOCATIONS.isNoop()) {
+ SET_ADDITIONAL_LOCATIONS.invoke(storageDescriptor.additionalLocations(), getAdditionalLocations(metadata));
Review comment:
No need to use `storageDescriptor.additionalLocations()` as target. You can directly use the `storageDescriptor` builder.
--
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] rajarshisarkar commented on a change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
rajarshisarkar commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r817654087
##########
File path: aws/src/main/java/org/apache/iceberg/aws/glue/IcebergToGlueConverter.java
##########
@@ -179,8 +196,12 @@ static void validateTableIdentifier(TableIdentifier tableIdentifier) {
*/
static void setTableInputInformation(TableInput.Builder tableInputBuilder, TableMetadata metadata) {
try {
+ StorageDescriptor.Builder storageDescriptor = StorageDescriptor.builder();
+ if (!SET_ADDITIONAL_LOCATIONS.isNoop()) {
+ SET_ADDITIONAL_LOCATIONS.invoke(storageDescriptor, getAdditionalLocations(metadata));
+ }
Review comment:
nit: newline after if block
##########
File path: aws/src/test/java/org/apache/iceberg/aws/glue/TestIcebergToGlueConverter.java
##########
@@ -40,6 +42,11 @@
public class TestIcebergToGlueConverter {
+ private final Map<String, String> tableMetaDataProperties = ImmutableMap.of(
+ TableProperties.WRITE_DATA_LOCATION, "s3://writeDataLoc",
+ TableProperties.WRITE_METADATA_LOCATION, "s3://writeMetaDataLoc",
+ TableProperties.WRITE_FOLDER_STORAGE_LOCATION, "s3://writeFolderStorageLoc");
Review comment:
Let's test a key will null values.
--
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 change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
xiaoxuandev commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r829400828
##########
File path: aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogTable.java
##########
@@ -74,6 +74,8 @@ public void testCreateTable() {
Assert.assertTrue(response.table().parameters().containsKey(BaseMetastoreTableOperations.METADATA_LOCATION_PROP));
Assert.assertEquals(schema.columns().size(), response.table().storageDescriptor().columns().size());
Assert.assertEquals(partitionSpec.fields().size(), response.table().partitionKeys().size());
+ Assert.assertEquals("additionalLocations should match", tableLocationProperties.values(),
Review comment:
Yes. I am testing is against master branch. Let me double check again.
--
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 commented on a change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
jackye1995 commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r818322126
##########
File path: aws/src/test/java/org/apache/iceberg/aws/glue/TestIcebergToGlueConverter.java
##########
@@ -216,6 +229,10 @@ public void testSetTableInputInformationWithRemovedColumns() {
.build())
.build();
+ Assert.assertEquals(
+ "additionalLocations do not match",
Review comment:
the message here should describe the expected behavior, instead of the wrong behavior, like `"additionalLocations should match"`. It seems like we are also doing this wrong at L237 and L241, could you update those messages as well?
--
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 commented on a change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
jackye1995 commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r818321205
##########
File path: aws/src/main/java/org/apache/iceberg/aws/glue/IcebergToGlueConverter.java
##########
@@ -276,4 +298,11 @@ private static void addColumnWithDedupe(List<Column> columns, Set<String> dedupe
dedupe.add(field.name());
}
}
+
+ private static Set<String> getAdditionalLocations(TableMetadata tableMetadata) {
Review comment:
I think this method is simple enough that we can just put it in the main method, no need to have a separated helper
--
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 #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
jackye1995 merged pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248
--
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] singhpk234 commented on a change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
singhpk234 commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r829417168
##########
File path: aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogTable.java
##########
@@ -74,6 +74,8 @@ public void testCreateTable() {
Assert.assertTrue(response.table().parameters().containsKey(BaseMetastoreTableOperations.METADATA_LOCATION_PROP));
Assert.assertEquals(schema.columns().size(), response.table().storageDescriptor().columns().size());
Assert.assertEquals(partitionSpec.fields().size(), response.table().partitionKeys().size());
+ Assert.assertEquals("additionalLocations should match", tableLocationProperties.values(),
Review comment:
This is very strange, if possible can you please share the java version you are in.
P.S thankyou for making the change to fix it, have added a feedback, do let me know what you think of it,
--
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] singhpk234 commented on a change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
singhpk234 commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r817329038
##########
File path: aws/src/main/java/org/apache/iceberg/aws/glue/IcebergToGlueConverter.java
##########
@@ -175,12 +185,25 @@ static void validateTableIdentifier(TableIdentifier tableIdentifier) {
* and should never be used by any query processing engine to infer information like schema, partition spec, etc.
* The source of truth is stored in the actual Iceberg metadata file defined by the metadata_location table property.
* @param tableInputBuilder Glue TableInput builder
+ * @param tableProps Table properties
* @param metadata Iceberg table metadata
*/
- static void setTableInputInformation(TableInput.Builder tableInputBuilder, TableMetadata metadata) {
+ static void setTableInputInformation(
+ TableInput.Builder tableInputBuilder,
+ Map<String, String> tableProps,
+ TableMetadata metadata) {
try {
+ StorageDescriptor.Builder storageDescriptor = StorageDescriptor.builder();
+ if (!ADDITIONAL_LOCATIONS.isNoop()) {
+ ADDITIONAL_LOCATIONS.invoke(storageDescriptor.additionalLocations(),
+ ImmutableList.of(
Review comment:
+1
yup just checked ImmutableList.of() fails with null values...
- added a test case as well where in the additionalLocation the properties we are fetching values from is not present.
replaced this with location's with not null filtering, as it's not worth storing null as well.
```java
private static final List<String> PROPERTIES_FOR_GLUE_ADDITIONAL_LOCATIONS = ImmutableList.of(
TableProperties.WRITE_DATA_LOCATION,
TableProperties.WRITE_METADATA_LOCATION,
TableProperties.OBJECT_STORE_PATH,
TableProperties.WRITE_FOLDER_STORAGE_LOCATION
);
private static List<String> getAdditionalLocations(TableMetadata tableMetadata) {
return PROPERTIES_FOR_GLUE_ADDITIONAL_LOCATIONS.stream()
.map(tableMetadata.properties()::get)
.filter(Objects::nonNull)
.collect(Collectors.toList());
}
```
--
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] rajarshisarkar commented on a change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
rajarshisarkar commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r816711267
##########
File path: aws/src/main/java/org/apache/iceberg/aws/glue/GlueTableOperations.java
##########
@@ -70,6 +73,12 @@
.orNoop()
.build();
+ // Attempt to set additionalLocations if available on the given AWS SDK version
+ private static final DynMethods.UnboundMethod ADDITIONAL_LOCATIONS = DynMethods.builder("additionalLocations")
+ .hiddenImpl("software.amazon.awssdk.services.glue.model.UpdateTableRequest$Builder", List.class)
Review comment:
In that case, we set the storage description only in `IcebergToGlueConverter` class.
--
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 commented on pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
jackye1995 commented on pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#issuecomment-1057676050
thanks, mostly look good to me! There is also a test in integration tests related to this, could you update that as well?
--
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 commented on a change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
jackye1995 commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r817318533
##########
File path: aws/src/main/java/org/apache/iceberg/aws/glue/IcebergToGlueConverter.java
##########
@@ -61,6 +65,12 @@ private IcebergToGlueConverter() {
public static final String ICEBERG_FIELD_OPTIONAL = "iceberg.field.optional";
public static final String ICEBERG_FIELD_CURRENT = "iceberg.field.current";
+ // Attempt to set additionalLocations if available on the given AWS SDK version
+ private static final DynMethods.UnboundMethod ADDITIONAL_LOCATIONS = DynMethods.builder("additionalLocations")
Review comment:
nit: prefer verb for setter, `SET_ADDITIONAL_LOCATIONS`
##########
File path: aws/src/main/java/org/apache/iceberg/aws/glue/IcebergToGlueConverter.java
##########
@@ -175,12 +185,25 @@ static void validateTableIdentifier(TableIdentifier tableIdentifier) {
* and should never be used by any query processing engine to infer information like schema, partition spec, etc.
* The source of truth is stored in the actual Iceberg metadata file defined by the metadata_location table property.
* @param tableInputBuilder Glue TableInput builder
+ * @param tableProps Table properties
* @param metadata Iceberg table metadata
*/
- static void setTableInputInformation(TableInput.Builder tableInputBuilder, TableMetadata metadata) {
+ static void setTableInputInformation(
+ TableInput.Builder tableInputBuilder,
+ Map<String, String> tableProps,
Review comment:
nit: prefer full nouns, `properties` instead of `tableProps`
##########
File path: aws/src/main/java/org/apache/iceberg/aws/glue/IcebergToGlueConverter.java
##########
@@ -175,12 +185,25 @@ static void validateTableIdentifier(TableIdentifier tableIdentifier) {
* and should never be used by any query processing engine to infer information like schema, partition spec, etc.
* The source of truth is stored in the actual Iceberg metadata file defined by the metadata_location table property.
* @param tableInputBuilder Glue TableInput builder
+ * @param tableProps Table properties
* @param metadata Iceberg table metadata
*/
- static void setTableInputInformation(TableInput.Builder tableInputBuilder, TableMetadata metadata) {
+ static void setTableInputInformation(
+ TableInput.Builder tableInputBuilder,
+ Map<String, String> tableProps,
+ TableMetadata metadata) {
try {
+ StorageDescriptor.Builder storageDescriptor = StorageDescriptor.builder();
+ if (!ADDITIONAL_LOCATIONS.isNoop()) {
+ ADDITIONAL_LOCATIONS.invoke(storageDescriptor.additionalLocations(),
+ ImmutableList.of(
Review comment:
this should be a set, also have we tested if it's fine to have `ImmutableList.of(...)` with null values? I think it's going to fail.
##########
File path: aws/src/main/java/org/apache/iceberg/aws/glue/IcebergToGlueConverter.java
##########
@@ -175,12 +185,25 @@ static void validateTableIdentifier(TableIdentifier tableIdentifier) {
* and should never be used by any query processing engine to infer information like schema, partition spec, etc.
* The source of truth is stored in the actual Iceberg metadata file defined by the metadata_location table property.
* @param tableInputBuilder Glue TableInput builder
+ * @param tableProps Table properties
* @param metadata Iceberg table metadata
*/
- static void setTableInputInformation(TableInput.Builder tableInputBuilder, TableMetadata metadata) {
+ static void setTableInputInformation(
+ TableInput.Builder tableInputBuilder,
+ Map<String, String> tableProps,
+ TableMetadata metadata) {
try {
+ StorageDescriptor.Builder storageDescriptor = StorageDescriptor.builder();
+ if (!ADDITIONAL_LOCATIONS.isNoop()) {
+ ADDITIONAL_LOCATIONS.invoke(storageDescriptor.additionalLocations(),
+ ImmutableList.of(
+ tableProps.get(TableProperties.WRITE_DATA_LOCATION),
Review comment:
this is likely wrong, the property is not a part of Glue parameters, but `metadata.properties()`
--
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] singhpk234 commented on a change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
singhpk234 commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r829394790
##########
File path: aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogTable.java
##########
@@ -74,6 +74,8 @@ public void testCreateTable() {
Assert.assertTrue(response.table().parameters().containsKey(BaseMetastoreTableOperations.METADATA_LOCATION_PROP));
Assert.assertEquals(schema.columns().size(), response.table().storageDescriptor().columns().size());
Assert.assertEquals(partitionSpec.fields().size(), response.table().partitionKeys().size());
+ Assert.assertEquals("additionalLocations should match", tableLocationProperties.values(),
Review comment:
yes I checked running the test case against master right now it passes :
```shell
pk/iceberg - (master) > ./gradlew :iceberg-aws:integrationTest --tests "org.apache.iceberg.aws.glue.TestGlueCatalogTable"
BUILD SUCCESSFUL in 1m 44s
14 actionable tasks: 1 executed, 13 up-to-date
```
Looks like the order is of the output is messed up are you testing this in your branch ? if yes some change might have caused the diff in order of keys of HashMap.
--
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 change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
xiaoxuandev commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r829398660
##########
File path: aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogTable.java
##########
@@ -74,6 +74,8 @@ public void testCreateTable() {
Assert.assertTrue(response.table().parameters().containsKey(BaseMetastoreTableOperations.METADATA_LOCATION_PROP));
Assert.assertEquals(schema.columns().size(), response.table().storageDescriptor().columns().size());
Assert.assertEquals(partitionSpec.fields().size(), response.table().partitionKeys().size());
+ Assert.assertEquals("additionalLocations should match", tableLocationProperties.values(),
Review comment:
https://github.com/apache/iceberg/pull/4355
--
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] singhpk234 commented on a change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
singhpk234 commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r829394790
##########
File path: aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogTable.java
##########
@@ -74,6 +74,8 @@ public void testCreateTable() {
Assert.assertTrue(response.table().parameters().containsKey(BaseMetastoreTableOperations.METADATA_LOCATION_PROP));
Assert.assertEquals(schema.columns().size(), response.table().storageDescriptor().columns().size());
Assert.assertEquals(partitionSpec.fields().size(), response.table().partitionKeys().size());
+ Assert.assertEquals("additionalLocations should match", tableLocationProperties.values(),
Review comment:
yes I checked running the test case against master right now it passes :
```shell
pk/iceberg - (master) > ./gradlew :iceberg-aws:integrationTest --tests "org.apache.iceberg.aws.glue.TestGlueCatalogTable"
BUILD SUCCESSFUL in 1m 44s
14 actionable tasks: 1 executed, 13 up-to-date
```
Looks like the order is of the output is messed up are you testing this in your branch ? if yes some change might have caused the diff in order of keys of HashMap.
##########
File path: aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogTable.java
##########
@@ -74,6 +74,8 @@ public void testCreateTable() {
Assert.assertTrue(response.table().parameters().containsKey(BaseMetastoreTableOperations.METADATA_LOCATION_PROP));
Assert.assertEquals(schema.columns().size(), response.table().storageDescriptor().columns().size());
Assert.assertEquals(partitionSpec.fields().size(), response.table().partitionKeys().size());
+ Assert.assertEquals("additionalLocations should match", tableLocationProperties.values(),
Review comment:
This is very strange, if possible can you please share the java version you are in.
P.S thankyou for making the change to fix it, have added a feedback, do let me know what you think of it,
--
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 commented on a change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
jackye1995 commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r818320899
##########
File path: aws/src/main/java/org/apache/iceberg/aws/glue/IcebergToGlueConverter.java
##########
@@ -60,6 +65,18 @@ private IcebergToGlueConverter() {
public static final String ICEBERG_FIELD_ID = "iceberg.field.id";
public static final String ICEBERG_FIELD_OPTIONAL = "iceberg.field.optional";
public static final String ICEBERG_FIELD_CURRENT = "iceberg.field.current";
+ private static final List<String> PROPERTIES_FOR_GLUE_ADDITIONAL_LOCATIONS = ImmutableList.of(
Review comment:
variable name a bit convoluted, what about `ADDITIONAL_LOCATION_PROPERTIES`
--
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] singhpk234 commented on a change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
singhpk234 commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r817664987
##########
File path: aws/src/test/java/org/apache/iceberg/aws/glue/TestIcebergToGlueConverter.java
##########
@@ -40,6 +42,11 @@
public class TestIcebergToGlueConverter {
+ private final Map<String, String> tableMetaDataProperties = ImmutableMap.of(
+ TableProperties.WRITE_DATA_LOCATION, "s3://writeDataLoc",
+ TableProperties.WRITE_METADATA_LOCATION, "s3://writeMetaDataLoc",
+ TableProperties.WRITE_FOLDER_STORAGE_LOCATION, "s3://writeFolderStorageLoc");
Review comment:
I think, null as value is handled here we only have 3 keys ... rather than [4](https://github.com/apache/iceberg/pull/4248/files#diff-b97b3e8bad418d1e6cdee1bc8b35c5db6f5df45b8d714c8640b51532bc86ecfbR68)
4th Key i.e `TableProperties.OBJECT_STORE_PATH` is not present in this hashMap hence we will get Null when we do a hashMap lookup and it will be filtered out and not sent in additionalLocations.
--
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] singhpk234 commented on a change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
singhpk234 commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r817329038
##########
File path: aws/src/main/java/org/apache/iceberg/aws/glue/IcebergToGlueConverter.java
##########
@@ -175,12 +185,25 @@ static void validateTableIdentifier(TableIdentifier tableIdentifier) {
* and should never be used by any query processing engine to infer information like schema, partition spec, etc.
* The source of truth is stored in the actual Iceberg metadata file defined by the metadata_location table property.
* @param tableInputBuilder Glue TableInput builder
+ * @param tableProps Table properties
* @param metadata Iceberg table metadata
*/
- static void setTableInputInformation(TableInput.Builder tableInputBuilder, TableMetadata metadata) {
+ static void setTableInputInformation(
+ TableInput.Builder tableInputBuilder,
+ Map<String, String> tableProps,
+ TableMetadata metadata) {
try {
+ StorageDescriptor.Builder storageDescriptor = StorageDescriptor.builder();
+ if (!ADDITIONAL_LOCATIONS.isNoop()) {
+ ADDITIONAL_LOCATIONS.invoke(storageDescriptor.additionalLocations(),
+ ImmutableList.of(
Review comment:
+1
checked ImmutableList.of() fails with null values...
- updated test case as well where in the additionalLocations the properties we are fetching values from is not present.
replaced this with location's with not null filtering, as it's not worth storing null as well.
```java
private static final List<String> PROPERTIES_FOR_GLUE_ADDITIONAL_LOCATIONS = ImmutableList.of(
TableProperties.WRITE_DATA_LOCATION,
TableProperties.WRITE_METADATA_LOCATION,
TableProperties.OBJECT_STORE_PATH,
TableProperties.WRITE_FOLDER_STORAGE_LOCATION
);
private static Set<String> getAdditionalLocations(TableMetadata tableMetadata) {
return PROPERTIES_FOR_GLUE_ADDITIONAL_LOCATIONS.stream()
.map(tableMetadata.properties()::get)
.filter(Objects::nonNull)
.collect(Collectors.toSet());
}
```
--
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] singhpk234 edited a comment on pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
singhpk234 edited a comment on pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#issuecomment-1057976891
Thanks @jackye1995 !!
updated the integration Test for the same and verified it by running locally
--
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 change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
xiaoxuandev commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r829380910
##########
File path: aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogTable.java
##########
@@ -74,6 +74,8 @@ public void testCreateTable() {
Assert.assertTrue(response.table().parameters().containsKey(BaseMetastoreTableOperations.METADATA_LOCATION_PROP));
Assert.assertEquals(schema.columns().size(), response.table().storageDescriptor().columns().size());
Assert.assertEquals(partitionSpec.fields().size(), response.table().partitionKeys().size());
+ Assert.assertEquals("additionalLocations should match", tableLocationProperties.values(),
Review comment:
Is this test passing? it fails on my side with:
Expected :[s3://xioxuan-test/writeDataLoc, s3://xioxuan-test/writeMetaDataLoc, s3://xioxuan-test/writeFolderStorageLoc]
Actual :[s3://xioxuan-test/writeMetaDataLoc, s3://xioxuan-test/writeDataLoc, s3://xioxuan-test/writeFolderStorageLoc]
--
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] singhpk234 commented on a change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
singhpk234 commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r817329038
##########
File path: aws/src/main/java/org/apache/iceberg/aws/glue/IcebergToGlueConverter.java
##########
@@ -175,12 +185,25 @@ static void validateTableIdentifier(TableIdentifier tableIdentifier) {
* and should never be used by any query processing engine to infer information like schema, partition spec, etc.
* The source of truth is stored in the actual Iceberg metadata file defined by the metadata_location table property.
* @param tableInputBuilder Glue TableInput builder
+ * @param tableProps Table properties
* @param metadata Iceberg table metadata
*/
- static void setTableInputInformation(TableInput.Builder tableInputBuilder, TableMetadata metadata) {
+ static void setTableInputInformation(
+ TableInput.Builder tableInputBuilder,
+ Map<String, String> tableProps,
+ TableMetadata metadata) {
try {
+ StorageDescriptor.Builder storageDescriptor = StorageDescriptor.builder();
+ if (!ADDITIONAL_LOCATIONS.isNoop()) {
+ ADDITIONAL_LOCATIONS.invoke(storageDescriptor.additionalLocations(),
+ ImmutableList.of(
Review comment:
+1
checked ImmutableList.of() fails with null values...
- updated test case as well where in the additionalLocations the properties we are fetching values from is not present.
replaced this with location's with not null filtering, as it's not worth storing null as well.
```java
private static final List<String> PROPERTIES_FOR_GLUE_ADDITIONAL_LOCATIONS = ImmutableList.of(
TableProperties.WRITE_DATA_LOCATION,
TableProperties.WRITE_METADATA_LOCATION,
TableProperties.OBJECT_STORE_PATH,
TableProperties.WRITE_FOLDER_STORAGE_LOCATION
);
private static List<String> getAdditionalLocations(TableMetadata tableMetadata) {
return PROPERTIES_FOR_GLUE_ADDITIONAL_LOCATIONS.stream()
.map(tableMetadata.properties()::get)
.filter(Objects::nonNull)
.collect(Collectors.toList());
}
```
--
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 change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
xiaoxuandev commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r829400828
##########
File path: aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogTable.java
##########
@@ -74,6 +74,8 @@ public void testCreateTable() {
Assert.assertTrue(response.table().parameters().containsKey(BaseMetastoreTableOperations.METADATA_LOCATION_PROP));
Assert.assertEquals(schema.columns().size(), response.table().storageDescriptor().columns().size());
Assert.assertEquals(partitionSpec.fields().size(), response.table().partitionKeys().size());
+ Assert.assertEquals("additionalLocations should match", tableLocationProperties.values(),
Review comment:
Yes. I am testing is against master branch. Let me double check.
##########
File path: aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogTable.java
##########
@@ -74,6 +74,8 @@ public void testCreateTable() {
Assert.assertTrue(response.table().parameters().containsKey(BaseMetastoreTableOperations.METADATA_LOCATION_PROP));
Assert.assertEquals(schema.columns().size(), response.table().storageDescriptor().columns().size());
Assert.assertEquals(partitionSpec.fields().size(), response.table().partitionKeys().size());
+ Assert.assertEquals("additionalLocations should match", tableLocationProperties.values(),
Review comment:
it is still failing when I run clean build on master branch. I added this fix and it works. https://github.com/apache/iceberg/pull/4355
--
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 change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
xiaoxuandev commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r829440874
##########
File path: aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogTable.java
##########
@@ -74,6 +74,8 @@ public void testCreateTable() {
Assert.assertTrue(response.table().parameters().containsKey(BaseMetastoreTableOperations.METADATA_LOCATION_PROP));
Assert.assertEquals(schema.columns().size(), response.table().storageDescriptor().columns().size());
Assert.assertEquals(partitionSpec.fields().size(), response.table().partitionKeys().size());
+ Assert.assertEquals("additionalLocations should match", tableLocationProperties.values(),
Review comment:
openjdk version "1.8.0_322"
--
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] singhpk234 commented on pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
singhpk234 commented on pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#issuecomment-1057976891
Thanks @jackye1995 !!
- updated the integration Test for the same and verified it by running locally
---
ready for another pass
--
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 change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
xiaoxuandev commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r829380910
##########
File path: aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogTable.java
##########
@@ -74,6 +74,8 @@ public void testCreateTable() {
Assert.assertTrue(response.table().parameters().containsKey(BaseMetastoreTableOperations.METADATA_LOCATION_PROP));
Assert.assertEquals(schema.columns().size(), response.table().storageDescriptor().columns().size());
Assert.assertEquals(partitionSpec.fields().size(), response.table().partitionKeys().size());
+ Assert.assertEquals("additionalLocations should match", tableLocationProperties.values(),
Review comment:
Is this test passing? it fails on my side with:
Expected :[s3://xioxuan-test/writeDataLoc, s3://xioxuan-test/writeMetaDataLoc, s3://xioxuan-test/writeFolderStorageLoc]
Actual :[s3://xioxuan-test/writeMetaDataLoc, s3://xioxuan-test/writeDataLoc, s3://xioxuan-test/writeFolderStorageLoc]
##########
File path: aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogTable.java
##########
@@ -74,6 +74,8 @@ public void testCreateTable() {
Assert.assertTrue(response.table().parameters().containsKey(BaseMetastoreTableOperations.METADATA_LOCATION_PROP));
Assert.assertEquals(schema.columns().size(), response.table().storageDescriptor().columns().size());
Assert.assertEquals(partitionSpec.fields().size(), response.table().partitionKeys().size());
+ Assert.assertEquals("additionalLocations should match", tableLocationProperties.values(),
Review comment:
https://github.com/apache/iceberg/pull/4355
##########
File path: aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogTable.java
##########
@@ -74,6 +74,8 @@ public void testCreateTable() {
Assert.assertTrue(response.table().parameters().containsKey(BaseMetastoreTableOperations.METADATA_LOCATION_PROP));
Assert.assertEquals(schema.columns().size(), response.table().storageDescriptor().columns().size());
Assert.assertEquals(partitionSpec.fields().size(), response.table().partitionKeys().size());
+ Assert.assertEquals("additionalLocations should match", tableLocationProperties.values(),
Review comment:
Yes. I am testing is against master branch. Let me double check again.
##########
File path: aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogTable.java
##########
@@ -74,6 +74,8 @@ public void testCreateTable() {
Assert.assertTrue(response.table().parameters().containsKey(BaseMetastoreTableOperations.METADATA_LOCATION_PROP));
Assert.assertEquals(schema.columns().size(), response.table().storageDescriptor().columns().size());
Assert.assertEquals(partitionSpec.fields().size(), response.table().partitionKeys().size());
+ Assert.assertEquals("additionalLocations should match", tableLocationProperties.values(),
Review comment:
Yes. I am testing is against master branch. Let me double check.
##########
File path: aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogTable.java
##########
@@ -74,6 +74,8 @@ public void testCreateTable() {
Assert.assertTrue(response.table().parameters().containsKey(BaseMetastoreTableOperations.METADATA_LOCATION_PROP));
Assert.assertEquals(schema.columns().size(), response.table().storageDescriptor().columns().size());
Assert.assertEquals(partitionSpec.fields().size(), response.table().partitionKeys().size());
+ Assert.assertEquals("additionalLocations should match", tableLocationProperties.values(),
Review comment:
it is still failing when I run clean build on master branch. I added this fix and it works. https://github.com/apache/iceberg/pull/4355
##########
File path: aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogTable.java
##########
@@ -74,6 +74,8 @@ public void testCreateTable() {
Assert.assertTrue(response.table().parameters().containsKey(BaseMetastoreTableOperations.METADATA_LOCATION_PROP));
Assert.assertEquals(schema.columns().size(), response.table().storageDescriptor().columns().size());
Assert.assertEquals(partitionSpec.fields().size(), response.table().partitionKeys().size());
+ Assert.assertEquals("additionalLocations should match", tableLocationProperties.values(),
Review comment:
openjdk version "1.8.0_322"
--
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] rajarshisarkar commented on a change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
rajarshisarkar commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r816702446
##########
File path: aws/src/main/java/org/apache/iceberg/aws/glue/GlueTableOperations.java
##########
@@ -70,6 +73,12 @@
.orNoop()
.build();
+ // Attempt to set additionalLocations if available on the given AWS SDK version
+ private static final DynMethods.UnboundMethod ADDITIONAL_LOCATIONS = DynMethods.builder("additionalLocations")
+ .hiddenImpl("software.amazon.awssdk.services.glue.model.UpdateTableRequest$Builder", List.class)
Review comment:
`additionalLocations` should be in `software.amazon.awssdk.services.glue.model.StorageDescriptor`.
--
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] rajarshisarkar commented on a change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
rajarshisarkar commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r816712314
##########
File path: aws/src/main/java/org/apache/iceberg/aws/glue/GlueTableOperations.java
##########
@@ -70,6 +73,12 @@
.orNoop()
.build();
+ // Attempt to set additionalLocations if available on the given AWS SDK version
+ private static final DynMethods.UnboundMethod ADDITIONAL_LOCATIONS = DynMethods.builder("additionalLocations")
+ .hiddenImpl("software.amazon.awssdk.services.glue.model.UpdateTableRequest$Builder", List.class)
Review comment:
In that case, we set the `StorageDescriptor` only in `IcebergToGlueConverter` class.
--
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] rajarshisarkar commented on a change in pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
rajarshisarkar commented on a change in pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#discussion_r816722985
##########
File path: aws/src/main/java/org/apache/iceberg/aws/glue/GlueTableOperations.java
##########
@@ -207,6 +216,15 @@ void persistGlueTable(Table glueTable, Map<String, String> parameters, TableMeta
SET_VERSION_ID.invoke(updateTableRequest, glueTable.versionId());
}
+ if (!ADDITIONAL_LOCATIONS.isNoop()) {
+ ADDITIONAL_LOCATIONS.invoke(updateTableRequest,
Review comment:
Also, is `additionalLocations` available in the previous SDK version? We might not need reflection in that case.
--
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] singhpk234 commented on pull request #4248: AWS : use additionalLocations in glue table to store location info
Posted by GitBox <gi...@apache.org>.
singhpk234 commented on pull request #4248:
URL: https://github.com/apache/iceberg/pull/4248#issuecomment-1055524088
cc: @jackye1995 @rajarshisarkar @arminnajafi @amogh-jahagirdar @xiaoxuandev @yyanyy
--
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