scala
文章平均质量分 77
lingzhi007
这个作者很懒,什么都没留下…
展开
-
curreying function
benchmark2("hllc")(10000000)(hcclcodeanddecode2) benchmark("hllc")(10000000)(hcclcodeanddecode) def hcclcodeanddecode() :Unit = { val hllc = new HLLCounter(14) hllc.add("ads...原创 2017-08-09 15:27:08 · 112 阅读 · 0 评论 -
基数预估算法 错误率验证
package hllctestimport java.utilimport org.scalatest.{FlatSpec}import org.spark.sqludf.HLLCounterimport scala.collection.mutableimport scala.collection.mutable.ArrayBufferimport scal...原创 2017-11-25 16:32:11 · 257 阅读 · 0 评论 -
newExecuteStatementOperation single session
var udfNotInited = true override def newExecuteStatementOperation( parentSession: HiveSession, statement: String, confOverlay: JMap[String, String], async: Boolean...原创 2017-10-16 09:52:57 · 153 阅读 · 0 评论 -
file io
window 下通过 source 读文件各种鬼 改用 BufferedReader用于删除文件中中文 object ChineseDrop extends App { // val stArray = Array("胜多负少","abadsf","13123123") // stArray.foreach( word => println(s" $...原创 2017-02-04 20:10:10 · 115 阅读 · 0 评论 -
yarn spark
--master yarn --deploy-mode client --num-executors 4 --executor-memory 6g --executor-cores 3 --conf spark.default.parallelism=40 --conf spark.sql.shuffle.partitions=20原创 2017-09-19 14:08:36 · 106 阅读 · 0 评论 -
test code 09-18-2
object FunnelUtil { var gson: Gson = new GsonBuilder().create val maxFunnelLength = 10 var beginTimestamp = 0 var eventLength = 0 var eventMap : mutable.HashMap[Short,Byte] = null ...原创 2017-09-18 18:47:11 · 117 阅读 · 0 评论 -
交流 code 09-18
object DataProcess extends App { val spark = SparkSession .builder() .appName("UserBehiviorToHHDataPartition") .getOrCreate() val dataCollection = spark.sparkContext.textFile("....原创 2017-09-18 18:45:41 · 148 阅读 · 0 评论 -
mvn + scala support
maven-compiler-plugin 1.8 1.8 UTF-8 ...原创 2017-09-15 10:00:06 · 109 阅读 · 0 评论 -
THREAD TEST
val THREAD_POOL_SIZE = 10 val THREAD_POOL = Executors.newScheduledThreadPool(THREAD_POOL_SIZE);THREAD_POOL.scheduleWithFixedDelay(new Runnable() { def run() { otsQueueProcess ...原创 2017-09-12 18:07:57 · 194 阅读 · 0 评论 -
json
val gson: Gson = new GsonBuilder().create def jsonToMap(jsonstring: String): java.util.Map[String, String] = { val typeOfHashMap: Type = new TypeToken[java.util.Map[String, String]]() { ...原创 2017-09-07 10:21:46 · 76 阅读 · 0 评论 -
hllc 不同M 的 小基数的误差率
结论: testHllcError(10, tt) 31 开始出现误差 testHllcError(11, tt) 33 开始出现误差 testHllcError(13, tt) 42 开始出现误差 testHllcError(14, tt) 100 开始出现误差package hllctesti...原创 2017-12-22 14:20:20 · 509 阅读 · 0 评论