ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Hurley (JIRA)" <>
Subject [jira] [Created] (AMBARI-18057) NullPointerException When Retrieving Cluster via API Due To Database Inconsistency
Date Sun, 07 Aug 2016 20:06:20 GMT
Jonathan Hurley created AMBARI-18057:

             Summary: NullPointerException When Retrieving Cluster via API Due To Database
                 Key: AMBARI-18057
             Project: Ambari
          Issue Type: Bug
          Components: ambari-upgrade
    Affects Versions: 2.0.0
            Reporter: Jonathan Hurley
            Assignee: Jonathan Hurley
            Priority: Blocker
             Fix For: 2.4.0

Noticed the following on an upgraded cluster:
This is not related to EU it seems:

        at org.apache.ambari.server.controller.internal.AlertResourceProvider.toResource(
        at org.apache.ambari.server.controller.internal.AlertResourceProvider.getResources(
        at org.apache.ambari.server.controller.internal.AlertResourceProvider.queryForResources(
        at org.apache.ambari.server.controller.internal.ClusterControllerImpl$ExtendedResourceProviderWrapper.queryForResources(
        at org.apache.ambari.server.controller.internal.ClusterControllerImpl.getResources(
        at org.apache.ambari.server.api.query.QueryImpl.doQuery(
        at org.apache.ambari.server.api.query.QueryImpl.queryForResources(
        at org.apache.ambari.server.api.query.QueryImpl.execute(

It looks like this is a problem with database consistency, namely that our upgrade logic does
NOT properly enforce non-null and default values!

{code:title="Not good..."}
      //TODO workaround for default values, possibly we will have full support later
      if (columnInfo.getDefaultValue() != null) {

Turns out we're doing at least 2 things very wrong here when changing the DB on Ambari upgrade:
- Not enforcing non-NULL constraint on columns
- Not enforcing a default constraint on column

This is most likely due to limitations in EclipseLink's {{TableDefinition}} and {{FieldDefinition}}
classes which we rely on for our upgrade logic.

This message was sent by Atlassian JIRA

View raw message