private void assertVertexProperties(AtlasVertex v) { final String HASH_CODE_PROPERTY = "hdfs_path.hashCode"; final String RETENTION_PROPERTY = "hdfs_path.retention"; AtlasBuiltInTypes.AtlasBigIntegerType bitRef = new AtlasBuiltInTypes.AtlasBigIntegerType(); AtlasBuiltInTypes.AtlasBigDecimalType bdtRef = new AtlasBuiltInTypes.AtlasBigDecimalType(); BigInteger bitExpected = bitRef.getNormalizedValue(612361213421234L); BigDecimal bdtExpected = bdtRef.getNormalizedValue(125353); BigInteger bit = AtlasGraphUtilsV2.getEncodedProperty(v, HASH_CODE_PROPERTY, BigInteger.class); BigDecimal bdt = AtlasGraphUtilsV2.getEncodedProperty(v, RETENTION_PROPERTY, BigDecimal.class); assertEquals(bit, bitExpected); assertEquals(bdt.compareTo(bdtExpected), 0); }
private void assertVertexProperties(AtlasVertex v) { final String HASH_CODE_PROPERTY = "hdfs_path.hashCode"; final String RETENTION_PROPERTY = "hdfs_path.retention"; AtlasBuiltInTypes.AtlasBigIntegerType bitRef = new AtlasBuiltInTypes.AtlasBigIntegerType(); AtlasBuiltInTypes.AtlasBigDecimalType bdtRef = new AtlasBuiltInTypes.AtlasBigDecimalType(); BigInteger bitExpected = bitRef.getNormalizedValue(612361213421234L); BigDecimal bdtExpected = bdtRef.getNormalizedValue(125353); BigInteger bit = AtlasGraphUtilsV2.getEncodedProperty(v, HASH_CODE_PROPERTY, BigInteger.class); BigDecimal bdt = AtlasGraphUtilsV2.getEncodedProperty(v, RETENTION_PROPERTY, BigDecimal.class); assertEquals(bit, bitExpected); assertEquals(bdt.compareTo(bdtExpected), 0); }
void init() { allTypes.addType(new AtlasBuiltInTypes.AtlasBooleanType()); allTypes.addType(new AtlasBuiltInTypes.AtlasByteType()); allTypes.addType(new AtlasBuiltInTypes.AtlasShortType()); allTypes.addType(new AtlasBuiltInTypes.AtlasIntType()); allTypes.addType(new AtlasBuiltInTypes.AtlasLongType()); allTypes.addType(new AtlasBuiltInTypes.AtlasFloatType()); allTypes.addType(new AtlasBuiltInTypes.AtlasDoubleType()); allTypes.addType(new AtlasBuiltInTypes.AtlasBigIntegerType()); allTypes.addType(new AtlasBuiltInTypes.AtlasBigDecimalType()); allTypes.addType(new AtlasBuiltInTypes.AtlasDateType()); allTypes.addType(new AtlasBuiltInTypes.AtlasStringType()); allTypes.addType(new AtlasBuiltInTypes.AtlasObjectIdType()); }
void init() { allTypes.addType(new AtlasBuiltInTypes.AtlasBooleanType()); allTypes.addType(new AtlasBuiltInTypes.AtlasByteType()); allTypes.addType(new AtlasBuiltInTypes.AtlasShortType()); allTypes.addType(new AtlasBuiltInTypes.AtlasIntType()); allTypes.addType(new AtlasBuiltInTypes.AtlasLongType()); allTypes.addType(new AtlasBuiltInTypes.AtlasFloatType()); allTypes.addType(new AtlasBuiltInTypes.AtlasDoubleType()); allTypes.addType(new AtlasBuiltInTypes.AtlasBigIntegerType()); allTypes.addType(new AtlasBuiltInTypes.AtlasBigDecimalType()); allTypes.addType(new AtlasBuiltInTypes.AtlasDateType()); allTypes.addType(new AtlasBuiltInTypes.AtlasStringType()); allTypes.addType(new AtlasBuiltInTypes.AtlasObjectIdType()); }