This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ParquetOutputFormat.setWriteSupportClass(job,classOf[ProtoWriteSupport[Aggregate]]) | |
| ProtoParquetOutputFormat.setProtobufClass(job,classOf[Aggregate]) | |
| hourlyAggregates.saveAsNewAPIHadoopFile(outputDir, | |
| classOf[Void], | |
| classOf[Aggregate], | |
| classOf[ParquetOutputFormat[Aggregate]], | |
| job.getConfiguration) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val data = sc.textFile("src/test/resources/*.csv") | |
| val calls = data.map (Call(_)).cache() | |
| val hourlyPairs = calls.map(c => (c.getHourly,c)) | |
| val weeklyPairs = calls.map(c => (c.getWeekly,c)) | |
| val groupedHourly = hourlyPairs.groupByKey() | |
| val groupedWeekly = weeklyPairs.groupByKey() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val tableName="testTable" | |
| val family = Bytes.toBytes("f") | |
| val qualifier=Bytes.toBytes("q") | |
| val hbaseTestUtil = new HBaseTestingUtility() | |
| val config = hbaseTestUtil.getConfiguration | |
| val tmpDir = File.createTempFile("logdir", "") | |
| tmpDir.delete() | |
| tmpDir.mkdir() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.yammer.metrics.jersey.tests.resources; | |
| import com.yammer.metrics.annotation.ExceptionMetered; | |
| import com.yammer.metrics.annotation.Metered; | |
| import com.yammer.metrics.annotation.Timed; | |
| import javax.ws.rs.*; | |
| import javax.ws.rs.core.MediaType; | |
| import java.io.IOException; |
NewerOlder