Commit 30334742 by Venkatesh Seetharam

BUG-38738 restore types fails

parent 6e9d6948
......@@ -90,11 +90,12 @@ public class DefaultMetadataService implements MetadataService {
private void restoreTypeSystem() {
LOG.info("Restoring type system from the store");
try {
createSuperTypes();
TypesDef typesDef = typeStore.restore();
typeSystem.defineTypes(typesDef);
// restore types before creating super types
createSuperTypes();
} catch (MetadataException e) {
throw new RuntimeException(e);
}
......@@ -107,7 +108,7 @@ public class DefaultMetadataService implements MetadataService {
TypesUtil.createOptionalAttrDef("description", DataTypes.STRING_TYPE);
@InterfaceAudience.Private
public void createSuperTypes() throws MetadataException {
private void createSuperTypes() throws MetadataException {
if (typeSystem.isRegistered(MetadataServiceClient.DATA_SET_SUPER_TYPE)) {
return; // this is already registered
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment