Thanks Trisha.
1. Created a new maven package and added all dependencies,repositories,pluginRepositories related to Iago and my thrift client.
2. Created a new sampleLoadTest class inside src/main/java which has following code:
public class SampleLoadTest extends ThriftLoadTest{
SampleServiceReadClient sampleClient = null;
public SampleLoadTest(ParrotService<ParrotRequest, byte[]> pService) {
super(pService);
sampleClient = new SampleServiceReadClient("localhost", 8080);
}
@Override
public void processLines(List<String> lines) {
for(String line: lines) {
SampleTargetingResponse resp = null;
try {
resp = sampleClient.getAddressTargeting(1097195819, 94);
} catch (TServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (TException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
3. my config\sample.scala file is
import com.twitter.parrot.config.ParrotLauncherConfig
new ParrotLauncherConfig {
jobName = "load_echo"
port = 8081
victims = "localhost"
// traceLevel = com.twitter.logging.Level.TRACE
// log = "your_input_file_here.log"
log = "config/test.log"
requestRate = 1
duration = 15
timeUnit = "MINUTES"
reuseFile = true
localMode = true
imports = "import com.ci.pratik.SampleLoadTest"
responseType = "SampleTargetingResponse"
transport = "ThriftTransport"
loadTest = "new SampleLoadTest(service.get)"
}
I have couple of questions now:
1. How would I get Future reponse?
2. Do i need to create scala classes for my thrift service?
3. How would I run my test?
Thanks,
Pratik