ambry icon indicating copy to clipboard operation
ambry copied to clipboard

Add support in the Router and Admin to get data chunk blob id list of a composite blob.

Open pnarayanan opened this issue 8 years ago • 5 comments

This enhancement should allow us to

  1. get the list of blob ids of the constituent data chunks of a composite blob.
  2. determine if a given blob id is an id of a composite blob (blob is simple if 1. returns a non-empty list; composite otherwise).

This should work even for deleted/expired blob ids.

pnarayanan avatar Jan 20 '17 20:01 pnarayanan

Great idea ! Do you have any ideas on how this can integrated into the Router API? Are you thinking of a new API or modifications to the return type of the existing GetBlob API?

vgkholla avatar Jan 20 '17 21:01 vgkholla

My prototype for this is working.

The idea is

  1. add new operationType(subBlobKeys) to GetBlobOptions
  2. by existing GetBlobOptionsInternal.getChunkIdsOnly to differentiate data request and subBlobKeys request.
  3. add storeKeys(existing class) to GetBlobResult.BlobInfo so that we can return it in the final stage.

The request url is host:port/ambryid/SubBlobKeys.

Let me know if any suggestion.

zzmao avatar Dec 15 '17 19:12 zzmao

@zzmao sounds good overall. Just wondering if GetBlobResult will need any change at all. Go ahead and put up the PR and we can discuss these there.

pnarayanan avatar Dec 16 '17 17:12 pnarayanan

I wonder if you can simply change GetBlobResultInternal into GetBlobResult?

Also, let's have a more descriptive name than SubBlobKeys. ChunkBlobIds seems more in line with the terminology we use.

vgkholla avatar Dec 16 '17 17:12 vgkholla

Will do PR soon.

zzmao avatar Dec 18 '17 18:12 zzmao