Skip to content

Commit df779df

Browse files
author
Yaguang Wang
committed
Merge pull request #181 from intel-cloud/0.4.0.0
merge commits from 0.4.0.0
2 parents 909cc11 + 2a24a47 commit df779df

File tree

81 files changed

+1335
-351
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1335
-351
lines changed

CHANGELOG

Lines changed: 35 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1+
COSBench 0.4.0.b2 (14-ww17.1)
2+
------------------------------------
3+
. #57: time synchronization
4+
. #96: Creating Web UI facility for generating different workload configuration files
5+
. #155: Add support for "acceptable failure rate, failure %" to all stages
6+
. #4: xml validator
7+
. #77: contextual parameter list
8+
. #167: storage policy supporting for openstack swift
9+
. #37: support CDMI interface
10+
. #139: NullPointerException when a mission is aborted
11+
12+
13+
COSBench 0.4.0.b1 (14-ww11.4)
14+
------------------------------------
15+
. #166: show driver alive state on controller index page
16+
. #158: Extend "histogram" selector to support "open ranges"
17+
. #165: enable Open range for object size in uniform and histogram
18+
. #136: 1 GB Object Reads Fail due to IllegalArgumentException
19+
. #99 (#152): measure and report the time for first and last byte in or out
20+
. #159: Extend "histogram" selector to support "floating point" weights/percentages
21+
. #143: at loading archived workloads, even there are 100 workloads, the UI shows only 98.
22+
. #140: duplicated workload id generated
23+
. #151: avoid being challenged for each request
24+
25+
26+
COSBench 0.4.0.a1 (14-ww1.4)
27+
------------------------------------
28+
. #137: when there are large # of archive jobs, exception will raise from archive list on web portal.
29+
. #139: NullPointerException when a mission is aborted
30+
. support http BASIC and DIGEST authentication
31+
. add cdmi base and util bundle
32+
. add cdmi adapter for swift+cdmi middleware
33+
34+
135
COSBench 0.3.3.0 (13-ww44.5)
236
------------------------------------
337
. #20: multiple same operations
@@ -56,81 +90,4 @@ COSBench 0.3.0.1 (13-ww17.5)
5690

5791
COSBench 0.3.0.0 (13-ww15.5)
5892
------------------------------------
59-
1. rebase version to 0.3.0 for open source
60-
61-
======================================================================
62-
63-
COSBench 2.2.0.GA (13-ww15.1)
64-
------------------------------------
65-
1. fix a bug related to socket connections
66-
2. add a console option "-Dcosbench.controller.history" to help set the max number of workloads cosbench will hold in RAM
67-
3. add a console option "-Dcosbench.driver.history" to help set the max number of missions cosbench will hold in RAM
68-
4. add a config parameter "retry" to help user define the number of retries cosbench will attempt should previous efforts fail
69-
5. improve log printing to help better debuging
70-
6. miscellanous minor bug fixing
71-
72-
COSBench 2.2.0.beta2 (13-ww08.2)
73-
------------------------------------
74-
1. fix a bug which will cause OOM after a few days' intensive testing.
75-
2. support ceph
76-
3. support to forcily terminate load to avoid long tail due to high load.
77-
4. add one parameter "tenant_name" for keystone configuration.
78-
5. add retry logic to avoid one failed auth thread to terminate whole workload.
79-
6. change parameters:
80-
a) for swift, change parameter "url" to "auth_url";
81-
b) for keystone, add parameter "tenant_name".
82-
83-
84-
COSBench 2.2.0.beta1 (12-ww48.5)
85-
------------------------------------
86-
1. internal code refactoring
87-
2. add one new bundle to wrap http related utilities and abstract Context class
88-
3. formalize adaptor interfaces
89-
4. provide one sample project for adaptor development
90-
5. provide one development guide for adaptor
91-
92-
COSBench 2.1.0.GA (12-ww44.5)
93-
------------------------------------
94-
1. enhance start/stop scripts to handle unexpected cases.
95-
2. add step by step installation manual in user guide document.
96-
3. 2.1 release preparation:
97-
- generate branch for 2.1 release preparation and switch to work on the branch for dev/release folder.
98-
- change version to 2.1.0.GA
99-
- remove version information in "README"
100-
4. add storage line at dispose stage in ampli-config-sample.xml to support v2.5
101-
102-
COSBench 2.0.5.GA (12-ww43.4)
103-
------------------------------------
104-
1. support object integrity check
105-
2. finalize config editing page
106-
3. unify sample config files
107-
108-
COSBench 2.0.4.GA (12-ww42.3)
109-
------------------------------------
110-
1. fix one bug which causes queuing workload can't be cancelled.
111-
2. fix one bug which causes 100% read and 0% write operation mix can't work as expecteed.
112-
3. unify mission and task on web page
113-
4. draft version of config editing page
114-
115-
COSBench 2.0.2.GA (12-ww38.3)
116-
------------------------------------
117-
1. fix one bug in swift-config-sample.xml, which causes failure at dispose stage.
118-
2. fix one bug for amplistor which can't get policy id defined in storage.
119-
3. fix imbalanced work allocation between driver.
120-
4. fix one bug which causes http connections not released after testing.
121-
122-
123-
COSBench 2.0.1.GA (12-ww34.5)
124-
------------------------------------
125-
1. enhance the content based on internal and external users� feedback.
126-
2. make policy parameter optional for object related operation
127-
3. support timeout for amplistor
128-
4. fix a bug on "reset" button at matrix page
129-
130-
COSBench 2.0.0.GA (12-ww31.5)
131-
------------------------------------
132-
1. each workload stage now has a rampdown phase.
133-
2. support latency histogram.
134-
3. cosbench now has its own logging system.
135-
4. resolved serval issues related to performance metrics calculation.
136-
5. resolved serval issues related to HTTP client.
93+
1. rebase version to 0.3.0 for open source

COSBench-User-Guide.odt

255 KB
Binary file not shown.

COSBenchUserGuide.pdf

-101 KB
Binary file not shown.

dev/cosbench-ampli/src/com/intel/cosbench/client/amplistor/AmpliClient.java

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class AmpliClient {
4141

4242
private HttpClient client = null;
4343
/* current operation */
44-
private volatile HttpUriRequest request;
44+
private volatile HttpUriRequest method;
4545
private int port;
4646
private String host;
4747
private String nsRoot;
@@ -54,20 +54,20 @@ public AmpliClient(HttpClient client, String host, int port, String nsRoot) {
5454
}
5555

5656
public void dispose() {
57-
request = null;
57+
method = null;
5858
HttpClientUtil.disposeHttpClient(client);
5959
}
6060

6161
public void abort() {
62-
if (request != null)
63-
request.abort();
64-
request = null;
62+
if (method != null)
63+
method.abort();
64+
method = null;
6565
}
6666

6767
public boolean login() throws IOException, HttpException {
6868
String storageUrl = "http://" + this.host + ":" + this.port;
6969

70-
HttpHead method = HttpClientUtil.makeHttpHead(storageUrl);
70+
method = HttpClientUtil.makeHttpHead(storageUrl);
7171
HttpResponse response = null;
7272
try {
7373
response = client.execute(method);
@@ -89,15 +89,14 @@ public String StoreObject(String sourceFilename, String ampliNamespace,
8989
AmpliException {
9090
File file = new File(sourceFilename);
9191

92-
HttpPut method = null;
9392
HttpResponse response = null;
9493
try {
9594
String storageUrl = "http://" + this.host + ":" + this.port
9695
+ nsRoot;
9796
method = HttpClientUtil.makeHttpPut(storageUrl + "/" + HttpClientUtil.encodeURL(ampliNamespace)
9897
+ "/" + HttpClientUtil.encodeURL(ampliFilename));
9998

100-
method.setEntity(new FileEntity(file, "application/octet-stream"));
99+
((HttpPut)method).setEntity(new FileEntity(file, "application/octet-stream"));
101100

102101
response = client.execute(method);
103102

@@ -127,7 +126,6 @@ public String StoreObject(String sourceFilename, String ampliNamespace,
127126
public String StoreStreamedObject(InputStream stream, long length,
128127
String ampliNamespace, String ampliFilename) throws IOException,
129128
HttpException, AmpliException {
130-
HttpPut method = null;
131129
HttpResponse response = null;
132130
try {
133131
String storageUrl = "http://" + this.host + ":" + this.port
@@ -143,7 +141,7 @@ public String StoreStreamedObject(InputStream stream, long length,
143141
entity.setChunked(false);
144142
}
145143

146-
method.setEntity(entity);
144+
((HttpPut)method).setEntity(entity);
147145

148146
response = client.execute(method);
149147

@@ -191,7 +189,6 @@ public String StoreObject(byte[] data, String ampliNamespace,
191189
String ampliFilename) throws IOException, HttpException,
192190
AmpliException {
193191
// int len = data.length;
194-
HttpPut method = null;
195192
String storageUrl = "http://" + this.host + ":" + this.port + nsRoot;
196193
method = HttpClientUtil.makeHttpPut(storageUrl + "/" + HttpClientUtil.encodeURL(ampliNamespace) + "/"
197194
+ HttpClientUtil.encodeURL(ampliFilename));
@@ -200,7 +197,7 @@ public String StoreObject(byte[] data, String ampliNamespace,
200197

201198
HttpResponse response = null;
202199
try {
203-
method.setEntity(new ByteArrayEntity(data));
200+
((HttpPut)method).setEntity(new ByteArrayEntity(data));
204201
response = client.execute(method);
205202
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_CREATED) {
206203
return response.getFirstHeader("ETag").getValue();
@@ -222,7 +219,7 @@ public byte[] getObject(String namespace, String objName)
222219
throws IOException, HttpException, AmpliException {
223220
String storageUrl = "http://" + this.host + ":" + this.port + nsRoot;
224221

225-
HttpGet method = HttpClientUtil.makeHttpGet(storageUrl + "/" + HttpClientUtil.encodeURL(namespace)
222+
method = HttpClientUtil.makeHttpGet(storageUrl + "/" + HttpClientUtil.encodeURL(namespace)
226223
+ "/" + HttpClientUtil.encodeURL(objName));
227224

228225
HttpResponse response = null;
@@ -249,7 +246,7 @@ public InputStream getObjectAsStream(String namespace, String objName)
249246
throws IOException, HttpException, AmpliException {
250247
String storageUrl = "http://" + this.host + ":" + this.port + nsRoot;
251248

252-
HttpGet method = HttpClientUtil.makeHttpGet(storageUrl + "/" + HttpClientUtil.encodeURL(namespace)
249+
method = HttpClientUtil.makeHttpGet(storageUrl + "/" + HttpClientUtil.encodeURL(namespace)
253250
+ "/" + HttpClientUtil.encodeURL(objName));
254251

255252
HttpResponse response = null;
@@ -272,7 +269,6 @@ public InputStream getObjectAsStream(String namespace, String objName)
272269
public boolean deleteObject(String ampliNamespace, String name)
273270
throws HttpException, IOException, AmpliException {
274271

275-
HttpDelete method = null;
276272
HttpResponse response = null;
277273

278274
try {
@@ -302,7 +298,6 @@ public boolean deleteObject(String ampliNamespace, String name)
302298
public AmpliPolicy createPolicy(AmpliPolicy policy) throws HttpException,
303299
IOException, AmpliException {
304300

305-
HttpPut method = null;
306301
HttpResponse response = null;
307302
try {
308303
String storageUrl = "http://" + this.host + ":" + this.port
@@ -336,7 +331,6 @@ public AmpliPolicy createPolicy(AmpliPolicy policy) throws HttpException,
336331
public AmpliPolicy getPolicy(String policyId) throws HttpException,
337332
IOException, AmpliException {
338333

339-
HttpGet method = null;
340334
HttpResponse response = null;
341335
try {
342336
String storageUrl = "http://" + this.host + ":" + this.port
@@ -366,13 +360,13 @@ public AmpliPolicy getPolicy(String policyId) throws HttpException,
366360

367361
public AmpliNamespace createNamespace(AmpliNamespace namespace)
368362
throws HttpException, IOException, AmpliException {
369-
HttpPut method = null;
370-
HttpResponse response = null;
363+
364+
HttpResponse response = null;
371365
try {
372366
String storageUrl = "http://" + this.host + ":" + this.port
373367
+ nsRoot;
374368

375-
method = new HttpPut(storageUrl);
369+
method = HttpClientUtil.makeHttpGet(storageUrl);
376370

377371
method.setHeader("Content-Type", "text/plain");
378372

@@ -405,7 +399,7 @@ public String createNamespace(String namespace, String policy_id)
405399
String storageUrl = "http://" + this.host + ":" + this.port
406400
+ nsRoot;
407401

408-
method = new HttpPut(storageUrl);
402+
method = HttpClientUtil.makeHttpPut(storageUrl);
409403

410404
method.setHeader("Content-Type", "text/plain");
411405

@@ -438,7 +432,6 @@ public String createNamespace(String namespace, String policy_id)
438432
public AmpliNamespace getNamespace(String name) throws HttpException,
439433
IOException, AmpliException {
440434

441-
HttpGet method = null;
442435
HttpResponse response = null;
443436
try {
444437
String storageUrl = "http://" + this.host + ":" + this.port
@@ -469,7 +462,6 @@ public AmpliNamespace getNamespace(String name) throws HttpException,
469462
public boolean isNamespaceExisted(String name) throws HttpException,
470463
IOException, AmpliException {
471464

472-
HttpHead method = null;
473465
HttpResponse response = null;
474466
try {
475467
String storageUrl = "http://" + this.host + ":" + this.port
@@ -497,7 +489,7 @@ public boolean isNamespaceExisted(String name) throws HttpException,
497489

498490
public boolean deleteNamespace(String namespace) throws HttpException,
499491
IOException, AmpliException {
500-
HttpDelete method = null;
492+
501493
HttpResponse response = null;
502494
try {
503495
String storageUrl = "http://" + this.host + ":" + this.port
@@ -525,7 +517,7 @@ public Map<String, String> getObjectMetadata(String namespace,
525517
String objName) throws IOException, HttpException, AmpliException {
526518
String storageUrl = "http://" + this.host + ":" + this.port + nsRoot;
527519

528-
HttpGet method = HttpClientUtil.makeHttpGet(storageUrl + "/" + HttpClientUtil.encodeURL(namespace)
520+
method = HttpClientUtil.makeHttpGet(storageUrl + "/" + HttpClientUtil.encodeURL(namespace)
529521
+ "/" + HttpClientUtil.encodeURL(objName) + "?meta=http");
530522

531523
HttpResponse response = null;

dev/cosbench-cdmi-base/META-INF/MANIFEST.MF

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,25 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.6
88
Import-Package: com.intel.cosbench.api.auth,
99
com.intel.cosbench.api.context,
1010
com.intel.cosbench.api.storage,
11+
com.intel.cosbench.client.cdmi.util,
1112
com.intel.cosbench.client.http,
1213
com.intel.cosbench.config,
1314
com.intel.cosbench.log,
14-
com.intel.cosbench.client.cdmi.util,
1515
org.apache.commons.codec;version="[1.3.0,2.0.0)",
1616
org.apache.commons.codec.binary;version="1.3.0",
1717
org.apache.commons.codec.net;version="[1.3.0,2.0.0)",
1818
org.apache.commons.io.input;version="[1.3.0,2.0.0)",
1919
org.apache.commons.lang.math;version="2.5.0",
2020
org.apache.http;version="[4.1.4,5.0.0)",
21+
org.apache.http.auth.params;version="[4.1.3,5.0.0)",
2122
org.apache.http.client;version="[4.1.3,5.0.0)",
2223
org.apache.http.client.methods;version="[4.1.3,5.0.0)",
24+
org.apache.http.client.params;version="[4.1.3,5.0.0)",
25+
org.apache.http.client.protocol;version="[4.1.3,5.0.0)",
2326
org.apache.http.conn;version="[4.1.3,5.0.0)",
2427
org.apache.http.entity;version="[4.1.4,5.0.0)",
28+
org.apache.http.impl.client;version="[4.1.3,5.0.0)",
2529
org.apache.http.message;version="[4.1.4,5.0.0)",
2630
org.apache.http.params;version="[4.1.4,5.0.0)",
31+
org.apache.http.protocol;version="[4.1.4,5.0.0)",
2732
org.apache.http.util;version="[4.1.4,5.0.0)"

dev/cosbench-cdmi-base/src/com/intel/cosbench/api/cdmi/base/CDMIStorage.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,34 @@ public class CDMIStorage extends NoneStorage {
2323
// below parameters expect to get from configuration file.
2424
private int timeout;
2525
private String rootPath;
26+
private String type;
2627
private String headers;
2728
private boolean flag;
2829

2930
// local variables
30-
private CdmiClient client;
31+
private BaseCdmiClient client;
3132
private String[] header_list;
3233

3334
@Override
3435
public void init(Config config, Logger logger) {
3536
super.init(config, logger);
3637
initParms(config);
3738

38-
client = new CdmiClient(false);
39+
client = CdmiClientFactory.getClient(type);
3940
}
4041

4142
private void initParms(Config config) {
4243
rootPath = config.get(ROOT_PATH_KEY, ROOT_PATH_DEFAULT);
4344
timeout = config.getInt(TIMEOUT_KEY, TIMEOUT_DEFAULT);
4445
headers = config.get(CUSTOM_HEADERS_KEY, CUSTOM_HEADERS_DEFAULT);
4546
flag = config.getBoolean(RAISE_DELETE_ERRORS_KEY, RAISE_DELETE_ERRORS_DEFAULT);
47+
type = config.get(CDMI_CONTENT_TYPE_KEY, CDMI_CONTENT_TYPE_DEFAULT);
4648
header_list = headers.split(",");
4749

4850
parms.put(ROOT_PATH_KEY, rootPath);
4951
parms.put(TIMEOUT_KEY, timeout);
5052
parms.put(RAISE_DELETE_ERRORS_KEY, flag);
53+
parms.put(CDMI_CONTENT_TYPE_KEY, type);
5154
}
5255

5356
@Override
@@ -70,7 +73,7 @@ public void setAuthContext(AuthContext info) {
7073
}
7174

7275
logger.debug("httpclient =" + httpClient + ", url = " + url);
73-
client.init(httpClient, url, headerKV);
76+
client.init(httpClient, url, headerKV, false);
7477
} catch (Exception e) {
7578
throw new StorageException(e);
7679
}

0 commit comments

Comments
 (0)