我正在使用DefaultHttpClient Client = new DefaultHttpClient();
HttpGet httpGet = new HttpGet(
"My-URL");
httpGet.addHeader(
"Authorization",
"Basic "
+ Base64.encodeToString(unp.getBytes(),
Base64.NO_CLOSE));
httpGet.setHeader("Content-Type", "application/json");HttpResponse response = Client.execute(httpGet);
System.out.println("response = " + response);
BufferedReader breader = new BufferedReader(new InputStreamReader(
response.getEntity().getContent()));
StringBuilder responseString = new StringBuilder();
String line = "";
while ((line = breader.readLine()) != null) {
responseString.append(line);
}
breader.close();
result = responseString.toString();
System.out.println("responseStr = " + result);
} catch (IOException e) {
e.printStackTrace();
}
更新方法来更新CassandraOperations
行。
大部分时间的更新操作都失败了。有时很少有字段在更新,很少有字段没有。
我的用法如下:
Cassandra
选择方法CassandraOperations
更新方法将修改后的对象更新为Cassandra数据库。我正在使用CassandraOperations
,Cassandra2.1.9
,spring-data-cassandra1.3.0
。
请就此向我提出任何建议。
感谢。