Is there a simple way to find out the size of a Dataset, I need that for several Graph Algorithms I'm implementing at the moment.
I tried to just write a reducer summing things up but that I end up with a new DataSet and I have no Idea how to get the actual number out of there.
cheers Martin
--
You received this message because you are subscribed to the Google Groups "stratosphere-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stratosphere-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/stratosphere-dev.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "stratosphere-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stratosphere-dev/1f6U4CmZyoo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stratosphere-d...@googlegroups.com.
public static class CountingMap extends MapFunction<Object, Long>{private static final long serialVersionUID = 1L;@Overridepublic Long map(Object value) throws Exception {return 1l;}}public static class CountingRed extends ReduceFunction<Long>{private static final long serialVersionUID = 1L;@Overridepublic Long reduce(Long value1, Long value2) throws Exception {return value1+value2;}}public static DataSet<Long> countItems(DataSet set){return set.map(new CountingMap()).reduce(new CountingRed());}
With DataSet<Tuple2<String,String>> i get:Exception in thread "main" eu.stratosphere.api.java.functions.InvalidTypesException: Input mismatch: Basic type expected.
I also tried to use Tuple instead of Object in the Function but then I get:Exception in thread "main" eu.stratosphere.api.java.functions.InvalidTypesException: Input mismatch: Tuple type expected
Is there a way to write this code more generic? I basically looking for a super class that can contain anything since I will never read the actual values anyway.Exception in thread "main" eu.stratosphere.api.java.functions.InvalidTypesException: Input mismatch: Concrete subclass of Tuple expected.
It should be "NOW that the 0.5 code is finalized" ;-)
--
--
You received this message because you are subscribed to the Google Groups "stratosphere-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stratosphere-d...@googlegroups.com.