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 2020/11/13 05:17:31 UTC
[GitHub] [iceberg] 397090770 opened a new issue #1764: Deleting the table should also delete the previous metadata files
397090770 opened a new issue #1764:
URL: https://github.com/apache/iceberg/issues/1764
Currently, Iceberg only deletes the latest metadata file when deleting a table, eg. Before deleting the table, the data directory of the table is as follows:
```
⇒ tree /data/hive/warehouse/test/
/data/hive/warehouse/test/
├── data
│ └── ts_year=2020
│ ├── id_bucket=0
│ │ ├── 00000-0-4718ae1d-ee92-4a39-9c00-6225e791cc68-00001.parquet
│ │ ├── 00000-0-88059c29-5b0d-44da-a7e2-fd886f6ff04a-00001.parquet
│ │ ├── 00001-1-5ea45c12-b7e4-47f3-8fc3-c12849679b9f-00002.parquet
│ │ └── 00001-1-6c8baddb-d0dc-4c49-9d89-75e3c55bac83-00002.parquet
│ └── id_bucket=1
│ ├── 00001-1-5ea45c12-b7e4-47f3-8fc3-c12849679b9f-00001.parquet
│ └── 00001-1-6c8baddb-d0dc-4c49-9d89-75e3c55bac83-00001.parquet
└── metadata
├── 00000-aaa7a3d5-bb25-4d07-b28c-1e9b63ef8380.metadata.json
├── 00001-77ec6836-5709-44d6-a8aa-405588cc93df.metadata.json
├── 00002-21692627-9ba1-47ef-8729-d9cd96533ba5.metadata.json
├── 57b07bcc-e3a1-4684-a2b3-26263f2b0535-m0.avro
├── bff1d409-7d63-4b33-9d10-d7ebe7efe65c-m0.avro
├── snap-2855480055257649189-1-57b07bcc-e3a1-4684-a2b3-26263f2b0535.avro
└── snap-8307457369176907400-1-bff1d409-7d63-4b33-9d10-d7ebe7efe65c.avro
5 directories, 13 files
```
after drop table, the data directory of the table is as follows:
```
⇒ tree /data/hive/warehouse/test/
/data/hive/warehouse/test/
├── data
│ └── ts_year=2020
│ ├── id_bucket=0
│ └── id_bucket=1
└── metadata
├── 00000-aaa7a3d5-bb25-4d07-b28c-1e9b63ef8380.metadata.json
└── 00001-77ec6836-5709-44d6-a8aa-405588cc93df.metadata.json
5 directories, 2 files
```
I think the other two meta files should also be deleted, because these files are actually useless.
----------------------------------------------------------------
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.
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] zhangdove commented on issue #1764: Deleting the table should also delete the previous metadata files
Posted by GitBox <gi...@apache.org>.
zhangdove commented on issue #1764:
URL: https://github.com/apache/iceberg/issues/1764#issuecomment-734125149
Yes, here's what I tested:
1.drop iceberg table by hive catalog, left some table directories.
2.drop iceberg table by hadoop catalog, it's normal(the directory will be deleted).
----------------------------------------------------------------
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.
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] zhangdove commented on issue #1764: Deleting the table should also delete the previous metadata files
Posted by GitBox <gi...@apache.org>.
zhangdove commented on issue #1764:
URL: https://github.com/apache/iceberg/issues/1764#issuecomment-732798161
Can you share your Iceberg version and how it works? I have tested locally that using `Spark.sql (" drop table hadoop_prod.db.tb ")` can delete table directories.
----------------------------------------------------------------
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.
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] rdblue commented on issue #1764: When using hiveCatalog.dropTable(identifier, true), the table directory is not completely removed
Posted by GitBox <gi...@apache.org>.
rdblue commented on issue #1764:
URL: https://github.com/apache/iceberg/issues/1764#issuecomment-736855702
@zhangdove, there is no requirement in Iceberg that a table "owns" its location. The intent of not recursively deleting was to avoid dropping other data in the same prefix. I think it would be fine to drop the location recursively in some cases. Maybe that should be a catalog option?
----------------------------------------------------------------
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.
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] 397090770 commented on issue #1764: Deleting the table should also delete the previous metadata files
Posted by GitBox <gi...@apache.org>.
397090770 commented on issue #1764:
URL: https://github.com/apache/iceberg/issues/1764#issuecomment-734027292
Hi @zhangdove, `Spark.sql (" drop table hadoop_prod.db.tb ")` can delete table directories, but `catalog.dropTable(name)` cannot completely delete table directories.
----------------------------------------------------------------
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.
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] 397090770 commented on issue #1764: Deleting the table should also delete the previous metadata files
Posted by GitBox <gi...@apache.org>.
397090770 commented on issue #1764:
URL: https://github.com/apache/iceberg/issues/1764#issuecomment-734128018
Thanks for your reply, I will submit an RP to make these behaviors consistent.
----------------------------------------------------------------
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.
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] zhangdove commented on issue #1764: Deleting the table should also delete the previous metadata files
Posted by GitBox <gi...@apache.org>.
zhangdove commented on issue #1764:
URL: https://github.com/apache/iceberg/issues/1764#issuecomment-734169841
@rdblue I was wondering if the community, in its initial design #350 , kept the directory of data and metadata as an external data source, not allowing Iceberg or Hive's API to directly delete the directory files, in the same way as Hive's external attributes?
----------------------------------------------------------------
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.
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