Package eu.stratosphere.types

Examples of eu.stratosphere.types.StringValue


      Record r = new Record(2);
     
      boolean success = true;
     
      try {
        r.setField(0, new StringValue("Hello World"));
        r.setField(1, new IntValue(42));
        format.writeRecord(r);
       
        r.setNull(0);
        r.setField(1, new IntValue(13));
View Full Code Here


      }
     
      Record r = new Record(2);
     
      try {
        r.setField(0, new StringValue("Hello World"));
        r.setField(1, new IntValue(42));
        format.writeRecord(r);
       
        r.setNull(0);
        r.setField(1, new IntValue(13));
View Full Code Here

      }
     
      Record r = new Record(2);
     
      try {
        r.setField(0, new StringValue("Hello World"));
        r.setField(1, new IntValue(42));
        r.setField(2, new StringValue("Hello User"));
        format.writeRecord(r);
       
        r.setField(0, new StringValue("AbCdE"));
        r.setField(1, new IntValue(13));
        r.setField(2, new StringValue("ZyXvW"));
        format.writeRecord(r);
       
        format.close();
       
        BufferedReader dis = new BufferedReader(new FileReader(tempFile));
View Full Code Here

      Record r = new Record(2);
     
      boolean success = true;
     
      try {
        r.setField(0, new StringValue("Hello World"));
        r.setField(1, new IntValue(42));
        r.setField(2, new StringValue("Hello User"));
        format.writeRecord(r);
 
        r = new Record();
       
        r.setField(0, new StringValue("AbCdE"));
        r.setField(1, new IntValue(13));
        format.writeRecord(r);
       
        format.close();
       
View Full Code Here

  protected Value convert(Object hadoopType) {
    if(hadoopType instanceof org.apache.hadoop.io.LongWritable ) {
      return new LongValue(((LongWritable)hadoopType).get());
    }
    if(hadoopType instanceof org.apache.hadoop.io.Text) {
      return new StringValue(((Text)hadoopType).toString());
    }
    if(hadoopType instanceof org.apache.hadoop.io.IntWritable) {
      return new IntValue(((IntWritable)hadoopType).get());
    }
    if(hadoopType instanceof org.apache.hadoop.io.FloatWritable) {
View Full Code Here

      }
     
      Record r = new Record(2);
     
      try {
        r.setField(0, new StringValue("Hello World"));
        r.setField(1, new IntValue(42));
        r.setField(2, new StringValue("Hello User"));
        format.writeRecord(r);
 
        r = new Record();
       
        r.setField(0, new StringValue("AbCdE"));
        r.setField(1, new IntValue(13));
        format.writeRecord(r);
       
        format.close();
       
View Full Code Here

      int sum = 0;
      while (it.hasNext()) {
        sum += Integer.parseInt(it.next().getField(0, StringValue.class).getValue()) + 1;
      }
     
      out.collect(new Record(new StringValue(Integer.toString(sum))));
    }
View Full Code Here

        Date shipDate = format.parse(shipDateString);

        if (shipDate.before(constantDate)) { 
          String returnFlag = value.getStringValueAt(8);
         
          record.setField(0, new StringValue(returnFlag));
          out.collect(record);
        }
      }
      catch (ParseException e) {
        LOGGER.error(e);
View Full Code Here

      Tuple orderTuple = order.getField(1, Tuple.class);
     
      orderTuple.project(32);
      String newOrderKey = orderTuple.getStringValueAt(0);
     
      order.setField(0, new StringValue(newOrderKey));
      out.collect(order);
    }
View Full Code Here

    rec.setField(0, inputKey);
    rec.setField(1, input);
   
    Collector<Record> collector = new RecordOutputCollector(writerList);
   
    StringValue returnFlag = new StringValue(RETURN_FLAG);
   
    out.map(rec, collector);
   
    ArgumentCaptor<Record> argument = ArgumentCaptor.forClass(Record.class);
    verify(recordWriterMock).emit(argument.capture());
View Full Code Here

TOP

Related Classes of eu.stratosphere.types.StringValue

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.