Package eu.stratosphere.test.recordJobs.util

Examples of eu.stratosphere.test.recordJobs.util.Tuple.addAttribute()


    Tuple t1 = new Tuple();
   
    t1.addAttribute("1");
    t1.addAttribute("2");
    t1.addAttribute("112315412");
    t1.addAttribute(Integer.MAX_VALUE+"");
    t1.addAttribute("-1");
    t1.addAttribute(Integer.MIN_VALUE+"");
   
    // check identical values
    Assert.assertTrue(t1.compareIntAttribute(t1, 0, 0) == 0);
View Full Code Here


   
    t1.addAttribute("1");
    t1.addAttribute("2");
    t1.addAttribute("112315412");
    t1.addAttribute(Integer.MAX_VALUE+"");
    t1.addAttribute("-1");
    t1.addAttribute(Integer.MIN_VALUE+"");
   
    // check identical values
    Assert.assertTrue(t1.compareIntAttribute(t1, 0, 0) == 0);
    Assert.assertTrue(t1.compareIntAttribute(t1, 1, 1) == 0);
View Full Code Here

    t1.addAttribute("1");
    t1.addAttribute("2");
    t1.addAttribute("112315412");
    t1.addAttribute(Integer.MAX_VALUE+"");
    t1.addAttribute("-1");
    t1.addAttribute(Integer.MIN_VALUE+"");
   
    // check identical values
    Assert.assertTrue(t1.compareIntAttribute(t1, 0, 0) == 0);
    Assert.assertTrue(t1.compareIntAttribute(t1, 1, 1) == 0);
    Assert.assertTrue(t1.compareIntAttribute(t1, 2, 2) == 0);
View Full Code Here

    Tuple t = new Tuple();
   
    String[] testStrings = {"a","b","123123","Hello world!","Test with p|pe","!§$%&/()=*'.:,;-_#+'`}][{"};
   
    for(String testString : testStrings) {
      t.addAttribute(testString);
    }
   
    // check for same value
    for(int i=0;i<testStrings.length;i++) {
      Assert.assertTrue(t.getStringValueAt(i).equals(testStrings[i]));
View Full Code Here

    Tuple t = new Tuple();
   
    long[] testVals = {0,1,2,1234123,-1,-1212312, Long.MIN_VALUE, Long.MAX_VALUE};
   
    for(long testVal : testVals) {
      t.addAttribute(testVal+"");
    }
   
    // check for same value
    for(int i=0;i<testVals.length;i++) {
      Assert.assertTrue(t.getLongValueAt(i) == testVals[i]);
View Full Code Here

      exceptionThrown = true;
    }
    Assert.assertTrue(exceptionThrown);
   
    // check for invalid format exception
    t.addAttribute("abc");
    exceptionThrown = false;
    try {
      t.getLongValueAt(testVals.length);
    } catch(NumberFormatException nfe) {
      exceptionThrown = true;
View Full Code Here

    Tuple t = new Tuple();
   
    String[] testStrings = {"a","b","123123","Hello world!","Test with p|pe"};
   
    for(String testString : testStrings) {
      t.addAttribute(testString);
    }
   
    // check for same value
    for(int i=0;i<testStrings.length;i++) {
      byte[] att = t.getByteArrayValueAt(i);
View Full Code Here

  @Test
  public void testReserveSpace() {
    Tuple t = new Tuple();
   
    t.addAttribute("a");
    t.addAttribute("b");
    t.addAttribute("cde");
   
    t.reserveSpace(512);
   
View Full Code Here

  @Test
  public void testReserveSpace() {
    Tuple t = new Tuple();
   
    t.addAttribute("a");
    t.addAttribute("b");
    t.addAttribute("cde");
   
    t.reserveSpace(512);
   
    Assert.assertTrue(t.getNumberOfColumns() == 3);
View Full Code Here

  public void testReserveSpace() {
    Tuple t = new Tuple();
   
    t.addAttribute("a");
    t.addAttribute("b");
    t.addAttribute("cde");
   
    t.reserveSpace(512);
   
    Assert.assertTrue(t.getNumberOfColumns() == 3);
    Assert.assertTrue(t.getStringValueAt(0).equals("a"));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.