Package com.intel.hadoop.graphbuilder.types

Examples of com.intel.hadoop.graphbuilder.types.IntType


*/
public class IntParser implements FieldParser<IntType> {

  @Override
  public IntType getValue(String text) {
    return new IntType(Integer.valueOf(text));
  }
View Full Code Here


      return new StringType();
    }

    @Override
    public IntType createRValue() {
      return new IntType();
    }
View Full Code Here

              TypeFactory.getClassName("int"));
      PairListType val1 = (PairListType) stringintclass.newInstance();
      assertEquals(val1.createLValue().getClass(), StringType.class);
      assertEquals(val1.createRValue().getClass(), IntType.class);

      val1.init(new StringType("hello"), new IntType(1));
      val1.add(new StringType("world"), new IntType(2));
      int i = val1.size();
      assertEquals(val1.size(), 2);
      PairListType val0 = (PairListType) stringintclass.newInstance();
      assertEquals(val0.size(), 0);
      val0.add(new StringType("foo"), new IntType(3));
      assertEquals(val0.size(), 1);
      val0.append(val1);
      assertEquals(val0.size(), val1.size() + 1);

      Class intstringclass = EdgeTransformJobValueFactory
View Full Code Here

  public void testEncodeInt() {
    int numProcs = 8;
    ArrayList<Integer> mirrorList = new ArrayList<Integer>(Arrays.asList(0, 1,
        2, 3, 4));
    VertexRecord<IntType, IntType> vrec = new VertexRecord<IntType, IntType>();
    vrec.setVid(new IntType(1));
    vrec.setMirrorsFromList(mirrorList, numProcs);
    vrec.setOwner((short) 2);
    vrec.setInEdges(3);
    vrec.setOutEdges(2);
    // System.out.println(vrec.toString());
View Full Code Here

  public void testDecodeInt() {
    int numProcs = 8;
    ArrayList<Integer> mirrorList = new ArrayList<Integer>(Arrays.asList(0, 1,
        2, 3, 4));
    VertexRecord<IntType, IntType> vrec = new VertexRecord<IntType, IntType>();
    vrec.setVid(new IntType(442));
    vrec.setMirrorsFromList(mirrorList, numProcs);
    vrec.setOwner((short) 2);
    vrec.setInEdges(3);
    vrec.setOutEdges(2);
    String s = vrec.toString();
View Full Code Here

  public void configure(JobConf job) throws Exception {
  }

  @Override
  public IntType reduce(T a, IntType b) {
    return new IntType(b.get() + 1);
  }
View Full Code Here

TOP

Related Classes of com.intel.hadoop.graphbuilder.types.IntType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.