@Override public StructType defineStructType(String name, boolean errorIfExists, AttributeDefinition... attrDefs) throws AtlasException { throw new AtlasException("Internal Error: define type called on TransientTypeSystem"); }
@Override public Map<String, IDataType> defineTypes(ImmutableList<EnumTypeDefinition> enumDefs, ImmutableList<StructTypeDefinition> structDefs, ImmutableList<HierarchicalTypeDefinition<TraitType>> traitDefs, ImmutableList<HierarchicalTypeDefinition<ClassType>> classDefs) throws AtlasException { throw new AtlasException("Internal Error: define type called on TransientTypeSystem"); }
@Override public ClassType defineClassType(HierarchicalTypeDefinition<ClassType> classDef) throws AtlasException { throw new AtlasException("Internal Error: define type called on TransientTypeSystem"); }
@Override public Map<String, IDataType> defineTypes(ImmutableList<EnumTypeDefinition> enumDefs, ImmutableList<StructTypeDefinition> structDefs, ImmutableList<HierarchicalTypeDefinition<TraitType>> traitDefs, ImmutableList<HierarchicalTypeDefinition<ClassType>> classDefs) throws AtlasException { throw new AtlasException("Internal Error: define type called on TransientTypeSystem"); }
protected static UserGroupInformation getCurrentUGI() throws AtlasException { try { return UserGroupInformation.getCurrentUser(); } catch (IOException e) { throw new AtlasException(e); } }
protected static UserGroupInformation getCurrentUGI() throws AtlasException { try { return UserGroupInformation.getCurrentUser(); } catch (IOException e) { throw new AtlasException(e); } }
private void close(Closeable closeable) throws AtlasException { if (closeable != null) { try { closeable.close(); } catch (IOException e) { throw new AtlasException(e); } } }
public <T extends IDataType> T getDataType(Class<T> cls, String name) throws AtlasException { try { IDataType dt = getDataType(name); return cls.cast(dt); } catch (ClassCastException cce) { throw new AtlasException(cce); } }
protected Id getId(Object val) throws AtlasException { if (val instanceof Referenceable) { return ((Referenceable) val).getId(); } throw new AtlasException(String.format("Cannot get id from class %s", val.getClass())); }
@Override public void output(Appendable buf, Set<String> typesInProcess) throws AtlasException { try { buf.append(toString()); } catch (IOException e) { throw new AtlasException(e); } }
public ST getDefinedType(String attrName) throws AtlasException { if (!attributeNameToType.containsKey(attrName)) { throw new AtlasException(String.format("Unknown attribute %s in type %s", attrName, getName())); } return typeSystem.getDataType(superTypeClass, attributeNameToType.get(attrName)); }
public static ArithmeticOperator lookup(String groovyValue) throws AtlasException { for(ArithmeticOperator op : ArithmeticOperator.values()) { if (op.getGroovyValue().equals(groovyValue)) { return op; } } throw new AtlasException("Unknown Operator:" + groovyValue); }
public static ComparisonOperator lookup(String groovyValue) throws AtlasException { for(ComparisonOperator op : ComparisonOperator.values()) { if (op.getGroovyValue().equals(groovyValue)) { return op; } } throw new AtlasException("Unknown Operator:" + groovyValue); }
public static ComparisonOperator lookup(String groovyValue) throws AtlasException { for(ComparisonOperator op : ComparisonOperator.values()) { if (op.getGroovyValue().equals(groovyValue)) { return op; } } throw new AtlasException("Unknown Operator:" + groovyValue); }
public static void init(org.apache.commons.configuration.Configuration atlasConfiguration) throws AtlasException { LOG.debug("==> InMemoryJAASConfiguration.init()"); if (atlasConfiguration != null && !atlasConfiguration.isEmpty()) { Properties properties = ConfigurationConverter.getProperties(atlasConfiguration); init(properties); } else { throw new AtlasException("Failed to load JAAS application properties: configuration NULL or empty!"); } LOG.debug("<== InMemoryJAASConfiguration.init()"); }
public static void init(Properties properties) throws AtlasException { LOG.debug("==> InMemoryJAASConfiguration.init()"); if (properties != null && MapUtils.isNotEmpty(properties)) { InMemoryJAASConfiguration conf = new InMemoryJAASConfiguration(properties); Configuration.setConfiguration(conf); } else { throw new AtlasException("Failed to load JAAS application properties: properties NULL or empty!"); } LOG.debug("<== InMemoryJAASConfiguration.init()"); }
public static void init(org.apache.commons.configuration.Configuration atlasConfiguration) throws AtlasException { LOG.debug("==> InMemoryJAASConfiguration.init()"); if (atlasConfiguration != null && !atlasConfiguration.isEmpty()) { Properties properties = ConfigurationConverter.getProperties(atlasConfiguration); init(properties); } else { throw new AtlasException("Failed to load JAAS application properties: configuration NULL or empty!"); } LOG.debug("<== InMemoryJAASConfiguration.init()"); }
public static void init(Properties properties) throws AtlasException { LOG.debug("==> InMemoryJAASConfiguration.init()"); if (properties != null && MapUtils.isNotEmpty(properties)) { InMemoryJAASConfiguration conf = new InMemoryJAASConfiguration(properties); Configuration.setConfiguration(conf); } else { throw new AtlasException("Failed to load JAAS application properties: properties NULL or empty!"); } LOG.debug("<== InMemoryJAASConfiguration.init()"); }
public void validateId(Id id) throws AtlasException { if (id != null) { ClassType cType = typeSystem.getDataType(ClassType.class, id.typeName); if (isSubType(cType.getName())) { return; } throw new AtlasException(String.format("Id %s is not valid for class %s", id, getName())); } }
public void validateId(Id id) throws AtlasException { if (id != null) { ClassType cType = typeSystem.getDataType(ClassType.class, id.typeName); if (isSubType(cType.getName())) { return; } throw new AtlasException(String.format("Id %s is not valid for class %s", id, getName())); } }