diff --git a/.editorconfig b/.editorconfig index 889bbb16..b5d9cacc 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,17 +1,32 @@ +# Copyright (c) 2015, 2017 YCSB contributors. +# 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. See accompanying +# LICENSE file. # For more info, see: http://EditorConfig.org root = true [*.java] indent_style = space indent_size = 2 continuation_indent_size = 4 [*.md] indent_style = space indent_size = 2 continuation_indent_size = 4 [*.xml] indent_style = space indent_size = 2 continuation_indent_size = 4 diff --git a/core/src/main/resources/project.properties b/core/src/main/resources/project.properties index defbd482..9c6df29b 100644 --- a/core/src/main/resources/project.properties +++ b/core/src/main/resources/project.properties @@ -1 +1,15 @@ +# Copyright (c) 2016 YCSB contributors. 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. See accompanying +# LICENSE file. version=${project.version} diff --git a/elasticsearch5/src/main/resources/log4j2.properties b/elasticsearch5/src/main/resources/log4j2.properties index dc3e1ceb..866654ae 100644 --- a/elasticsearch5/src/main/resources/log4j2.properties +++ b/elasticsearch5/src/main/resources/log4j2.properties @@ -1,8 +1,23 @@ +# Copyright (c) 2017 YCSB contributors. 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. See accompanying +# LICENSE file. +# appender.console.type = Console appender.console.name = console appender.console.layout.type = PatternLayout appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n appender.console.targetStr = SYSTEM_ERR rootLogger.level = info rootLogger.appenderRef.console.ref = console diff --git a/elasticsearch5/src/test/java/com/yahoo/ycsb/db/elasticsearch5/ElasticsearchIntegTestBase.java b/elasticsearch5/src/test/java/com/yahoo/ycsb/db/elasticsearch5/ElasticsearchIntegTestBase.java index dda76633..12ab5052 100644 --- a/elasticsearch5/src/test/java/com/yahoo/ycsb/db/elasticsearch5/ElasticsearchIntegTestBase.java +++ b/elasticsearch5/src/test/java/com/yahoo/ycsb/db/elasticsearch5/ElasticsearchIntegTestBase.java @@ -1,119 +1,135 @@ +/* + * Copyright (c) 2017 YCSB contributors. 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. See accompanying + * LICENSE file. + */ package com.yahoo.ycsb.db.elasticsearch5; import com.yahoo.ycsb.ByteIterator; import com.yahoo.ycsb.Client; import com.yahoo.ycsb.DB; import com.yahoo.ycsb.DBException; import com.yahoo.ycsb.Status; import com.yahoo.ycsb.StringByteIterator; import org.junit.After; import org.junit.Before; import org.junit.Test; import java.util.HashMap; import java.util.Properties; import java.util.Set; import java.util.Vector; import static org.junit.Assert.assertEquals; public abstract class ElasticsearchIntegTestBase { private DB db; abstract DB newDB(); private final static HashMap MOCK_DATA; private final static String MOCK_TABLE = "MOCK_TABLE"; static { MOCK_DATA = new HashMap<>(10); for (int i = 1; i <= 10; i++) { MOCK_DATA.put("field" + i, new StringByteIterator("value" + i)); } } @Before public void setUp() throws DBException { final Properties props = new Properties(); props.put("es.new_index", "true"); props.put("es.setting.cluster.name", "test"); db = newDB(); db.setProperties(props); db.init(); for (int i = 0; i < 16; i++) { db.insert(MOCK_TABLE, Integer.toString(i), MOCK_DATA); } } @After public void tearDown() throws DBException { db.cleanup(); } @Test public void testInsert() { final Status result = db.insert(MOCK_TABLE, "0", MOCK_DATA); assertEquals(Status.OK, result); } /** * Test of delete method, of class ElasticsearchClient. */ @Test public void testDelete() { final Status result = db.delete(MOCK_TABLE, "1"); assertEquals(Status.OK, result); } /** * Test of read method, of class ElasticsearchClient. */ @Test public void testRead() { final Set fields = MOCK_DATA.keySet(); final HashMap resultParam = new HashMap<>(10); final Status result = db.read(MOCK_TABLE, "1", fields, resultParam); assertEquals(Status.OK, result); } /** * Test of update method, of class ElasticsearchClient. */ @Test public void testUpdate() { final HashMap newValues = new HashMap<>(10); for (int i = 1; i <= 10; i++) { newValues.put("field" + i, new StringByteIterator("newvalue" + i)); } final Status updateResult = db.update(MOCK_TABLE, "1", newValues); assertEquals(Status.OK, updateResult); // validate that the values changed final HashMap resultParam = new HashMap<>(10); final Status readResult = db.read(MOCK_TABLE, "1", MOCK_DATA.keySet(), resultParam); assertEquals(Status.OK, readResult); for (int i = 1; i <= 10; i++) { assertEquals("newvalue" + i, resultParam.get("field" + i).toString()); } } /** * Test of scan method, of class ElasticsearchClient. */ @Test public void testScan() { final int recordcount = 10; final Set fields = MOCK_DATA.keySet(); final Vector> resultParam = new Vector<>(10); final Status result = db.scan(MOCK_TABLE, "1", recordcount, fields, resultParam); assertEquals(Status.OK, result); assertEquals(10, resultParam.size()); } } diff --git a/kudu/src/main/resources/log4j.properties b/kudu/src/main/resources/log4j.properties index 7a754a8b..549fd4ae 100644 --- a/kudu/src/main/resources/log4j.properties +++ b/kudu/src/main/resources/log4j.properties @@ -1,11 +1,26 @@ +# Copyright (c) 2016 YCSB contributors. 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. See accompanying +# LICENSE file. +# # Root logger option log4j.rootLogger=DEBUG, stderr log4j.logger.com.stumbleupon.async=WARN log4j.logger.org.apache.kudu=WARN # Direct log messages to stderr log4j.appender.stderr = org.apache.log4j.ConsoleAppender log4j.appender.stderr.Target=System.err log4j.appender.stderr.layout = org.apache.log4j.PatternLayout log4j.appender.stderr.layout.ConversionPattern = [%p] %d{HH:mm:ss.SSS} (%F:%L) %m%n diff --git a/mapkeeper/README.md b/mapkeeper/README.md index bc441ba6..0f6076f4 100644 --- a/mapkeeper/README.md +++ b/mapkeeper/README.md @@ -1,9 +1,25 @@ + # MapKeeper-Specific Properties ## mapkeeper.host Specifies the host MapKeeper server is running on (default: localhost). ## mapkeeper.port Specifies the port MapKeeper server is listening to (default: 9090). diff --git a/nosqldb/README.md b/nosqldb/README.md index 2b080d4a..878a6a5b 100644 --- a/nosqldb/README.md +++ b/nosqldb/README.md @@ -1,30 +1,46 @@ + CONFIGURE $KVHOME is Oracle NoSQL Database package files. $KVROOT is a data directory. $YCSBHOME is a YCSB home directory. mkdir $KVROOT java -jar $KVHOME/lib/kvstore-1.2.123.jar makebootconfig \ -root $KVROOT -port 5000 -admin 5001 -host localhost \ -harange 5010,5020 java -jar $KVHOME/lib/kvstore-1.2.123.jar start -root $KVROOT java -jar $KVHOME/lib/kvstore-1.2.123.jar runadmin \ -port 5000 -host localhost -script $YCSBHOME/conf/script.txt BENCHMARK $YCSBHOME/bin/ycsb load nosqldb -P workloads/workloada $YCSBHOME/bin/ycsb run nosqldb -P workloads/workloada PROPERTIES See $YCSBHOME/conf/nosqldb.properties. STOP $ java -jar $KVHOME/lib/kvstore-1.2.123.jar stop -root $KVROOT Please refer to Oracle NoSQL Database docs here: http://docs.oracle.com/cd/NOSQL/html/index.html diff --git a/orientdb/src/main/resources/log4j.properties b/orientdb/src/main/resources/log4j.properties index 0ede1d4c..86345ce7 100644 --- a/orientdb/src/main/resources/log4j.properties +++ b/orientdb/src/main/resources/log4j.properties @@ -1,8 +1,22 @@ +# Copyright (c) 2016 YCSB contributors. 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. See accompanying +# LICENSE file. # Root logger option log4j.rootLogger=INFO, stderr # Direct log messages to stderr log4j.appender.stderr=org.apache.log4j.ConsoleAppender log4j.appender.stderr.Target=System.err log4j.appender.stderr.layout=org.apache.log4j.PatternLayout log4j.appender.stderr.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n diff --git a/rest/pom.xml b/rest/pom.xml index c980b04f..1bfe2f51 100644 --- a/rest/pom.xml +++ b/rest/pom.xml @@ -1,118 +1,133 @@ 4.0.0 com.yahoo.ycsb binding-parent 0.14.0-SNAPSHOT ../binding-parent rest-binding Rest Client Binding jar true 8.0.28 2.6 4.5.1 4.4.4 4.12 1.16.0 com.yahoo.ycsb core ${project.version} provided org.apache.httpcomponents httpclient ${httpclient.version} org.apache.httpcomponents httpcore ${httpcore.version} junit junit ${junit.version} test com.github.stefanbirkner system-rules ${system-rules.version} org.glassfish.jersey.core jersey-server ${jersey.version} org.glassfish.jersey.core jersey-client ${jersey.version} org.glassfish.jersey.containers jersey-container-servlet-core ${jersey.version} org.apache.tomcat tomcat-dbcp ${tomcat.version} org.apache.tomcat tomcat-juli org.apache.tomcat.embed tomcat-embed-core ${tomcat.version} org.apache.tomcat.embed tomcat-embed-logging-juli ${tomcat.version} org.apache.tomcat.embed tomcat-embed-logging-log4j ${tomcat.version} org.apache.tomcat.embed tomcat-embed-jasper ${tomcat.version} org.apache.tomcat.embed tomcat-embed-websocket ${tomcat.version} + + + + org.apache.rat + apache-rat-plugin + + + src/test/resources/error_trace.txt + src/test/resources/trace.txt + + + + + + diff --git a/rest/src/test/resources/WebContent/index.html b/rest/src/test/resources/WebContent/index.html index ded87fc2..73634eac 100644 --- a/rest/src/test/resources/WebContent/index.html +++ b/rest/src/test/resources/WebContent/index.html @@ -1,13 +1,29 @@ + rest-binding Welcome to the rest-binding integration test cases! - \ No newline at end of file + diff --git a/s3/src/main/conf/s3.properties b/s3/src/main/conf/s3.properties index f36c7745..5fa6451e 100644 --- a/s3/src/main/conf/s3.properties +++ b/s3/src/main/conf/s3.properties @@ -1,31 +1,45 @@ +# Copyright (c) 2015 YCSB contributors. 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. See accompanying +# LICENSE file. # # Sample S3 configuration properties # # You may either set properties here or via the command line. # # the AWS S3 access key ID s3.accessKeyId=yourKey # the AWS S3 secret access key ID s3.secretKey=YourSecret # the AWS endpoint s3.endpoint=s3.amazonaws.com # activating the SSE server side encryption if true s3.sse=false # activating the SSE-C client side encryption if used #s3.ssec=U2CccCI40he2mZtg2aCEzofP7nQsfy4nP14VSYu6bFA= # set the protocol to use for the Client, default is HTTPS #s3.protocol=HTTPS # set the maxConnections to use for the Client, it should be not less than the # threads since only one client is created and shared between threads #s3.maxConnections= # set the maxErrorRetry parameter to use for the Client #s3.maxErrorRetry= diff --git a/solr/src/main/resources/log4j.properties b/solr/src/main/resources/log4j.properties index 0ede1d4c..86345ce7 100644 --- a/solr/src/main/resources/log4j.properties +++ b/solr/src/main/resources/log4j.properties @@ -1,8 +1,22 @@ +# Copyright (c) 2016 YCSB contributors. 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. See accompanying +# LICENSE file. # Root logger option log4j.rootLogger=INFO, stderr # Direct log messages to stderr log4j.appender.stderr=org.apache.log4j.ConsoleAppender log4j.appender.stderr.Target=System.err log4j.appender.stderr.layout=org.apache.log4j.PatternLayout log4j.appender.stderr.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n diff --git a/solr6/src/main/resources/log4j.properties b/solr6/src/main/resources/log4j.properties index 0ede1d4c..86345ce7 100644 --- a/solr6/src/main/resources/log4j.properties +++ b/solr6/src/main/resources/log4j.properties @@ -1,8 +1,22 @@ +# Copyright (c) 2016 YCSB contributors. 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. See accompanying +# LICENSE file. # Root logger option log4j.rootLogger=INFO, stderr # Direct log messages to stderr log4j.appender.stderr=org.apache.log4j.ConsoleAppender log4j.appender.stderr.Target=System.err log4j.appender.stderr.layout=org.apache.log4j.PatternLayout log4j.appender.stderr.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n