' 我的应用程序使用了 springboot hadoop 和 maprdb。我以前从未使用过 springhadoop 和 maprdb。请指导。我想删除 maprdb 代码并与 mangodb 连接。
my code is like this '
public static List<> getData(String a){
List<> DataList = new ArrayList<>();
Connection connection = DriverManager.getConnection("ojai:mapr:");
try
{
DoctumentStore store = connection.getstore(table);
Query query = connection.newQuery().where(connection.newCondition()
.matched("_id", code+"*"),build()).build();
DoctumentStream stream = store.find(query);
for(Document Doc : stream){
ObjectMapper objectmapper = ObjectMapper();
DataList.add(objectMapper.readValue(Doc.asJsonString(),abc.class));
}
store.close();
}
catch(Exception e){
e.printStackTrace();
connection.close();
}
connection.close();
return DataList;
}
}