Improve Id serialization
Description
Release Notes
None
blocks
is duplicated by
relates to
Activity
Show:

Sreevatsan Raman June 8, 2020 at 8:28 PM
Marking as Won't fix since the bug is too old/

Alvin Wang October 21, 2015 at 11:15 PM
Minor cleanup https://github.com/caskdata/cdap/pull/4361

Alvin Wang October 16, 2015 at 10:17 PM
Yes, we aren't yet using the new ID classes for JSON. I'll try to fix all the inconsistencies in the PR that makes the JSON changes.
Ajai Narayanan October 16, 2015 at 9:07 PMEdited
Right now this is what I get for each entity. I am still seeing minor inconsistencies in types. "program", "application" and "stream" are lower case and "Flow", "Mapreduce", "Workflows", "Service" are all camelcase. And dataset seems to be totally different in that is returned as "datasetinstance" Are these supposed to change?
Ajai Narayanan October 16, 2015 at 9:06 PM
or is it possible to provide a response that we get specific for each entity's tags? (searching for tags for each entity-type)?
Won't Fix
Pinned fields
Click on the next to a field label to start pinning.
Details
Details
Assignee

Reporter

Affects versions
Components
Priority
Created September 14, 2015 at 8:40 AM
Updated June 8, 2020 at 8:28 PM
Resolved June 8, 2020 at 8:28 PM
Few issues with our Id serialization -
Flow
toString()
returns "flow.default.app1.flow1", whereas dataset instancetoString()
returns "namespace:default/datasetinstance:dataset1".The JSON representation of an id is too verbose. For instance, Flow gets serialized as -
Also, Flow get serialized differently when it is serialized as
Id.NamespacedId
-