1,261
社区成员
发帖
与我相关
我的任务
分享
JavaPairRDD<ImmutableBytesWritable, Result> jPairRDD = sc.newAPIHadoopRDD(config,TableInputFormat.class, ImmutableBytesWritable.class,Result.class);
jPairRDD.map(new Function<Tuple2<ImmutableBytesWritable, Result>,AuthStaff> () {
@Override
AuthStaff call (Tuple2<ImmutableBytesWritable, Result> tuple2) throws Exception {
Result res = tuple2._2();
AuthStaff bean = new AuthStaff();
bean.setxxx(res.getValue(xx,xxx));
return bean;
}
});
[/quote]
非常感谢你的帮助,问题解决了!非常感谢!
JavaPairRDD<ImmutableBytesWritable, Result> jPairRDD = sc.newAPIHadoopRDD(config,TableInputFormat.class, ImmutableBytesWritable.class,Result.class);
jPairRDD.map(new Function<Tuple2<ImmutableBytesWritable, Result>,AuthStaff> () {
@Override
AuthStaff call (Tuple2<ImmutableBytesWritable, Result> tuple2) throws Exception {
Result res = tuple2._2();
AuthStaff bean = new AuthStaff();
bean.setxxx(res.getValue(xx,xxx));
return bean;
}
});