Search in sources :

Example 1 with StringToLongValueWithProperHashCode

use of org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.StringToLongValueWithProperHashCode in project flink by apache.

the class GraphKeyTypeTransformTest method testFromString.

@Test
public void testFromString() throws Exception {
    TranslateFunction<String, LongValueWithProperHashCode> translator = new StringToLongValueWithProperHashCode();
    Assert.assertEquals(new LongValueWithProperHashCode(0L), translator.translate("0", longValueWithProperHashCode));
    Assert.assertEquals(new LongValueWithProperHashCode(Long.MIN_VALUE), translator.translate("-9223372036854775808", longValueWithProperHashCode));
    Assert.assertEquals(new LongValueWithProperHashCode(Long.MAX_VALUE), translator.translate("9223372036854775807", longValueWithProperHashCode));
}
Also used : StringToLongValueWithProperHashCode(org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.StringToLongValueWithProperHashCode) LongValueToString(org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.LongValueToString) UnsignedShortValueToLongValueWithProperHashCode(org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.UnsignedShortValueToLongValueWithProperHashCode) DoubleToLongValueWithProperHashCode(org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.DoubleToLongValueWithProperHashCode) UnsignedByteValueToLongValueWithProperHashCode(org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.UnsignedByteValueToLongValueWithProperHashCode) UnsignedIntToLongValueWithProperHashCode(org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.UnsignedIntToLongValueWithProperHashCode) DoubleValueToLongValueWithProperHashCode(org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.DoubleValueToLongValueWithProperHashCode) StringToLongValueWithProperHashCode(org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.StringToLongValueWithProperHashCode) UnsignedFloatToLongValueWithProperHashCode(org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.UnsignedFloatToLongValueWithProperHashCode) LongValueToLongValueWithProperHashCode(org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.LongValueToLongValueWithProperHashCode) StringValueToLongValueWithProperHashCode(org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.StringValueToLongValueWithProperHashCode) UnsignedByteToLongValueWithProperHashCode(org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.UnsignedByteToLongValueWithProperHashCode) UnsignedFloatValueToLongValueWithProperHashCode(org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.UnsignedFloatValueToLongValueWithProperHashCode) UnsignedShortToLongValueWithProperHashCode(org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.UnsignedShortToLongValueWithProperHashCode) Test(org.junit.Test)

Aggregations

DoubleToLongValueWithProperHashCode (org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.DoubleToLongValueWithProperHashCode)1 DoubleValueToLongValueWithProperHashCode (org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.DoubleValueToLongValueWithProperHashCode)1 LongValueToLongValueWithProperHashCode (org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.LongValueToLongValueWithProperHashCode)1 LongValueToString (org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.LongValueToString)1 StringToLongValueWithProperHashCode (org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.StringToLongValueWithProperHashCode)1 StringValueToLongValueWithProperHashCode (org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.StringValueToLongValueWithProperHashCode)1 UnsignedByteToLongValueWithProperHashCode (org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.UnsignedByteToLongValueWithProperHashCode)1 UnsignedByteValueToLongValueWithProperHashCode (org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.UnsignedByteValueToLongValueWithProperHashCode)1 UnsignedFloatToLongValueWithProperHashCode (org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.UnsignedFloatToLongValueWithProperHashCode)1 UnsignedFloatValueToLongValueWithProperHashCode (org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.UnsignedFloatValueToLongValueWithProperHashCode)1 UnsignedIntToLongValueWithProperHashCode (org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.UnsignedIntToLongValueWithProperHashCode)1 UnsignedShortToLongValueWithProperHashCode (org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.UnsignedShortToLongValueWithProperHashCode)1 UnsignedShortValueToLongValueWithProperHashCode (org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.UnsignedShortValueToLongValueWithProperHashCode)1 Test (org.junit.Test)1