[
https://issues.apache.org/jira/browse/ATLAS-1143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15446515#comment-15446515
]
Ayub Khan commented on ATLAS-1143:
----------------------------------
[~bbonnet] From the stack trace, the failure is happening when a REQUIRED
attribute "parameters" is set to NULL, which is not expected as per the code.
{noformat}
Caused by:
org.apache.atlas.typesystem.types.ValueConversionException$NullConversionException:
Null value not allowed for multiplicty {lower=1, upper=1, isUnique=false}
at
org.apache.atlas.typesystem.types.DataTypes$PrimitiveType.convertNull(DataTypes.java:105)
{noformat}
But, as per the hive-data-model.json, "parameters" attribute should be
OPTIONAL(https://github.com/apache/incubator-atlas/blob/master/src/main/examples/hive-data-model.json#L141)
which is not the case in the above stack trace.
To me, it looks like the data model registered with Atlas is obsolete. So I
would request you fire this http
request(http://<ATLAS_IP_ADDRESS>:<PORT>/api/atlas/types/hive_table) against
your Atlas instance and paste the response. This will give us the details about
hive data model registered.
> Fail to create hive_table entity with void comment
> --------------------------------------------------
>
> Key: ATLAS-1143
> URL: https://issues.apache.org/jira/browse/ATLAS-1143
> Project: Atlas
> Issue Type: Bug
> Affects Versions: 0.7-incubating
> Reporter: Benjamin BONNET
>
> Atlas server fails to create a hive_table entity representing a Hive table
> taht was created with an empty comment. No comment at all is ok, but a ''
> comment will lead to that error log :
> {code}
> 2016-08-19 15:23:11,143 INFO - [NotificationHookConsumer thread-0:] ~
> updating entities {
>
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
> "id":{
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
> "id":"-870799112922",
> "version":0,
> "typeName":"hive_db",
> "state":"ACTIVE"
> },
> "typeName":"hive_db",
> "values":{
> "name":"default",
> "location":"hdfs://sandbox.hortonworks.com:8020/apps/hive/warehouse",
> "description":"Default Hive database",
> "ownerType":2,
> "qualifiedName":"default@Sandbox",
> "owner":"public",
> "clusterName":"Sandbox",
> "parameters":{
> }
> },
> "traitNames":[
> ],
> "traits":{
> }
> },{
>
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
> "id":{
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
> "id":"-870922191414",
> "version":0,
> "typeName":"hive_table",
> "state":"ACTIVE"
> },
> "typeName":"hive_table",
> "values":{
> "tableType":"MANAGED_TABLE",
> "name":"toto",
> "createTime":"2016-08-19T15:23:09.000Z",
> "temporary":false,
> "db":{
>
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
> "id":{
>
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
> "id":"-870799112922",
> "version":0,
> "typeName":"hive_db",
> "state":"ACTIVE"
> },
> "typeName":"hive_db",
> "values":{
> "name":"default",
> "location":"hdfs://sandbox.hortonworks.com:8020/apps/hive/warehouse",
> "description":"Default Hive database",
> "ownerType":2,
> "qualifiedName":"default@Sandbox",
> "owner":"public",
> "clusterName":"Sandbox",
> "parameters":{
> }
> },
> "traitNames":[
> ],
> "traits":{
> }
> },
> "retention":0,
> "qualifiedName":"default.toto@Sandbox",
> "columns":[
> {
>
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
> "id":{
>
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
> "id":"-870922398553",
> "version":0,
> "typeName":"hive_column",
> "state":"ACTIVE"
> },
> "typeName":"hive_column",
> "values":{
> "qualifiedName":"default.toto.valeur@Sandbox",
> "type":"string",
> "name":"valeur",
> "table":{
>
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
> "id":"-870922191414",
> "version":0,
> "typeName":"hive_table",
> "state":"ACTIVE"
> }
> },
> "traitNames":[
> ],
> "traits":{
> }
> }
> ],
> "comment":"",
> "lastAccessTime":"2016-08-19T15:23:09.000Z",
> "sd":{
>
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
> "id":{
>
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
> "id":"-870922339393",
> "version":0,
> "typeName":"hive_storagedesc",
> "state":"ACTIVE"
> },
> "typeName":"hive_storagedesc",
> "values":{
>
> "location":"hdfs://sandbox.hortonworks.com:8020/apps/hive/warehouse/toto",
> "serdeInfo":{
>
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Struct",
> "typeName":"hive_serde",
> "values":{
>
> "serializationLib":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe",
> "parameters":{
> "serialization.format":"1"
> }
> }
> },
> "qualifiedName":"default.toto@Sandbox_storage",
>
> "outputFormat":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat",
> "compressed":false,
> "numBuckets":-1,
> "inputFormat":"org.apache.hadoop.mapred.TextInputFormat",
> "parameters":{
> },
> "storedAsSubDirectories":false,
> "table":{
>
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
> "id":"-870922191414",
> "version":0,
> "typeName":"hive_table",
> "state":"ACTIVE"
> }
> },
> "traitNames":[
> ],
> "traits":{
> }
> },
> "parameters":{
> "comment":"",
> "transient_lastDdlTime":"1471620189"
> },
> "partitionKeys":[
> ]
> },
> "traitNames":[
> ],
> "traits":{
> }
> } (EntityResource:192)
> 2016-08-19 15:23:11,160 ERROR - [NotificationHookConsumer thread-0:] ~ Unable
> to persist entity instance due to a deserialization error entityDef={
>
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
> "id":{
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
> "id":"-870799112922",
> "version":0,
> "typeName":"hive_db",
> "state":"ACTIVE"
> },
> "typeName":"hive_db",
> "values":{
> "name":"default",
> "location":"hdfs://sandbox.hortonworks.com:8020/apps/hive/warehouse",
> "description":"Default Hive database",
> "ownerType":2,
> "qualifiedName":"default@Sandbox",
> "owner":"public",
> "clusterName":"Sandbox",
> "parameters":{
> }
> },
> "traitNames":[
> ],
> "traits":{
> }
> },{
>
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
> "id":{
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
> "id":"-870922191414",
> "version":0,
> "typeName":"hive_table",
> "state":"ACTIVE"
> },
> "typeName":"hive_table",
> "values":{
> "tableType":"MANAGED_TABLE",
> "name":"toto",
> "createTime":"2016-08-19T15:23:09.000Z",
> "temporary":false,
> "db":{
>
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
> "id":{
>
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
> "id":"-870799112922",
> "version":0,
> "typeName":"hive_db",
> "state":"ACTIVE"
> },
> "typeName":"hive_db",
> "values":{
> "name":"default",
> "location":"hdfs://sandbox.hortonworks.com:8020/apps/hive/warehouse",
> "description":"Default Hive database",
> "ownerType":2,
> "qualifiedName":"default@Sandbox",
> "owner":"public",
> "clusterName":"Sandbox",
> "parameters":{
> }
> },
> "traitNames":[
> ],
> "traits":{
> }
> },
> "retention":0,
> "qualifiedName":"default.toto@Sandbox",
> "columns":[
> {
>
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
> "id":{
>
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
> "id":"-870922398553",
> "version":0,
> "typeName":"hive_column",
> "state":"ACTIVE"
> },
> "typeName":"hive_column",
> "values":{
> "qualifiedName":"default.toto.valeur@Sandbox",
> "type":"string",
> "name":"valeur",
> "table":{
>
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
> "id":"-870922191414",
> "version":0,
> "typeName":"hive_table",
> "state":"ACTIVE"
> }
> },
> "traitNames":[
> ],
> "traits":{
> }
> }
> ],
> "comment":"",
> "lastAccessTime":"2016-08-19T15:23:09.000Z",
> "sd":{
>
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
> "id":{
>
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
> "id":"-870922339393",
> "version":0,
> "typeName":"hive_storagedesc",
> "state":"ACTIVE"
> },
> "typeName":"hive_storagedesc",
> "values":{
>
> "location":"hdfs://sandbox.hortonworks.com:8020/apps/hive/warehouse/toto",
> "serdeInfo":{
>
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Struct",
> "typeName":"hive_serde",
> "values":{
>
> "serializationLib":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe",
> "parameters":{
> "serialization.format":"1"
> }
> }
> },
> "qualifiedName":"default.toto@Sandbox_storage",
>
> "outputFormat":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat",
> "compressed":false,
> "numBuckets":-1,
> "inputFormat":"org.apache.hadoop.mapred.TextInputFormat",
> "parameters":{
> },
> "storedAsSubDirectories":false,
> "table":{
>
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
> "id":"-870922191414",
> "version":0,
> "typeName":"hive_table",
> "state":"ACTIVE"
> }
> },
> "traitNames":[
> ],
> "traits":{
> }
> },
> "parameters":{
> "comment":"",
> "transient_lastDdlTime":"1471620189"
> },
> "partitionKeys":[
> ]
> },
> "traitNames":[
> ],
> "traits":{
> }
> } (EntityResource:203)
> org.apache.atlas.typesystem.types.ValueConversionException: Cannot convert
> value '{Id='(type: hive_table, id: <unassigned>)', traits=[],
> values={db={Id='(type: hive_db, id: <unassigned>)', traits=[],
> values={clusterName=Sandbox,
> location=hdfs://sandbox.hortonworks.com:8020/apps/hive/warehouse,
> description=Default Hive database, qualifiedName=default@Sandbox,
> ownerType=2, name=default, owner=public, parameters={}}},
> createTime=2016-08-19T15:23:09.000Z, lastAccessTime=2016-08-19T15:23:09.000Z,
> qualifiedName=default.toto@Sandbox, sd={Id='(type: hive_storagedesc, id:
> <unassigned>)', traits=[], values={compressed=false,
> serdeInfo=org.apache.atlas.typesystem.Struct@b4698dcb,
> location=hdfs://sandbox.hortonworks.com:8020/apps/hive/warehouse/toto,
> outputFormat=org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat,
> qualifiedName=default.toto@Sandbox_storage, storedAsSubDirectories=false,
> numBuckets=-1, inputFormat=org.apache.hadoop.mapred.TextInputFormat,
> table=(type: hive_table, id: <unassigned>), parameters={}}},
> columns=[{Id='(type: hive_column, id: <unassigned>)', traits=[],
> values={name=valeur, qualifiedName=default.toto.valeur@Sandbox, table=(type:
> hive_table, id: <unassigned>), type=string}}], temporary=false,
> partitionKeys=[], name=toto, retention=0, tableType=MANAGED_TABLE,
> parameters={comment=, transient_lastDdlTime=1471620189}, comment=}}' to
> datatype hive_table
> at
> org.apache.atlas.typesystem.types.ClassType.convert(ClassType.java:145)
> at
> org.apache.atlas.services.DefaultMetadataService.getTypedReferenceableInstance(DefaultMetadataService.java:374)
> at
> org.apache.atlas.services.DefaultMetadataService.deserializeClassInstances(DefaultMetadataService.java:350)
> at
> org.apache.atlas.services.DefaultMetadataService.updateEntities(DefaultMetadataService.java:444)
> at
> org.apache.atlas.web.resources.EntityResource.updateEntities(EntityResource.java:194)
> at
> org.apache.atlas.LocalAtlasClient$2.invoke(LocalAtlasClient.java:97)
> at
> org.apache.atlas.LocalAtlasClient$EntityOperation.run(LocalAtlasClient.java:118)
> at
> org.apache.atlas.LocalAtlasClient.updateEntities(LocalAtlasClient.java:100)
> at org.apache.atlas.AtlasClient.updateEntities(AtlasClient.java:687)
> at
> org.apache.atlas.notification.NotificationHookConsumer$HookConsumer.handleMessage(NotificationHookConsumer.java:225)
> at
> org.apache.atlas.notification.NotificationHookConsumer$HookConsumer.run(NotificationHookConsumer.java:187)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> Caused by:
> org.apache.atlas.typesystem.types.ValueConversionException$NullConversionException:
> For field 'parameters'
> at
> org.apache.atlas.typesystem.persistence.StructInstance.set(StructInstance.java:123)
> at
> org.apache.atlas.typesystem.types.ClassType.convert(ClassType.java:143)
> ... 15 more
> Caused by:
> org.apache.atlas.typesystem.types.ValueConversionException$NullConversionException:
> Null value not allowed for multiplicty {lower=1, upper=1, isUnique=false}
> at
> org.apache.atlas.typesystem.types.DataTypes$PrimitiveType.convertNull(DataTypes.java:105)
> at
> org.apache.atlas.typesystem.types.DataTypes$StringType.convert(DataTypes.java:452)
> at
> org.apache.atlas.typesystem.types.DataTypes$StringType.convert(DataTypes.java:439)
> at
> org.apache.atlas.typesystem.types.DataTypes$MapType.convert(DataTypes.java:584)
> at
> org.apache.atlas.typesystem.types.DataTypes$MapType.convert(DataTypes.java:548)
> at
> org.apache.atlas.typesystem.persistence.StructInstance.set(StructInstance.java:121)
> ... 16 more
> 2016-08-19 15:23:11,161 WARN - [NotificationHookConsumer thread-0:] ~ Error
> handling message [{Id='(type: hive_db, id: <unassigned>)', traits=[],
> values={clusterName=Sandbox,
> location=hdfs://sandbox.hortonworks.com:8020/apps/hive/warehouse,
> description=Default Hive database, qualifiedName=default@Sandbox,
> ownerType=2, name=default, owner=public, parameters={}}}, {Id='(type:
> hive_table, id: <unassigned>)', traits=[], values={db={Id='(type: hive_db,
> id: <unassigned>)', traits=[], values={clusterName=Sandbox,
> location=hdfs://sandbox.hortonworks.com:8020/apps/hive/warehouse,
> description=Default Hive database, qualifiedName=default@Sandbox,
> ownerType=2, name=default, owner=public, parameters={}}},
> createTime=2016-08-19T15:23:09.000Z, lastAccessTime=2016-08-19T15:23:09.000Z,
> qualifiedName=default.toto@Sandbox, sd={Id='(type: hive_storagedesc, id:
> <unassigned>)', traits=[], values={compressed=false,
> serdeInfo=org.apache.atlas.typesystem.Struct@b4698dcb,
> location=hdfs://sandbox.hortonworks.com:8020/apps/hive/warehouse/toto,
> outputFormat=org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat,
> qualifiedName=default.toto@Sandbox_storage, storedAsSubDirectories=false,
> numBuckets=-1, inputFormat=org.apache.hadoop.mapred.TextInputFormat,
> table=(type: hive_table, id: <unassigned>), parameters={}}},
> columns=[{Id='(type: hive_column, id: <unassigned>)', traits=[],
> values={qualifiedName=default.toto.valeur@Sandbox, name=valeur, table=(type:
> hive_table, id: <unassigned>), type=string}}], temporary=false,
> partitionKeys=[], name=toto, retention=0, tableType=MANAGED_TABLE,
> parameters={comment=, transient_lastDdlTime=1471620189}, comment=}}]
> (NotificationHookConsumer:233)
> org.apache.atlas.AtlasServiceException: Metadata service API UPDATE_ENTITY
> failed with status 400(Bad Request) Response Body
> (org.apache.atlas.typesystem.types.ValueConversionException$NullConversionException:
> For field 'parameters'
> at
> org.apache.atlas.typesystem.persistence.StructInstance.set(StructInstance.java:123)
> at
> org.apache.atlas.typesystem.types.ClassType.convert(ClassType.java:143)
> at
> org.apache.atlas.services.DefaultMetadataService.getTypedReferenceableInstance(DefaultMetadataService.java:374)
> at
> org.apache.atlas.services.DefaultMetadataService.deserializeClassInstances(DefaultMetadataService.java:350)
> at
> org.apache.atlas.services.DefaultMetadataService.updateEntities(DefaultMetadataService.java:444)
> at
> org.apache.atlas.web.resources.EntityResource.updateEntities(EntityResource.java:194)
> at
> org.apache.atlas.LocalAtlasClient$2.invoke(LocalAtlasClient.java:97)
> at
> org.apache.atlas.LocalAtlasClient$EntityOperation.run(LocalAtlasClient.java:118)
> at
> org.apache.atlas.LocalAtlasClient.updateEntities(LocalAtlasClient.java:100)
> at org.apache.atlas.AtlasClient.updateEntities(AtlasClient.java:687)
> at
> org.apache.atlas.notification.NotificationHookConsumer$HookConsumer.handleMessage(NotificationHookConsumer.java:225)
> at
> org.apache.atlas.notification.NotificationHookConsumer$HookConsumer.run(NotificationHookConsumer.java:187)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> Caused by:
> org.apache.atlas.typesystem.types.ValueConversionException$NullConversionException:
> Null value not allowed for multiplicty {lower=1, upper=1, isUnique=false}
> at
> org.apache.atlas.typesystem.types.DataTypes$PrimitiveType.convertNull(DataTypes.java:105)
> at
> org.apache.atlas.typesystem.types.DataTypes$StringType.convert(DataTypes.java:452)
> at
> org.apache.atlas.typesystem.types.DataTypes$StringType.convert(DataTypes.java:439)
> at
> org.apache.atlas.typesystem.types.DataTypes$MapType.convert(DataTypes.java:584)
> at
> org.apache.atlas.typesystem.types.DataTypes$MapType.convert(DataTypes.java:548)
> at
> org.apache.atlas.typesystem.persistence.StructInstance.set(StructInstance.java:121)
> ... 16 more
> )
> at
> org.apache.atlas.LocalAtlasClient$EntityOperation.run(LocalAtlasClient.java:122)
> at
> org.apache.atlas.LocalAtlasClient.updateEntities(LocalAtlasClient.java:100)
> at org.apache.atlas.AtlasClient.updateEntities(AtlasClient.java:687)
> at
> org.apache.atlas.notification.NotificationHookConsumer$HookConsumer.handleMessage(NotificationHookConsumer.java:225)
> at
> org.apache.atlas.notification.NotificationHookConsumer$HookConsumer.run(NotificationHookConsumer.java:187)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)