use of org.voltdb.ParameterSet in project voltdb by VoltDB.
the class RandomMsgGenerator method makeIv2InitiateTaskMsg.
private Iv2InitiateTaskMessage makeIv2InitiateTaskMsg(boolean readOnly, boolean binaryLog, boolean isMp) {
StoredProcedureInvocation spi = mock(StoredProcedureInvocation.class);
ParameterSet ps = mock(ParameterSet.class);
when(spi.getParams()).thenReturn(ps);
if (binaryLog) {
when(ps.toArray()).thenReturn(new Object[] { null, 0l, 0l, Long.MIN_VALUE, Long.MIN_VALUE, null });
if (!isMp) {
when(spi.getProcName()).thenReturn("@ApplyBinaryLogSP");
} else {
when(spi.getProcName()).thenReturn("@ApplyBinaryLogMP");
}
} else {
when(ps.toArray()).thenReturn(new Object[] { null, 0l, 0l, Long.MIN_VALUE, null });
when(spi.getProcName()).thenReturn("dummy");
}
Iv2InitiateTaskMessage msg = new Iv2InitiateTaskMessage(0l, 0l, 0l, Long.MIN_VALUE, 0l, readOnly, !isMp, spi, 0l, 0l, false);
return msg;
}
use of org.voltdb.ParameterSet in project voltdb by VoltDB.
the class HTTPUtils method callProcedure.
public static Response callProcedure(String string, String key, byte[] storeValue, CloseableHttpClient httpclient, HttpPost httppost) throws JSONException, IOException, Exception {
String hexval = Encoder.hexEncode(storeValue);
ParameterSet pset = ParameterSet.fromArrayNoCopy(key, hexval);
String resp = callProcOverJSON(string, pset, username, password, prehash, httpclient, httppost);
Response response = responseFromJSON(resp);
return response;
}
use of org.voltdb.ParameterSet in project voltdb by VoltDB.
the class HTTPUtils method callProcedure.
public static Response callProcedure(String string, String generateRandomKeyForRetrieval, CloseableHttpClient httpclient, HttpPost httppost) throws JSONException, IOException, Exception {
ParameterSet pset = ParameterSet.fromArrayNoCopy(generateRandomKeyForRetrieval);
String resp = callProcOverJSON(string, pset, username, password, prehash, httpclient, httppost);
Response response = responseFromJSON(resp);
return response;
}
Aggregations