@Test public void reduceSumUpTransactions() { SparkBitcoinBlockCounter sparkTransformator = new SparkBitcoinBlockCounter(); Long transactionCountA = new Long(1); Long transactionCountB = new Long(2); assertEquals((long)3,(long)sparkTransformator.reduceSumUpTransactions(transactionCountA,transactionCountB),"Transaction count should sum up to 3"); }
public static Long reduceSumUpTransactions(Long a, Long b) { return a+b; }
SparkBitcoinBlockCounter { public static Long reduceSumUpTransactions(Long a, Long b) { return a+b; } }
SparkBitcoinBlockCounter { public static Long reduceSumUpTransactions(Long a, Long b) { return a+b; } SparkBitcoinBlockCounter(); }
SparkBitcoinBlockCounter { public static Long reduceSumUpTransactions(Long a, Long b) { return a+b; } SparkBitcoinBlockCounter(); static void main(String[] args); static void jobTotalNumOfTransactions(JavaSparkContext sc, Configuration hadoopConf, String inputFile, String outputFile); static Tuple2<String,Long> mapNoOfTransaction(BitcoinBlock block); static Long reduceSumUpTransactions(Long a, Long b); }
SparkBitcoinBlockCounter { public static Long reduceSumUpTransactions(Long a, Long b) { return a+b; } SparkBitcoinBlockCounter(); static void main(String[] args); static void jobTotalNumOfTransactions(JavaSparkContext sc, Configuration hadoopConf, String inputFile, String outputFile); static Tuple2<String,Long> mapNoOfTransaction(BitcoinBlock block); static Long reduceSumUpTransactions(Long a, Long b);  }