2015年6月25日
摘要: create'ssxtest',{NAME=>'info',COMPRESSION=>'snappy'},{NUMREGIONS=>9,SPLITALGO=>'HexStringSplit'}是建表是预分为9个regioncreate'ssxtest1',{NAME=>'f',VERSIONS=>1... 阅读全文
posted @ 2015-06-25 19:39 smartcuning 阅读(265) 评论(0) 推荐(0) 编辑
  2015年6月23日
摘要: spark将数据写入redis时调用以下代码会报 org.apache.spark.SparkException: Task not serializableimport com.redis.RedisClientval r = new RedisClient("192.168.1.101", 63... 阅读全文
posted @ 2015-06-23 14:30 smartcuning 阅读(1263) 评论(0) 推荐(0) 编辑
摘要: 1)spark把数据写入到hbase需要用到:PairRddFunctions的saveAsHadoopDataset方法,这里用到了implicit conversion,需要我们引入import org.apache.spark.SparkContext._2)spark写入hbase,实质是借... 阅读全文
posted @ 2015-06-23 13:30 smartcuning 阅读(6611) 评论(1) 推荐(0) 编辑
摘要: 出现这个问题,是因为spark的excutor执行的时候,缺少hive的依赖包,添加依赖包的参数是:--conf "spark.executor.extraClassPath=/opt/cloudera/parcels/CDH-5.3.1-1.cdh5.3.1.p0.5/lib/hive/lib/*... 阅读全文
posted @ 2015-06-23 12:12 smartcuning 阅读(1239) 评论(0) 推荐(0) 编辑
  2015年6月19日
摘要: 在cdh5.3中的spark,已经包含了sparksql,只需要做以下几步配置,就可以在使用该功能1)确保hive的cli和jdbc都可以正常工作2)把hive-site.xml 复制到 SPARK_HOME/conf目录下3)将hive的类库添加到spark classpath中:编辑SPARK_... 阅读全文
posted @ 2015-06-19 00:03 smartcuning 阅读(959) 评论(0) 推荐(0) 编辑