Skip to content

Commit

Permalink
Merge pull request #1 from intel-cloud/master
Browse files Browse the repository at this point in the history
Updating to upstream current
  • Loading branch information
ddeflyer committed Jan 2, 2015
2 parents 9bb2442 + 2ad2cb0 commit e081893
Show file tree
Hide file tree
Showing 156 changed files with 13,576 additions and 2,114 deletions.
4 changes: 2 additions & 2 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<classpathentry kind="lib" path="dev/cosbench-s3/com.amazonaws-1.0.0.jar"/>
<classpathentry kind="lib" path="dev/cosbench-s3/commons-codec-1.3.jar"/>
<classpathentry kind="lib" path="dev/cosbench-s3/commons-logging-1.1.1.jar"/>
<classpathentry kind="lib" path="dev/cosbench-s3/freemarker-2.3.18.jar"/>
<classpathentry kind="lib" path="dev/cosbench-s3/freemarker-2.3.20.jar"/>
<classpathentry kind="lib" path="dev/cosbench-s3/httpclient-4.1.1.jar"/>
<classpathentry kind="lib" path="dev/cosbench-s3/httpcore-4.1.jar"/>
<classpathentry kind="lib" path="dev/cosbench-s3/jackson-core-asl-1.8.7.jar"/>
Expand All @@ -138,7 +138,7 @@
<classpathentry kind="lib" path="dev/cosbench-s3/stax-1.2.0.jar"/>
<classpathentry kind="lib" path="dev/cosbench-s3/stax-api-1.0.1.jar"/>
<classpathentry kind="lib" path="dist/main/org.eclipse.equinox.launcher_1.2.0.v20110502.jar"/>
<classpathentry kind="lib" path="dist/osgi/libs/com.springsource.freemarker-2.3.15.jar"/>
<classpathentry kind="lib" path="dist/osgi/libs/com.springsource.freemarker-2.3.20.jar"/>
<classpathentry kind="lib" path="dist/osgi/libs/com.springsource.javax.activation-1.1.1.jar"/>
<classpathentry kind="lib" path="dist/osgi/libs/com.springsource.javax.annotation-1.0.0.jar"/>
<classpathentry kind="lib" path="dist/osgi/libs/com.springsource.javax.ejb-3.0.0.jar"/>
Expand Down
17 changes: 0 additions & 17 deletions .project

This file was deleted.

2 changes: 1 addition & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ To debug both executables, a few special settings are required.
1.6 At the bundle table, for each bundle, there are two parameters: "Start Level" and "Auto-Start". The information can get from "osgi.bundles" parameter in config.ini.
e.g.
"libs/com.springsource.freemarker-2.3.15.jar@2\:start" means the freemarker bundle will be with "Start Level" = 2 and "Auto-Start" = true.
"libs/com.springsource.freemarker-2.3.20.jar@2\:start" means the freemarker bundle will be with "Start Level" = 2 and "Auto-Start" = true.
1.7 Some bundles may not set the two parameters, like "com.springsource.apache.coyote". in this case, just let it be.
Ensure below two system bundles are checked: **org.eclipse.equinox.launcher_1.2.0.v20110502.jar**, **org.eclipse.osgi-3.7.0.v20110613.jar**
Expand Down
33 changes: 33 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
COSBench 0.4.1.0(14-ww53.2)
------------------------------------
. Add one workload under workloads folder, whose distribution is summarized from two week's trace on ASUS WebStorage. Thanks ASUS' contribution!
. #223: current authorization doesn't support retry
. #222: completed operation count is mismatching with configured totalOps
. #220: UI: The current stage table shouldn't merge with stage table when workload terminates
. #212 swift show 401 error code
. #194 Config UI: Add detail to General Report Table located in view details section of Active Workloads : Need to add information about stage names
. #188 UI: Don't generate stagenames with comma characters in them


COSBench 0.4.0.1(14-ww48.5)
------------------------------------
. #214: ceph prepare stage very low success ratio and throwing erros
. #211: SwiftTokenCache needs to validate current token is valid
. #203: the driver "isAlive" status is green even the driver is not started
. #198: in v0.4.0.0, it seems the AFR doesn't take in effect in prepare stage
. #191: cosbench-start.sh fails while executing 'nc': TOOL_PARAMS is incorrect.
. #190: Config UI: Add detail to cleanup/dispose stage names
. #186: UI: Add detail to init and prepare stage names
. #178: Collect and view results for user-terminated jobs
. #159: Extend "histogram" selector to support "floating point" weights/percentages
. #156: Add "trigger" support
. #154: Add authentication caching support
. #147: UI: Advanced config UI Cleanup (part 1)
. #146: UI: Add tooltips to configurable params on the config UI
. #145: UI: Change storage url template depending on the storage type chosen
. #32: digest authentication support
. #29: Error handling improvement
. #19: Support LIST Api
. #12: after several hours running, cosbench's banners all disappear.


COSBench 0.4.0.0 (14-ww21.5)
------------------------------------
. #57: time synchronization
Expand Down
Binary file modified COSBench-User-Guide.odt
Binary file not shown.
Binary file modified COSBenchUserGuide.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.0.0
0.4.1
2 changes: 1 addition & 1 deletion dev/cosbench-ampli/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Cosbench Ampli Client Bundle
Bundle-SymbolicName: cosbench-ampli
Bundle-Version: 0.4.0.0
Bundle-Version: 0.4.1.0
Bundle-Vendor: intel
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: com.intel.cosbench.api.context,
Expand Down
2 changes: 1 addition & 1 deletion dev/cosbench-api/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: COSBench API Bundle
Bundle-SymbolicName: cosbench-api
Bundle-Version: 0.4.0.0
Bundle-Version: 0.4.1.0
Bundle-Vendor: intel
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: com.intel.cosbench.config,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ public interface AuthAPI {
* from execution engine.
*/
public void init(Config config, Logger logger);

/**
* Initializes a new HttpClient for WorkAgent to relogin.
*/
public void init();

/**
* Triggers the back-end authentication mechanism.
Expand All @@ -54,7 +59,7 @@ public interface AuthAPI {
* @return Context - one com.intel.cosbenchc.context.Context instance which contains all parameters
* configured for the authentication mechanism.
*/
public Context getParms();
public AuthContext getParms();

/**
* Releases the resources held by this Auth-API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
public interface AuthConstants {

String LOGGING_KEY = "logging";

Boolean LOGGING_DEFAULT = Boolean.FALSE;

String CACHING_KEY = "caching";
Boolean CACHING_DEFAULT = Boolean.FALSE;

}
15 changes: 12 additions & 3 deletions dev/cosbench-api/src/com/intel/cosbench/api/auth/NoneAuth.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ public class NoneAuth implements AuthAPI {

public static final String API_TYPE = "none";

protected Context parms;
protected AuthContext parms;
protected Logger logger;

/* configurations */
private boolean logging; // enable logging
private boolean caching; // enable caching

public NoneAuth() {
/* empty */
Expand All @@ -47,20 +48,28 @@ public NoneAuth() {
@Override
public void init(Config config, Logger logger) {
this.logger = logger;
this.parms = new Context();
this.parms = new DefaultAuthContext();

logging = config.getBoolean(LOGGING_KEY, LOGGING_DEFAULT);
caching = config.getBoolean(CACHING_KEY, CACHING_DEFAULT);

/* register all parameters */
parms.put(LOGGING_KEY, logging);
parms.put(CACHING_KEY, caching);
}
@Override
public void init() {
/* empty */
}


@Override
public void dispose() {
/* empty */
}

@Override
public Context getParms() {
public AuthContext getParms() {
return parms;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,27 @@
package com.intel.cosbench.api.context;

/**
* This class represents context information exchanged between an Auth-API and a
* Storage-API.
*
* @author ywang19, qzheng7
*
* @author ywang19
*
*/
public class AuthContext extends Context {
public abstract class AuthContext extends Context {

/**
* Generate unique ID for the authentication context with attached metadata, normally, it will
* extract some key-value pairs from the context to construct the ID.
*
* @param meta
* @return an unique ID
*/
public abstract String getID(String meta) ;


/**
* Generate unique ID for authentication context, normally, it will extract some key-value pairs
* from the context to construct the ID.
*
* @return an unique ID
*/
public abstract String getID();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
Copyright 2013 Intel Corporation, All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package com.intel.cosbench.api.context;

/**
* This class represents a default implementation of AuthContext.
*
* @author ywang19
*
*/
public class DefaultAuthContext extends AuthContext {

public String getID(String meta) {
return this.toString();
}

public String getID() {
return this.toString();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.io.*;
import java.util.*;

import com.intel.cosbench.api.auth.NoneAuth;
import com.intel.cosbench.api.context.*;
import com.intel.cosbench.config.Config;
import com.intel.cosbench.log.Logger;
Expand All @@ -39,7 +40,7 @@ public class NoneStorage implements StorageAPI {

protected Context parms;
protected Logger logger;

protected Boolean authFlag;
/* configurations */
private boolean logging; // enable logging

Expand All @@ -55,10 +56,12 @@ public void init(Config config, Logger logger) {
logging = config.getBoolean(LOGGING_KEY, LOGGING_DEFAULT);
/* register all parameters */
parms.put(LOGGING_KEY, logging);
authFlag = false;
}

@Override
public void setAuthContext(AuthContext info) {
setAuthFlag(true);
/* empty */
}

Expand Down Expand Up @@ -89,6 +92,13 @@ public InputStream getObject(String container, String object, Config config) {
logger.info("performing GET at /{}/{}", container, object);
return new ByteArrayInputStream(new byte[] {});
}

@Override
public InputStream getList(String container, String object, Config config) {
if (logging)
logger.info("performing LIST at /{}/{}", container, object);
return new ByteArrayInputStream(new byte[] {});
}

@Override
public void createContainer(String container, Config config) {
Expand Down Expand Up @@ -134,5 +144,10 @@ protected Map<String, String> getMetadata(String container, String object,
logger.info("performing HEAD at /{}/{}", container, object);
return Collections.emptyMap();
}

public void setAuthFlag(Boolean auth) {
this.authFlag = auth;
}
public Boolean isAuthValid() {
return authFlag;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@ public interface StorageAPI {
*/
public InputStream getObject(String container, String object, Config config);

/**
* Gets a list of containers/objects
*
* @param container
* - the name of a container.
* @param object
* - the name of an object.
* @param config
* - the configuration used for this operation.
*/
public InputStream getList(String container, String object, Config config);

/**
* Creates a new container.
*
Expand Down Expand Up @@ -138,10 +150,22 @@ public void createObject(String container, String object, InputStream data,
*/
public void deleteObject(String container, String object, Config config);

// public Map<String, String> getMetadata(String container, String object,
// Config config);
//
// public void createMetadata(String container, String object, Map<String,
// String> map, Config config);
// public Map<String, String> getMetadata(String container, String object,
// Config config);
//
// public void createMetadata(String container, String object, Map<String,
// String> map, Config config);

/**
* set the current authorization validity
* @param auth
* - if the current authorization valid or not
*/
public void setAuthFlag(Boolean auth);
/**
* check if the current authorization valid
*
*/
public Boolean isAuthValid();

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ public interface StorageConstants {

String LOGGING_KEY = "logging";

Boolean LOGGING_DEFAULT = Boolean.FALSE;
Boolean LOGGING_DEFAULT = Boolean.TRUE;

}
2 changes: 1 addition & 1 deletion dev/cosbench-castor/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: COSBench Castor Configuration Bundle
Bundle-SymbolicName: cosbench-castor
Bundle-Version: 0.4.0.0
Bundle-Version: 0.4.1.0
Bundle-Vendor: intel
Fragment-Host: com.springsource.org.castor;bundle-version="[1.2.0,2.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Expand Down
2 changes: 1 addition & 1 deletion dev/cosbench-cdmi-base/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: CDMI Base Client Bundle
Bundle-SymbolicName: cosbench-cdmi-base
Bundle-Version: 0.4.0.0
Bundle-Version: 0.4.1.0
Bundle-Vendor: intel
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: com.intel.cosbench.api.auth,
Expand Down
Loading

0 comments on commit e081893

Please sign in to comment.