This will create a plan for an array that can be later used during consolidation. The desired fragment size gives the maximum size for a fragment. The maximum fragment size will be used to find fragments that are already too large and should be split as well as fragments that are too small and should be combined. The value should be used as is in the consolidation parameters ("sm.consolidation.max_fragment_size") when running the different nodes. The plan divides the fragments of the array into different nodes that need to be consolidated together. The plan is created as follows:
The code snippets above also shows how to print the different nodes with the fragment URIs they contain. The list of fragments can be passed into the tiledb_array_consolidate_fragments API. Note that at the moment there is no CPP API that allows to consolidate a list of fragments.