我的JavaBean定义如下
public class LiveResultsFrmCassandra implements Serializable{
UUID id;
String userdn;
String queryid;
private List<Tuple4<String, String, String, String>> docList = new ArrayList();
public LiveResultsFrmCassandra() {
}
public UUID getId() {
return id;
}
public String getUserdn() {
return userdn;
}
public String getQueryid() {
return queryid;
}
public void setId(UUID id) {
this.id = id;
}
public void setUserdn(String userdn) {
this.userdn = userdn;
}
public void setQueryid(String queryid) {
this.queryid = queryid;
}
public List<Tuple4<String, String, String, String>> getDocList() {
return docList;
}
public void setDocList(List<Tuple4<String, String, String, String>> docList) {
this.docList = docList;
}
}
我有下面的代码来使用Spark连接器读取数据,
JavaRDD<LiveResultsFrmCassandra> resultsRDD = javaFunctions(sparkContext).cassandraTable(mf.getConfig().getDatabaseName(), LIVERESULTS, mapRowTo(LiveResultsFrmCassandra.class));
我的表定义如下
CREATE TABLE IF NOT EXISTS LiveResults (
id uuid PRIMARY KEY,
doclist list<frozen<tuple<text, text, text, text>>>,
queryid text,
userdn text );
我看到数据进入其他字段,但我没有得到docList的数据。有人看到过同样的行为吗?
1条答案
按热度按时间kjthegm61#
docklist和getter以及setter使用小写,如下所示。