Truncating a PartitionedFileSet either causes the base directories group to change, or truncation fails. The two scenarios are defined below.
1) Scenario 1 – truncate an empty dataset
From cdap ui, find the dataset and do the truncate. If the dataset is currently empty, the truncate will reset the group id to cdap. For example, the Bridge_Opt is empty, and its group id is d1sbprst. After truncation, the group set to cdap by the cdap.
drwxr-xr-x - d1ingest d1sbprst 0 2017-08-07 18:43 /d1/stg/msubprf_stg/jw769dX2/bridge_opt
drwxr-xr-x - d1ingest cdap 0 2017-08-07 18:43 /d1/stg/msubprf_stg/jw769dX2/bridge_opt
subsequent ingestion will fail because the group changed.
2) Scenario 2 – truncate a dataset which in not empty
if the dataset is not empty, the truncation will cause server error. the data will not be truncated.