Examples of StockAvg


Examples of com.manning.hip.ch3.avro.gen.StockAvg

      double count = 0;
      while (values.hasNext()) {
        total += values.next().get();
        count++;
      }
      StockAvg avg = new StockAvg();
      avg.setSymbol(key.toString());
      avg.setAvg(total / count);
      output.collect(new AvroWrapper<StockAvg>(avg),
          NullWritable.get());
    }
View Full Code Here

Examples of com.manning.hip.ch3.proto.StockProtos.StockAvg

    ProtobufBlockReader<StockAvg> reader =
        new ProtobufBlockReader<StockAvg>(
            inputStream, new TypeRef<StockAvg>() {});

    StockAvg stock;
    while((stock = reader.readNext()) != null) {
      System.out.println(ToStringBuilder.reflectionToString(stock));

    }
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.