Skip to content

Commit

Permalink
fix issue #139
Browse files Browse the repository at this point in the history
  • Loading branch information
ywang19 committed Apr 18, 2014
1 parent b328f10 commit d2c6bfc
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
import static org.apache.http.HttpStatus.*;

import java.io.*;
import java.util.ArrayList;
import java.util.Map;

import org.apache.http.client.HttpClient;
import org.apache.commons.codec.EncoderException;
import org.apache.commons.codec.net.URLCodec;
import org.apache.http.*;
import org.apache.http.client.methods.*;
import org.apache.http.entity.StringEntity;
import org.apache.http.message.BasicHeader;
import org.apache.http.util.*;

import com.intel.cosbench.client.cdmi.util.CdmiJsonInputStreamEntity;
Expand Down Expand Up @@ -141,6 +137,7 @@ public InputStream getObjectAsStream(String container, String object)
response.getAllHeaders(), response.getStatusLine());
}

@SuppressWarnings("unused")
private void dumpMethod(HttpRequestBase method) {
System.out.println("==== METHOD BEGIN ====");
System.out.println(method.getMethod());
Expand All @@ -151,6 +148,7 @@ private void dumpMethod(HttpRequestBase method) {
System.out.println("==== METHOD END ====");
}

@SuppressWarnings("unused")
private void dumpResponse(HttpResponse response) {
System.out.println("==== RESPONSE BEGIN ====");
Header[] hdr = response.getAllHeaders();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public InputStream getObjectAsStream(String container, String object)
response.getAllHeaders(), response.getStatusLine());
}

@SuppressWarnings("unused")
private void dumpMethod(HttpRequestBase method) {
System.out.println("==== METHOD BEGIN ====");
System.out.println(method.getMethod());
Expand All @@ -130,6 +131,7 @@ private void dumpMethod(HttpRequestBase method) {
System.out.println("==== METHOD END ====");
}

@SuppressWarnings("unused")
private void dumpResponse(HttpResponse response) {
System.out.println("==== RESPONSE BEGIN ====");
Header[] hdr = response.getAllHeaders();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ public InputStream getObjectAsStream(String container, String object)
response.getAllHeaders(), response.getStatusLine());
}

@SuppressWarnings("unused")
private void dumpMethod(HttpRequestBase method) {
System.out.println("==== METHOD BEGIN ====");
System.out.println(method.getMethod());
Expand All @@ -134,6 +135,7 @@ private void dumpMethod(HttpRequestBase method) {
System.out.println("==== METHOD END ====");
}

@SuppressWarnings("unused")
private void dumpResponse(HttpResponse response) {
System.out.println("==== RESPONSE BEGIN ====");
Header[] hdr = response.getAllHeaders();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public void process() {
/* for strong consistency: a lock should be employed here */
if (!workloadContext.getState().equals(QUEUING))
throw new IllegalStateException(
"workload should be in the state of queuing");
"workload should be in the state of queuing but " + workloadContext.getState().name());
String id = workloadContext.getId();
LOGGER.info("begin to process workload {}", id);
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public void login() {
/* for strong consistency: a lock should be employed here */
if (!missionContext.getState().equals(SUBMITTED))
throw new IllegalStateException(
"mission should be in the state of submitted");
"mission should be in the state of submitted but " + missionContext.getState().name());
String id = missionContext.getId();
LOGGER.debug("begin to auth mission {}", id);
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import static com.intel.cosbench.client.httpauth.HttpAuthConstants.*;

import org.apache.http.Header;
import org.apache.http.HttpHost;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.auth.*;
Expand Down

0 comments on commit d2c6bfc

Please sign in to comment.