Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-1646

V1 and V2 GET entity response show different values for date attribute of a tag which has no value set.

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8-incubating
    • Fix Version/s: 0.8-incubating
    • Component/s: atlas-core
    • Labels:
      None

      Description

      Created a tag with date as attribute and POSTed to /api/atlas/types. Associated the tag to an entity with no value for date through REST API. Association is successful .V1 GET Entity API shows 1970-01-01T00:00:00.000Z as value for date and V2 GET Entity API shows 0 as value for date.

      V1 API :

      /api/atlas/entities/b10e3c49-af76-4585-893e-c7de6a97ad9b
      
      {
      	requestId: "pool-2-thread-9 - 2c83885c-166b-418c-a7ac-441e1b68d3f2",
      	definition: {
      		jsonClass: "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
      		id: {
      			jsonClass: "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
      			id: "b10e3c49-af76-4585-893e-c7de6a97ad9b",
      			version: 0,
      			typeName: "EntityTraitTestClasshqorbbnkkx",
      			state: "ACTIVE"
      		},
      		typeName: "EntityTraitTestClasshqorbbnkkx",
      		values: {
      			name: "EntityTraitTestEntity9psmssjmyp"
      		},
      		traitNames: [
      			"addTraitOptionalAttrNotSet9psmssjmyp"
      		],
      		traits: {
      			addTraitOptionalAttrNotSet9psmssjmyp: {
      				jsonClass: "org.apache.atlas.typesystem.json.InstanceSerialization$_Struct",
      				typeName: "addTraitOptionalAttrNotSet9psmssjmyp",
      				values: {
      					date: "1970-01-01T00:00:00.000Z",
      					name: "addTraitOptionalAttrName"
      				}
      			}
      		},
      		systemAttributes: {
      			createdBy: "admin",
      			modifiedBy: "admin",
      			createdTime: "2017-03-06T13:08:37.666Z",
      			modifiedTime: "2017-03-06T13:08:37.666Z"
      		}
      	}
      }
      

      V2 API response

      /api/atlas/v2/entity/guid/b10e3c49-af76-4585-893e-c7de6a97ad9b
      
      {
      	referredEntities: {},
      	entity: {
      		typeName: "EntityTraitTestClasshqorbbnkkx",
      		attributes: {
      			name: "EntityTraitTestEntity9psmssjmyp"
      		},
      		guid: "b10e3c49-af76-4585-893e-c7de6a97ad9b",
      		status: "ACTIVE",
      		createdBy: "admin",
      		updatedBy: "admin",
      		createTime: 1488805717666,
      		updateTime: 1488805717666,
      		version: 0,
      		classifications: [{
      			typeName: "addTraitOptionalAttrNotSet9psmssjmyp",
      			attributes: {
      				date: 0,
      				name: "addTraitOptionalAttrName"
      			}
      		}]
      	}
      }
      

        Attachments

          Activity

            People

            • Assignee:
              amestry Ashutosh Mestry
              Reporter:
              sharmadhas Sharmadha S

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment