摘要: 我们都知道Spark内部提供了HashPartitioner和RangePartitioner两种分区策略,这两种分区策略在很多情况下都适合我们的场景。但是有些情况下,Spark内部不能符合咱们的需求,这时候我们就可以自定义分区策略。为此,Spark提供了相应的接口,我们只需要扩展Partition... 阅读全文
posted @ 2015-07-14 20:57 masic 阅读(284) 评论(0) 推荐(0) 编辑
摘要: jbytearray转c++byte数组C代码jbyte*arrayBody=env->GetByteArrayElements(data,0);jsizetheArrayLengthJ=env->GetArrayLength(data);BYTE*starter=(BYTE*)arrayBody;... 阅读全文
posted @ 2015-07-14 18:52 masic 阅读(419) 评论(0) 推荐(0) 编辑
摘要: 原文链接ProblemYou want to control the visibility of fields that are used as constructor parameters in a Scala class.SolutionAs shown in the following exa... 阅读全文
posted @ 2015-07-14 11:12 masic 阅读(174) 评论(0) 推荐(0) 编辑