From: Rob Daugherty Date: Mon, 5 Nov 2018 15:23:04 +0000 (-0500) Subject: Modularized mdbc build X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=95d22d7491ea365fdc4525e44d484c73c33e16a1;p=music%2Fmdbc.git Modularized mdbc build The mdbc pom should inherit from oparent. The top-level pom should not build the jar directly. It should be a parent pom for mdbc submodules. The first submodule will be called mdbc-server. Note: the "mdbc" jar will now be called "mdbc-server". Change-Id: I4456e659b7494641e5b3cefd540eb62a149b79a4 Issue-ID: MUSIC-175 Signed-off-by: Rob Daugherty --- diff --git a/.gitignore b/.gitignore index e30806c..ff3bfdd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ .idea target mdbc.iml +.project +.settings +.classpath +.checkstyle diff --git a/README.md b/README.md index afabf30..0384930 100755 --- a/README.md +++ b/README.md @@ -36,9 +36,8 @@ run mysql/mariadb (5.7+, 10.2.3+) Download and install MUSIC (branch dev-cassandra-only). Install the jar into your local maven repository (from MUSIC home run) mvn install:install-file -Dfile=target/MUSIC.jar -DpomFile=./pom.xml - 1) Create a configuration file using as a template: -src/main/java/org/onap/music/mdbc/configurations/tableConfiguration.json +mdbc-server/src/main/java/org/onap/music/mdbc/configurations/tableConfiguration.json The meaning of the fields is as follows: @@ -57,11 +56,11 @@ o replicationFactor: indicates the needs of replication for this partition (the 2) Create the configuration for each node using the command line program in the following location: -src/main/java/org/onap/music/mdbc/tools/CreateNodeConfiguration.java +mdbc-server/src/main/java/org/onap/music/mdbc/tools/CreateNodeConfiguration.java To run it, use the following parameters: --t ../ETDB/src/main/java/org/onap/music/mdbc/configurations/tableConfiguration.json -b base -o /Users/quique/Desktop/ +-t mdbc-server/src/main/java/org/onap/music/mdbc/configurations/tableConfiguration.json -b base -o /Users/quique/Desktop/ This program is going to generate all the required configuration json for each ETDB node in the system and additionally initialize all the corresponding rows and tables for the system to correctly work. The meaning of the parameters is: • -t: the tableConfiguration.json explained in the step 1 @@ -75,11 +74,11 @@ Some notes about the limitations of this command line program: 3) Run each of the server in its corresponding node: The ETDB server can be found in the file: -src/main/java/org/onap/music/mdbc/MdbcServer.java +mdbc-server/src/main/java/org/onap/music/mdbc/MdbcServer.java It requires three parameters: - -c ../ETDB/src/main/java/org/onap/music/mdbc/configurations/config-0.json -u jdbc:mysql://localhost -p 30000 + -c mdbc-server/src/main/java/org/onap/music/mdbc/configurations/config-0.json -u jdbc:mysql://localhost -p 30000 -c is a json with the configuration created in step 2. • -u is where the local mysql database is located (without the database name, just the url, see example) @@ -87,7 +86,7 @@ It requires three parameters: 4) Run the clients. A client example can be found in this folder: -src/main/java/org/onap/music/mdbc/examples +mdbc-server/src/main/java/org/onap/music/mdbc/examples ## Building METRIC diff --git a/mdbc-server/pom.xml b/mdbc-server/pom.xml new file mode 100755 index 0000000..c86a7e9 --- /dev/null +++ b/mdbc-server/pom.xml @@ -0,0 +1,198 @@ + + + + 4.0.0 + org.onap.music.mdbc + mdbc-server + 0.0.1-SNAPSHOT + mdbc-server + MDBC Server + jar + + + org.onap.music.mdbc + mdbc + 0.0.1-SNAPSHOT + + + + + com.datastax.cassandra + cassandra-driver-core + 3.3.0 + + + + + com.google.guava + guava + 19.0 + + + + + org.eclipse.jetty + jetty-http + 9.2.19.v20160908 + + + + + org.eclipse.jetty + jetty-server + 9.2.19.v20160908 + + + + org.eclipse.jetty + jetty-security + 9.2.19.v20160908 + + + + org.eclipse.jetty + jetty-util + 9.2.19.v20160908 + + + com.h2database + h2 + 1.4.195 + + + org.slf4j + slf4j-log4j12 + 1.6.1 + + + org.json + json + 20160810 + + + mysql + mysql-connector-java + 5.1.32 + + + + org.apache.commons + commons-lang3 + 3.7 + + + + net.jpountz.lz4 + lz4 + 1.3.0 + + + org.xerial.snappy + snappy-java + 1.1.2.6 + + + junit + junit + 4.12 + test + + + com.vmlens + concurrent-junit + 1.0.0 + test + + + com.github.jsqlparser + jsqlparser + 1.1 + + + com.att.eelf + eelf-core + 1.0.0 + + + + + javax.servlet + servlet-api + 2.5 + provided + + + + org.apache.calcite.avatica + avatica-server + 1.12.0 + + + + org.apache.calcite + calcite-plus + 1.12.0 + + + com.beust + jcommander + 1.72 + + + com.google.code.gson + gson + 2.8.5 + + + org.mariadb.jdbc + mariadb-java-client + 1.1.7 + + + org.onap.music + MUSIC + 3.2.0 + + + + + + + maven-assembly-plugin + 3.1.0 + + + jar-with-dependencies + + + + + make-assembly + package + + single + + + + + + + diff --git a/src/main/java/org/onap/music/exceptions/MDBCServiceException.java b/mdbc-server/src/main/java/org/onap/music/exceptions/MDBCServiceException.java similarity index 65% rename from src/main/java/org/onap/music/exceptions/MDBCServiceException.java rename to mdbc-server/src/main/java/org/onap/music/exceptions/MDBCServiceException.java index 9be84e5..63ebbcc 100644 --- a/src/main/java/org/onap/music/exceptions/MDBCServiceException.java +++ b/mdbc-server/src/main/java/org/onap/music/exceptions/MDBCServiceException.java @@ -1,25 +1,22 @@ /* - * ============LICENSE_START========================================== - * org.onap.music - * =================================================================== - * Copyright (c) 2017 AT&T Intellectual Property - * =================================================================== - * 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 + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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 + * 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. - * - * ============LICENSE_END============================================= - * ==================================================================== + * 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. + * ============LICENSE_END====================================================== */ - package org.onap.music.exceptions; /** diff --git a/src/main/java/org/onap/music/exceptions/QueryException.java b/mdbc-server/src/main/java/org/onap/music/exceptions/QueryException.java similarity index 66% rename from src/main/java/org/onap/music/exceptions/QueryException.java rename to mdbc-server/src/main/java/org/onap/music/exceptions/QueryException.java index 72a7cee..b698a74 100644 --- a/src/main/java/org/onap/music/exceptions/QueryException.java +++ b/mdbc-server/src/main/java/org/onap/music/exceptions/QueryException.java @@ -1,28 +1,24 @@ /* - * ============LICENSE_START========================================== - * org.onap.music - * =================================================================== - * Copyright (c) 2017 AT&T Intellectual Property - * =================================================================== - * 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 + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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 + * 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. - * - * ============LICENSE_END============================================= - * ==================================================================== + * 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. + * ============LICENSE_END====================================================== */ package org.onap.music.exceptions; - - /** * @author inam * diff --git a/src/main/java/org/onap/music/logging/EELFLoggerDelegate.java b/mdbc-server/src/main/java/org/onap/music/logging/EELFLoggerDelegate.java similarity index 89% rename from src/main/java/org/onap/music/logging/EELFLoggerDelegate.java rename to mdbc-server/src/main/java/org/onap/music/logging/EELFLoggerDelegate.java index 16a70dd..d8b5256 100644 --- a/src/main/java/org/onap/music/logging/EELFLoggerDelegate.java +++ b/mdbc-server/src/main/java/org/onap/music/logging/EELFLoggerDelegate.java @@ -1,4 +1,22 @@ - +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.logging; import static com.att.eelf.configuration.Configuration.MDC_SERVER_FQDN; diff --git a/src/main/java/org/onap/music/logging/format/AppMessages.java b/mdbc-server/src/main/java/org/onap/music/logging/format/AppMessages.java similarity index 84% rename from src/main/java/org/onap/music/logging/format/AppMessages.java rename to mdbc-server/src/main/java/org/onap/music/logging/format/AppMessages.java index 304719c..7bb5eca 100644 --- a/src/main/java/org/onap/music/logging/format/AppMessages.java +++ b/mdbc-server/src/main/java/org/onap/music/logging/format/AppMessages.java @@ -1,25 +1,22 @@ /* - * ============LICENSE_START========================================== - * org.onap.music - * =================================================================== - * Copyright (c) 2017 AT&T Intellectual Property - * =================================================================== - * 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 + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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 + * 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. - * - * ============LICENSE_END============================================= - * ==================================================================== + * 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. + * ============LICENSE_END====================================================== */ - package org.onap.music.logging.format; /** diff --git a/mdbc-server/src/main/java/org/onap/music/logging/format/ErrorSeverity.java b/mdbc-server/src/main/java/org/onap/music/logging/format/ErrorSeverity.java new file mode 100644 index 0000000..2d48b2d --- /dev/null +++ b/mdbc-server/src/main/java/org/onap/music/logging/format/ErrorSeverity.java @@ -0,0 +1,35 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ +package org.onap.music.logging.format; + +/** + * @author inam + * + */ +public enum ErrorSeverity { + INFO, + WARN, + ERROR, + FATAL, + CRITICAL, + MAJOR, + MINOR, + NONE, +} diff --git a/mdbc-server/src/main/java/org/onap/music/logging/format/ErrorTypes.java b/mdbc-server/src/main/java/org/onap/music/logging/format/ErrorTypes.java new file mode 100644 index 0000000..3ac4c97 --- /dev/null +++ b/mdbc-server/src/main/java/org/onap/music/logging/format/ErrorTypes.java @@ -0,0 +1,42 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ +package org.onap.music.logging.format; + +import com.att.eelf.i18n.EELFResolvableErrorEnum; + +/** + * @author inam + * + */ +public enum ErrorTypes implements EELFResolvableErrorEnum { + + + CONNECTIONERROR, + SESSIONEXPIRED, + AUTHENTICATIONERROR, + SERVICEUNAVAILABLE, + QUERYERROR, + DATAERROR, + GENERALSERVICEERROR, + MUSICSERVICEERROR, + LOCKINGERROR, + UNKNOWN, + +} diff --git a/src/main/java/org/onap/music/mdbc/ArchiveProcess.java b/mdbc-server/src/main/java/org/onap/music/mdbc/ArchiveProcess.java similarity index 67% rename from src/main/java/org/onap/music/mdbc/ArchiveProcess.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/ArchiveProcess.java index 26a1ef3..c61d39e 100644 --- a/src/main/java/org/onap/music/mdbc/ArchiveProcess.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/ArchiveProcess.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc; import org.json.JSONObject; diff --git a/src/main/java/org/onap/music/mdbc/Configuration.java b/mdbc-server/src/main/java/org/onap/music/mdbc/Configuration.java similarity index 50% rename from src/main/java/org/onap/music/mdbc/Configuration.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/Configuration.java index a4516dd..f876548 100644 --- a/src/main/java/org/onap/music/mdbc/Configuration.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/Configuration.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc; public class Configuration { diff --git a/src/main/java/org/onap/music/mdbc/DatabaseOperations.java b/mdbc-server/src/main/java/org/onap/music/mdbc/DatabaseOperations.java similarity index 94% rename from src/main/java/org/onap/music/mdbc/DatabaseOperations.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/DatabaseOperations.java index c384199..e10fe96 100644 --- a/src/main/java/org/onap/music/mdbc/DatabaseOperations.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/DatabaseOperations.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc; import com.datastax.driver.core.ResultSet; diff --git a/src/main/java/org/onap/music/mdbc/DatabasePartition.java b/mdbc-server/src/main/java/org/onap/music/mdbc/DatabasePartition.java similarity index 82% rename from src/main/java/org/onap/music/mdbc/DatabasePartition.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/DatabasePartition.java index 5d91dca..e6b4e0e 100644 --- a/src/main/java/org/onap/music/mdbc/DatabasePartition.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/DatabasePartition.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc; import java.io.BufferedReader; diff --git a/src/main/java/org/onap/music/mdbc/LockId.java b/mdbc-server/src/main/java/org/onap/music/mdbc/LockId.java similarity index 51% rename from src/main/java/org/onap/music/mdbc/LockId.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/LockId.java index 9401f26..05483e5 100644 --- a/src/main/java/org/onap/music/mdbc/LockId.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/LockId.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc; public class LockId { diff --git a/src/main/java/org/onap/music/mdbc/MDBCUtils.java b/mdbc-server/src/main/java/org/onap/music/mdbc/MDBCUtils.java similarity index 72% rename from src/main/java/org/onap/music/mdbc/MDBCUtils.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/MDBCUtils.java index 2e150bd..4d43177 100644 --- a/src/main/java/org/onap/music/mdbc/MDBCUtils.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/MDBCUtils.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc; import java.io.*; diff --git a/src/main/java/org/onap/music/mdbc/MdbcCallableStatement.java b/mdbc-server/src/main/java/org/onap/music/mdbc/MdbcCallableStatement.java similarity index 95% rename from src/main/java/org/onap/music/mdbc/MdbcCallableStatement.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/MdbcCallableStatement.java index 95a49a8..b820686 100644 --- a/src/main/java/org/onap/music/mdbc/MdbcCallableStatement.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/MdbcCallableStatement.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc; import java.io.InputStream; diff --git a/src/main/java/org/onap/music/mdbc/MdbcConnection.java b/mdbc-server/src/main/java/org/onap/music/mdbc/MdbcConnection.java similarity index 92% rename from src/main/java/org/onap/music/mdbc/MdbcConnection.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/MdbcConnection.java index b553fb5..352eacf 100644 --- a/src/main/java/org/onap/music/mdbc/MdbcConnection.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/MdbcConnection.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc; import java.sql.Array; diff --git a/src/main/java/org/onap/music/mdbc/MdbcPreparedStatement.java b/mdbc-server/src/main/java/org/onap/music/mdbc/MdbcPreparedStatement.java similarity index 95% rename from src/main/java/org/onap/music/mdbc/MdbcPreparedStatement.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/MdbcPreparedStatement.java index e781b4b..fa08d3c 100644 --- a/src/main/java/org/onap/music/mdbc/MdbcPreparedStatement.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/MdbcPreparedStatement.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc; import java.io.InputStream; diff --git a/src/main/java/org/onap/music/mdbc/MdbcServer.java b/mdbc-server/src/main/java/org/onap/music/mdbc/MdbcServer.java similarity index 87% rename from src/main/java/org/onap/music/mdbc/MdbcServer.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/MdbcServer.java index 4f83a54..d4c0933 100644 --- a/src/main/java/org/onap/music/mdbc/MdbcServer.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/MdbcServer.java @@ -1,21 +1,23 @@ -package org.onap.music.mdbc; - /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to you 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 - * + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== */ +package org.onap.music.mdbc; import org.onap.music.mdbc.configurations.NodeConfiguration; import org.apache.calcite.avatica.remote.Driver.Serialization; diff --git a/src/main/java/org/onap/music/mdbc/MdbcServerLogic.java b/mdbc-server/src/main/java/org/onap/music/mdbc/MdbcServerLogic.java similarity index 92% rename from src/main/java/org/onap/music/mdbc/MdbcServerLogic.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/MdbcServerLogic.java index a1984c2..33c5dbb 100644 --- a/src/main/java/org/onap/music/mdbc/MdbcServerLogic.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/MdbcServerLogic.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc; import java.sql.Connection; diff --git a/src/main/java/org/onap/music/mdbc/MdbcStatement.java b/mdbc-server/src/main/java/org/onap/music/mdbc/MdbcStatement.java similarity index 92% rename from src/main/java/org/onap/music/mdbc/MdbcStatement.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/MdbcStatement.java index 93fe80a..320531f 100644 --- a/src/main/java/org/onap/music/mdbc/MdbcStatement.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/MdbcStatement.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc; import java.sql.Connection; diff --git a/src/main/java/org/onap/music/mdbc/MusicSqlManager.java b/mdbc-server/src/main/java/org/onap/music/mdbc/MusicSqlManager.java similarity index 92% rename from src/main/java/org/onap/music/mdbc/MusicSqlManager.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/MusicSqlManager.java index 741ee9e..50c307e 100755 --- a/src/main/java/org/onap/music/mdbc/MusicSqlManager.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/MusicSqlManager.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc; import java.sql.Connection; diff --git a/src/main/java/org/onap/music/mdbc/ProxyStatement.java b/mdbc-server/src/main/java/org/onap/music/mdbc/ProxyStatement.java similarity index 97% rename from src/main/java/org/onap/music/mdbc/ProxyStatement.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/ProxyStatement.java index e84dc7b..49b032e 100755 --- a/src/main/java/org/onap/music/mdbc/ProxyStatement.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/ProxyStatement.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc; import java.io.InputStream; diff --git a/src/main/java/org/onap/music/mdbc/Range.java b/mdbc-server/src/main/java/org/onap/music/mdbc/Range.java similarity index 50% rename from src/main/java/org/onap/music/mdbc/Range.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/Range.java index 8ed0150..e182368 100644 --- a/src/main/java/org/onap/music/mdbc/Range.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/Range.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc; import java.io.Serializable; @@ -43,4 +62,4 @@ public class Range implements Serializable { public boolean overlaps(Range other) { return table == other.table; } -} \ No newline at end of file +} diff --git a/mdbc-server/src/main/java/org/onap/music/mdbc/RedoRow.java b/mdbc-server/src/main/java/org/onap/music/mdbc/RedoRow.java new file mode 100644 index 0000000..dc46445 --- /dev/null +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/RedoRow.java @@ -0,0 +1,50 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ +package org.onap.music.mdbc; + +import java.util.UUID; + +public class RedoRow { + private String redoTableName; + private UUID redoRowIndex; + + public RedoRow(){} + + public RedoRow(String redoTableName, UUID redoRowIndex){ + this.redoRowIndex = redoRowIndex; + this.redoTableName = redoTableName; + } + + public String getRedoTableName() { + return redoTableName; + } + + public void setRedoTableName(String redoTableName) { + this.redoTableName = redoTableName; + } + + public UUID getRedoRowIndex() { + return redoRowIndex; + } + + public void setRedoRowIndex(UUID redoRowIndex) { + this.redoRowIndex = redoRowIndex; + } +} diff --git a/src/main/java/org/onap/music/mdbc/StateManager.java b/mdbc-server/src/main/java/org/onap/music/mdbc/StateManager.java similarity index 89% rename from src/main/java/org/onap/music/mdbc/StateManager.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/StateManager.java index 4c7b9aa..b8a4540 100644 --- a/src/main/java/org/onap/music/mdbc/StateManager.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/StateManager.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc; import org.onap.music.exceptions.MDBCServiceException; diff --git a/src/main/java/org/onap/music/mdbc/TableInfo.java b/mdbc-server/src/main/java/org/onap/music/mdbc/TableInfo.java similarity index 67% rename from src/main/java/org/onap/music/mdbc/TableInfo.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/TableInfo.java index ee272d8..e92e187 100755 --- a/src/main/java/org/onap/music/mdbc/TableInfo.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/TableInfo.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc; import java.sql.Types; diff --git a/src/main/java/org/onap/music/mdbc/configurations/NodeConfiguration.java b/mdbc-server/src/main/java/org/onap/music/mdbc/configurations/NodeConfiguration.java similarity index 71% rename from src/main/java/org/onap/music/mdbc/configurations/NodeConfiguration.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/configurations/NodeConfiguration.java index 156c901..fb4656c 100644 --- a/src/main/java/org/onap/music/mdbc/configurations/NodeConfiguration.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/configurations/NodeConfiguration.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.configurations; import org.onap.music.logging.EELFLoggerDelegate; diff --git a/src/main/java/org/onap/music/mdbc/configurations/TablesConfiguration.java b/mdbc-server/src/main/java/org/onap/music/mdbc/configurations/TablesConfiguration.java similarity index 88% rename from src/main/java/org/onap/music/mdbc/configurations/TablesConfiguration.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/configurations/TablesConfiguration.java index c9f36e5..77df15f 100644 --- a/src/main/java/org/onap/music/mdbc/configurations/TablesConfiguration.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/configurations/TablesConfiguration.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.configurations; import org.onap.music.exceptions.MDBCServiceException; diff --git a/src/main/java/org/onap/music/mdbc/configurations/config-0.json b/mdbc-server/src/main/java/org/onap/music/mdbc/configurations/config-0.json similarity index 100% rename from src/main/java/org/onap/music/mdbc/configurations/config-0.json rename to mdbc-server/src/main/java/org/onap/music/mdbc/configurations/config-0.json diff --git a/src/main/java/org/onap/music/mdbc/configurations/ranges.json b/mdbc-server/src/main/java/org/onap/music/mdbc/configurations/ranges.json similarity index 100% rename from src/main/java/org/onap/music/mdbc/configurations/ranges.json rename to mdbc-server/src/main/java/org/onap/music/mdbc/configurations/ranges.json diff --git a/src/main/java/org/onap/music/mdbc/configurations/tableConfiguration.json b/mdbc-server/src/main/java/org/onap/music/mdbc/configurations/tableConfiguration.json similarity index 100% rename from src/main/java/org/onap/music/mdbc/configurations/tableConfiguration.json rename to mdbc-server/src/main/java/org/onap/music/mdbc/configurations/tableConfiguration.json diff --git a/src/main/java/org/onap/music/mdbc/examples/EtdbTestClient.java b/mdbc-server/src/main/java/org/onap/music/mdbc/examples/EtdbTestClient.java similarity index 76% rename from src/main/java/org/onap/music/mdbc/examples/EtdbTestClient.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/examples/EtdbTestClient.java index 2a25667..68d836b 100644 --- a/src/main/java/org/onap/music/mdbc/examples/EtdbTestClient.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/examples/EtdbTestClient.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.examples; import java.sql.*; diff --git a/src/main/java/org/onap/music/mdbc/mixins/Cassandra2Mixin.java b/mdbc-server/src/main/java/org/onap/music/mdbc/mixins/Cassandra2Mixin.java similarity index 91% rename from src/main/java/org/onap/music/mdbc/mixins/Cassandra2Mixin.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/mixins/Cassandra2Mixin.java index 1efb795..97c1102 100755 --- a/src/main/java/org/onap/music/mdbc/mixins/Cassandra2Mixin.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/mixins/Cassandra2Mixin.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.mixins; import java.sql.Types; diff --git a/src/main/java/org/onap/music/mdbc/mixins/CassandraMixin.java b/mdbc-server/src/main/java/org/onap/music/mdbc/mixins/CassandraMixin.java similarity index 98% rename from src/main/java/org/onap/music/mdbc/mixins/CassandraMixin.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/mixins/CassandraMixin.java index 75eca0e..0e8da81 100755 --- a/src/main/java/org/onap/music/mdbc/mixins/CassandraMixin.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/mixins/CassandraMixin.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.mixins; import java.io.IOException; diff --git a/src/main/java/org/onap/music/mdbc/mixins/DBInterface.java b/mdbc-server/src/main/java/org/onap/music/mdbc/mixins/DBInterface.java similarity index 77% rename from src/main/java/org/onap/music/mdbc/mixins/DBInterface.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/mixins/DBInterface.java index 2ff88a2..358287f 100755 --- a/src/main/java/org/onap/music/mdbc/mixins/DBInterface.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/mixins/DBInterface.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.mixins; import java.sql.ResultSet; diff --git a/src/main/java/org/onap/music/mdbc/mixins/MixinFactory.java b/mdbc-server/src/main/java/org/onap/music/mdbc/mixins/MixinFactory.java similarity index 83% rename from src/main/java/org/onap/music/mdbc/mixins/MixinFactory.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/mixins/MixinFactory.java index c0c6a64..3d85a27 100755 --- a/src/main/java/org/onap/music/mdbc/mixins/MixinFactory.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/mixins/MixinFactory.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.mixins; import java.lang.reflect.Constructor; diff --git a/src/main/java/org/onap/music/mdbc/mixins/MusicConnector.java b/mdbc-server/src/main/java/org/onap/music/mdbc/mixins/MusicConnector.java similarity index 79% rename from src/main/java/org/onap/music/mdbc/mixins/MusicConnector.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/mixins/MusicConnector.java index 11322fe..59e3581 100755 --- a/src/main/java/org/onap/music/mdbc/mixins/MusicConnector.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/mixins/MusicConnector.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.mixins; import java.net.InetAddress; diff --git a/src/main/java/org/onap/music/mdbc/mixins/MusicInterface.java b/mdbc-server/src/main/java/org/onap/music/mdbc/mixins/MusicInterface.java similarity index 89% rename from src/main/java/org/onap/music/mdbc/mixins/MusicInterface.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/mixins/MusicInterface.java index 35cfb00..6a1219c 100755 --- a/src/main/java/org/onap/music/mdbc/mixins/MusicInterface.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/mixins/MusicInterface.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.mixins; import java.util.HashMap; diff --git a/src/main/java/org/onap/music/mdbc/mixins/MusicMixin.java b/mdbc-server/src/main/java/org/onap/music/mdbc/mixins/MusicMixin.java similarity index 84% rename from src/main/java/org/onap/music/mdbc/mixins/MusicMixin.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/mixins/MusicMixin.java index 58ed35c..46d41d4 100644 --- a/src/main/java/org/onap/music/mdbc/mixins/MusicMixin.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/mixins/MusicMixin.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.mixins; import java.io.IOException; diff --git a/src/main/java/org/onap/music/mdbc/mixins/MySQLMixin.java b/mdbc-server/src/main/java/org/onap/music/mdbc/mixins/MySQLMixin.java similarity index 96% rename from src/main/java/org/onap/music/mdbc/mixins/MySQLMixin.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/mixins/MySQLMixin.java index d78bc9b..23056e7 100755 --- a/src/main/java/org/onap/music/mdbc/mixins/MySQLMixin.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/mixins/MySQLMixin.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.mixins; import java.sql.Connection; diff --git a/src/main/java/org/onap/music/mdbc/mixins/Utils.java b/mdbc-server/src/main/java/org/onap/music/mdbc/mixins/Utils.java similarity index 86% rename from src/main/java/org/onap/music/mdbc/mixins/Utils.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/mixins/Utils.java index 2fd0f6e..cfa8771 100755 --- a/src/main/java/org/onap/music/mdbc/mixins/Utils.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/mixins/Utils.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.mixins; import java.io.IOException; diff --git a/src/main/java/org/onap/music/mdbc/mixins/package-info.java b/mdbc-server/src/main/java/org/onap/music/mdbc/mixins/package-info.java similarity index 73% rename from src/main/java/org/onap/music/mdbc/mixins/package-info.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/mixins/package-info.java index 703a119..eaf0b06 100755 --- a/src/main/java/org/onap/music/mdbc/mixins/package-info.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/mixins/package-info.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ + /** *

* This package provides the "mixins" to use when constructing a MusicSqlManager. The mixins define how MusicSqlManager diff --git a/src/main/java/org/onap/music/mdbc/package-info.java b/mdbc-server/src/main/java/org/onap/music/mdbc/package-info.java similarity index 84% rename from src/main/java/org/onap/music/mdbc/package-info.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/package-info.java index 576ab88..ea0cadb 100755 --- a/src/main/java/org/onap/music/mdbc/package-info.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/package-info.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ + /** *

* This package provides a JDBC driver that can be used to mirror the contents of a database to and from diff --git a/mdbc-server/src/main/java/org/onap/music/mdbc/tables/MriReference.java b/mdbc-server/src/main/java/org/onap/music/mdbc/tables/MriReference.java new file mode 100644 index 0000000..61c7bf1 --- /dev/null +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/tables/MriReference.java @@ -0,0 +1,33 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ +package org.onap.music.mdbc.tables; + +import java.util.UUID; + +public final class MriReference { + public final String table; + public final UUID index; + + public MriReference(String table, UUID index) { + this.table = table; + this.index= index; + } + +} diff --git a/mdbc-server/src/main/java/org/onap/music/mdbc/tables/MusicRangeInformationRow.java b/mdbc-server/src/main/java/org/onap/music/mdbc/tables/MusicRangeInformationRow.java new file mode 100644 index 0000000..6b67e5c --- /dev/null +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/tables/MusicRangeInformationRow.java @@ -0,0 +1,41 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ +package org.onap.music.mdbc.tables; + +import java.util.List; +import java.util.UUID; + +public final class MusicRangeInformationRow { + public final UUID index; + public final PartitionInformation partition; + public final List redoLog; + public final String ownerId; + public final String metricProcessId; + + public MusicRangeInformationRow(UUID index, List redoLog, PartitionInformation partition, + String ownerId, String metricProcessId) { + this.index = index; + this.redoLog = redoLog; + this.partition = partition; + this.ownerId = ownerId; + this.metricProcessId = metricProcessId; + } + +} diff --git a/mdbc-server/src/main/java/org/onap/music/mdbc/tables/MusicTxDigestId.java b/mdbc-server/src/main/java/org/onap/music/mdbc/tables/MusicTxDigestId.java new file mode 100644 index 0000000..33952e0 --- /dev/null +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/tables/MusicTxDigestId.java @@ -0,0 +1,34 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ +package org.onap.music.mdbc.tables; + +import java.util.UUID; + +public final class MusicTxDigestId { + public final UUID tablePrimaryKey; + + public MusicTxDigestId(UUID primaryKey) { + this.tablePrimaryKey= primaryKey; + } + + public boolean isEmpty() { + return (this.tablePrimaryKey==null); + } +} diff --git a/mdbc-server/src/main/java/org/onap/music/mdbc/tables/Operation.java b/mdbc-server/src/main/java/org/onap/music/mdbc/tables/Operation.java new file mode 100644 index 0000000..0c68575 --- /dev/null +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/tables/Operation.java @@ -0,0 +1,55 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ +package org.onap.music.mdbc.tables; + +import java.io.Serializable; + +import org.json.JSONObject; +import org.json.JSONTokener; + +public final class Operation implements Serializable{ + + private static final long serialVersionUID = -1215301985078183104L; + + final OperationType TYPE; + final String NEW_VAL; + + public Operation(OperationType type, String newVal) { + TYPE = type; + NEW_VAL = newVal; + } + + public JSONObject getNewVal(){ + JSONObject newRow = new JSONObject(new JSONTokener(NEW_VAL)); + return newRow; + } + + public OperationType getOperationType() { + return this.TYPE; + } + + @Override + public boolean equals(Object o){ + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Operation r = (Operation) o; + return TYPE.equals(r.TYPE) && NEW_VAL.equals(r.NEW_VAL); + } +} diff --git a/mdbc-server/src/main/java/org/onap/music/mdbc/tables/OperationType.java b/mdbc-server/src/main/java/org/onap/music/mdbc/tables/OperationType.java new file mode 100644 index 0000000..696f642 --- /dev/null +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/tables/OperationType.java @@ -0,0 +1,24 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ +package org.onap.music.mdbc.tables; + +public enum OperationType{ + DELETE, UPDATE, INSERT, SELECT +} diff --git a/mdbc-server/src/main/java/org/onap/music/mdbc/tables/PartitionInformation.java b/mdbc-server/src/main/java/org/onap/music/mdbc/tables/PartitionInformation.java new file mode 100644 index 0000000..6724860 --- /dev/null +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/tables/PartitionInformation.java @@ -0,0 +1,32 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ +package org.onap.music.mdbc.tables; + +import org.onap.music.mdbc.Range; + +import java.util.List; + +public class PartitionInformation { + public final List ranges; + + public PartitionInformation(List ranges) { + this.ranges=ranges; + } +} diff --git a/src/main/java/org/onap/music/mdbc/tables/StagingTable.java b/mdbc-server/src/main/java/org/onap/music/mdbc/tables/StagingTable.java similarity index 62% rename from src/main/java/org/onap/music/mdbc/tables/StagingTable.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/tables/StagingTable.java index 6e93856..d080c54 100644 --- a/src/main/java/org/onap/music/mdbc/tables/StagingTable.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/tables/StagingTable.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.tables; import java.io.Serializable; diff --git a/src/main/java/org/onap/music/mdbc/tables/TxCommitProgress.java b/mdbc-server/src/main/java/org/onap/music/mdbc/tables/TxCommitProgress.java similarity index 85% rename from src/main/java/org/onap/music/mdbc/tables/TxCommitProgress.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/tables/TxCommitProgress.java index 02942c6..575c9d3 100644 --- a/src/main/java/org/onap/music/mdbc/tables/TxCommitProgress.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/tables/TxCommitProgress.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.tables; import java.util.Map; @@ -201,4 +220,4 @@ final class CommitProgress{ public synchronized boolean isCommitIdAssigned() { return this.commitId!= null; } -} \ No newline at end of file +} diff --git a/src/main/java/org/onap/music/mdbc/tests/ConnectionTest.java b/mdbc-server/src/main/java/org/onap/music/mdbc/tests/ConnectionTest.java similarity index 92% rename from src/main/java/org/onap/music/mdbc/tests/ConnectionTest.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/tests/ConnectionTest.java index 5a0d98c..2a8c45f 100644 --- a/src/main/java/org/onap/music/mdbc/tests/ConnectionTest.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/tests/ConnectionTest.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.tests; //import java.sql.Connection; diff --git a/src/main/java/org/onap/music/mdbc/tests/MAIN.java b/mdbc-server/src/main/java/org/onap/music/mdbc/tests/MAIN.java similarity index 76% rename from src/main/java/org/onap/music/mdbc/tests/MAIN.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/tests/MAIN.java index 160868b..348d891 100755 --- a/src/main/java/org/onap/music/mdbc/tests/MAIN.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/tests/MAIN.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.tests; import java.io.FileInputStream; diff --git a/src/main/java/org/onap/music/mdbc/tests/Test.java b/mdbc-server/src/main/java/org/onap/music/mdbc/tests/Test.java similarity index 76% rename from src/main/java/org/onap/music/mdbc/tests/Test.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/tests/Test.java index 67a78c8..8f0ad7d 100755 --- a/src/main/java/org/onap/music/mdbc/tests/Test.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/tests/Test.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.tests; import java.sql.Connection; diff --git a/src/main/java/org/onap/music/mdbc/tests/Test_Delete.java b/mdbc-server/src/main/java/org/onap/music/mdbc/tests/Test_Delete.java similarity index 70% rename from src/main/java/org/onap/music/mdbc/tests/Test_Delete.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/tests/Test_Delete.java index 6417ab7..57d85d4 100755 --- a/src/main/java/org/onap/music/mdbc/tests/Test_Delete.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/tests/Test_Delete.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.tests; import java.sql.Connection; diff --git a/src/main/java/org/onap/music/mdbc/tests/Test_Insert.java b/mdbc-server/src/main/java/org/onap/music/mdbc/tests/Test_Insert.java similarity index 78% rename from src/main/java/org/onap/music/mdbc/tests/Test_Insert.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/tests/Test_Insert.java index 1ea0908..1a5cbed 100755 --- a/src/main/java/org/onap/music/mdbc/tests/Test_Insert.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/tests/Test_Insert.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.tests; import java.sql.Connection; diff --git a/src/main/java/org/onap/music/mdbc/tests/Test_Transactions.java b/mdbc-server/src/main/java/org/onap/music/mdbc/tests/Test_Transactions.java similarity index 71% rename from src/main/java/org/onap/music/mdbc/tests/Test_Transactions.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/tests/Test_Transactions.java index 787f1f5..4f31b7e 100755 --- a/src/main/java/org/onap/music/mdbc/tests/Test_Transactions.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/tests/Test_Transactions.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.tests; import java.sql.Connection; diff --git a/src/main/java/org/onap/music/mdbc/tests/package-info.java b/mdbc-server/src/main/java/org/onap/music/mdbc/tests/package-info.java similarity index 81% rename from src/main/java/org/onap/music/mdbc/tests/package-info.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/tests/package-info.java index 7e0b84d..aac0d43 100755 --- a/src/main/java/org/onap/music/mdbc/tests/package-info.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/tests/package-info.java @@ -1,3 +1,23 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ + /** *

* This package provides a testing harness to test the various features of MDBC against diff --git a/src/main/java/org/onap/music/mdbc/tools/CreateNodeConfigurations.java b/mdbc-server/src/main/java/org/onap/music/mdbc/tools/CreateNodeConfigurations.java similarity index 73% rename from src/main/java/org/onap/music/mdbc/tools/CreateNodeConfigurations.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/tools/CreateNodeConfigurations.java index c4ebf46..00f6616 100644 --- a/src/main/java/org/onap/music/mdbc/tools/CreateNodeConfigurations.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/tools/CreateNodeConfigurations.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.tools; import org.onap.music.exceptions.MDBCServiceException; diff --git a/src/main/java/org/onap/music/mdbc/tools/CreatePartition.java b/mdbc-server/src/main/java/org/onap/music/mdbc/tools/CreatePartition.java similarity index 67% rename from src/main/java/org/onap/music/mdbc/tools/CreatePartition.java rename to mdbc-server/src/main/java/org/onap/music/mdbc/tools/CreatePartition.java index afd1a47..d515539 100644 --- a/src/main/java/org/onap/music/mdbc/tools/CreatePartition.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/tools/CreatePartition.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.tools; import org.onap.music.logging.EELFLoggerDelegate; diff --git a/src/main/javadoc/overview.html b/mdbc-server/src/main/javadoc/overview.html similarity index 100% rename from src/main/javadoc/overview.html rename to mdbc-server/src/main/javadoc/overview.html diff --git a/src/main/resources/META-INF/services/java.sql.Driver b/mdbc-server/src/main/resources/META-INF/services/java.sql.Driver similarity index 100% rename from src/main/resources/META-INF/services/java.sql.Driver rename to mdbc-server/src/main/resources/META-INF/services/java.sql.Driver diff --git a/src/main/resources/log4j.properties b/mdbc-server/src/main/resources/log4j.properties similarity index 100% rename from src/main/resources/log4j.properties rename to mdbc-server/src/main/resources/log4j.properties diff --git a/src/main/resources/logback.xml b/mdbc-server/src/main/resources/logback.xml similarity index 100% rename from src/main/resources/logback.xml rename to mdbc-server/src/main/resources/logback.xml diff --git a/src/main/resources/mdbc.properties b/mdbc-server/src/main/resources/mdbc.properties similarity index 100% rename from src/main/resources/mdbc.properties rename to mdbc-server/src/main/resources/mdbc.properties diff --git a/src/main/resources/mdbc_driver.properties b/mdbc-server/src/main/resources/mdbc_driver.properties similarity index 100% rename from src/main/resources/mdbc_driver.properties rename to mdbc-server/src/main/resources/mdbc_driver.properties diff --git a/src/main/resources/music.properties b/mdbc-server/src/main/resources/music.properties similarity index 100% rename from src/main/resources/music.properties rename to mdbc-server/src/main/resources/music.properties diff --git a/src/main/resources/tests.json b/mdbc-server/src/main/resources/tests.json similarity index 100% rename from src/main/resources/tests.json rename to mdbc-server/src/main/resources/tests.json diff --git a/src/main/shell/mk_jboss_module b/mdbc-server/src/main/shell/mk_jboss_module similarity index 100% rename from src/main/shell/mk_jboss_module rename to mdbc-server/src/main/shell/mk_jboss_module diff --git a/src/main/shell/run_h2_server b/mdbc-server/src/main/shell/run_h2_server similarity index 100% rename from src/main/shell/run_h2_server rename to mdbc-server/src/main/shell/run_h2_server diff --git a/src/test/java/org/onap/music/mdbc/DatabaseOperationsTest.java b/mdbc-server/src/test/java/org/onap/music/mdbc/DatabaseOperationsTest.java similarity index 95% rename from src/test/java/org/onap/music/mdbc/DatabaseOperationsTest.java rename to mdbc-server/src/test/java/org/onap/music/mdbc/DatabaseOperationsTest.java index 01f3cbf..b9a929c 100644 --- a/src/test/java/org/onap/music/mdbc/DatabaseOperationsTest.java +++ b/mdbc-server/src/test/java/org/onap/music/mdbc/DatabaseOperationsTest.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc; import com.datastax.driver.core.*; @@ -477,4 +496,4 @@ public class DatabaseOperationsTest { } -} \ No newline at end of file +} diff --git a/src/test/java/org/onap/music/mdbc/MDBCUtilsTest.java b/mdbc-server/src/test/java/org/onap/music/mdbc/MDBCUtilsTest.java similarity index 67% rename from src/test/java/org/onap/music/mdbc/MDBCUtilsTest.java rename to mdbc-server/src/test/java/org/onap/music/mdbc/MDBCUtilsTest.java index 5e39244..2c26aed 100644 --- a/src/test/java/org/onap/music/mdbc/MDBCUtilsTest.java +++ b/mdbc-server/src/test/java/org/onap/music/mdbc/MDBCUtilsTest.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc; import org.onap.music.mdbc.tables.OperationType; @@ -69,4 +88,4 @@ public class MDBCUtilsTest { assertTrue(output!=null); assertTrue(!output.isEmpty()); } -} \ No newline at end of file +} diff --git a/src/test/java/org/onap/music/mdbc/TestUtils.java b/mdbc-server/src/test/java/org/onap/music/mdbc/TestUtils.java similarity index 78% rename from src/test/java/org/onap/music/mdbc/TestUtils.java rename to mdbc-server/src/test/java/org/onap/music/mdbc/TestUtils.java index 36274ef..111b65c 100644 --- a/src/test/java/org/onap/music/mdbc/TestUtils.java +++ b/mdbc-server/src/test/java/org/onap/music/mdbc/TestUtils.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc; import org.onap.music.logging.EELFLoggerDelegate; diff --git a/mdbc-server/src/test/java/org/onap/music/mdbc/test/ALLTESTS.java b/mdbc-server/src/test/java/org/onap/music/mdbc/test/ALLTESTS.java new file mode 100755 index 0000000..8a7a72b --- /dev/null +++ b/mdbc-server/src/test/java/org/onap/music/mdbc/test/ALLTESTS.java @@ -0,0 +1,33 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ +package org.onap.music.mdbc.test; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +@RunWith(Suite.class) +@Suite.SuiteClasses({ + //BasicTest.class, + //CrossSiteTest.class, + //TransactionTest.class +}) + +public class ALLTESTS { +} diff --git a/src/test/java/org/onap/music/mdbc/test/BasicTest.java b/mdbc-server/src/test/java/org/onap/music/mdbc/test/BasicTest.java similarity index 74% rename from src/test/java/org/onap/music/mdbc/test/BasicTest.java rename to mdbc-server/src/test/java/org/onap/music/mdbc/test/BasicTest.java index b88a22e..0901534 100755 --- a/src/test/java/org/onap/music/mdbc/test/BasicTest.java +++ b/mdbc-server/src/test/java/org/onap/music/mdbc/test/BasicTest.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.test; import static org.junit.Assert.*; diff --git a/src/test/java/org/onap/music/mdbc/test/CrossSiteTest.java b/mdbc-server/src/test/java/org/onap/music/mdbc/test/CrossSiteTest.java similarity index 93% rename from src/test/java/org/onap/music/mdbc/test/CrossSiteTest.java rename to mdbc-server/src/test/java/org/onap/music/mdbc/test/CrossSiteTest.java index d15589f..d4a7a27 100755 --- a/src/test/java/org/onap/music/mdbc/test/CrossSiteTest.java +++ b/mdbc-server/src/test/java/org/onap/music/mdbc/test/CrossSiteTest.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.test; import static org.junit.Assert.*; diff --git a/mdbc-server/src/test/java/org/onap/music/mdbc/test/TestCommon.java b/mdbc-server/src/test/java/org/onap/music/mdbc/test/TestCommon.java new file mode 100755 index 0000000..c618f3b --- /dev/null +++ b/mdbc-server/src/test/java/org/onap/music/mdbc/test/TestCommon.java @@ -0,0 +1,44 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ +package org.onap.music.mdbc.test; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.SQLException; +import java.util.Properties; + +import org.onap.music.mdbc.mixins.CassandraMixin; + +public class TestCommon { + public static final String DB_DRIVER = "avatica.Driver"; + public static final String DB_USER = ""; + public static final String DB_PASSWORD = ""; + + public Connection getDBConnection(String url, String keyspace, String id) throws SQLException, ClassNotFoundException { + Class.forName(DB_DRIVER); + Properties driver_info = new Properties(); + driver_info.put(CassandraMixin.KEY_MY_ID, id); + driver_info.put(CassandraMixin.KEY_REPLICAS, "0,1,2"); + driver_info.put(CassandraMixin.KEY_MUSIC_ADDRESS, "localhost"); + driver_info.put("user", DB_USER); + driver_info.put("password", DB_PASSWORD); + return DriverManager.getConnection(url, driver_info); + } +} diff --git a/src/test/java/org/onap/music/mdbc/test/TransactionTest.java b/mdbc-server/src/test/java/org/onap/music/mdbc/test/TransactionTest.java similarity index 82% rename from src/test/java/org/onap/music/mdbc/test/TransactionTest.java rename to mdbc-server/src/test/java/org/onap/music/mdbc/test/TransactionTest.java index 08eba8a..55b0f09 100755 --- a/src/test/java/org/onap/music/mdbc/test/TransactionTest.java +++ b/mdbc-server/src/test/java/org/onap/music/mdbc/test/TransactionTest.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.onap.music.mdbc.test; import static org.junit.Assert.fail; diff --git a/mdbc-server/src/test/java/org/openecomp/sdnc/sli/resource/dblib/CachedDataSource.java b/mdbc-server/src/test/java/org/openecomp/sdnc/sli/resource/dblib/CachedDataSource.java new file mode 100755 index 0000000..ecac610 --- /dev/null +++ b/mdbc-server/src/test/java/org/openecomp/sdnc/sli/resource/dblib/CachedDataSource.java @@ -0,0 +1,26 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ +package org.openecomp.sdnc.sli.resource.dblib; + +public class CachedDataSource { + public String getDbConnectionName() { + return "name"; + } +} diff --git a/src/test/java/org/openecomp/sdnc/sli/resource/dblib/DBResourceManager.java b/mdbc-server/src/test/java/org/openecomp/sdnc/sli/resource/dblib/DBResourceManager.java similarity index 71% rename from src/test/java/org/openecomp/sdnc/sli/resource/dblib/DBResourceManager.java rename to mdbc-server/src/test/java/org/openecomp/sdnc/sli/resource/dblib/DBResourceManager.java index e54a5a2..43d4cdf 100755 --- a/src/test/java/org/openecomp/sdnc/sli/resource/dblib/DBResourceManager.java +++ b/mdbc-server/src/test/java/org/openecomp/sdnc/sli/resource/dblib/DBResourceManager.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.openecomp.sdnc.sli.resource.dblib; import java.sql.Connection; diff --git a/src/test/java/org/openecomp/sdnc/sli/resource/dblib/StressTest.java b/mdbc-server/src/test/java/org/openecomp/sdnc/sli/resource/dblib/StressTest.java similarity index 86% rename from src/test/java/org/openecomp/sdnc/sli/resource/dblib/StressTest.java rename to mdbc-server/src/test/java/org/openecomp/sdnc/sli/resource/dblib/StressTest.java index a1eb9a6..d6b5717 100755 --- a/src/test/java/org/openecomp/sdnc/sli/resource/dblib/StressTest.java +++ b/mdbc-server/src/test/java/org/openecomp/sdnc/sli/resource/dblib/StressTest.java @@ -1,3 +1,22 @@ +/* + * ============LICENSE_START==================================================== + * org.onap.music.mdbc + * ============================================================================= + * Copyright (C) 2018 AT&T Intellectual Property. 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. + * ============LICENSE_END====================================================== + */ package org.openecomp.sdnc.sli.resource.dblib; import static org.junit.Assert.*; diff --git a/src/test/resources/dblib.properties b/mdbc-server/src/test/resources/dblib.properties similarity index 100% rename from src/test/resources/dblib.properties rename to mdbc-server/src/test/resources/dblib.properties diff --git a/src/test/resources/simplelogger.properties b/mdbc-server/src/test/resources/simplelogger.properties similarity index 100% rename from src/test/resources/simplelogger.properties rename to mdbc-server/src/test/resources/simplelogger.properties diff --git a/pom.xml b/pom.xml index 769d047..3768fa6 100755 --- a/pom.xml +++ b/pom.xml @@ -1,3 +1,23 @@ + + 4.0.0 org.onap.music.mdbc @@ -10,10 +30,74 @@ The primary database is normally H2, and MUSIC is normally Cassandra. + pom + + + org.onap.oparent + oparent + 1.2.1 + + UTF-8 + yyyyMMdd'T'HHmm + + + central + http://repo1.maven.org/maven2 + + + ecomp-public + ${onap.nexus.url}/${publicNexusPath} + + false + + + + ecomp-release + ${onap.nexus.url}/${releaseNexusPath} + + false + + + + ecomp-snapshots + ${onap.nexus.url}/${snapshotNexusPath} + + false + + + + + + ecomp-public + ${onap.nexus.url}/content/repositories/public/ + + false + + + + ecomp-releases + ${onap.nexus.url}/content/repositories/releases/ + + false + + + + ecomp-snapshots + ${onap.nexus.url}/content/repositories/snapshots/ + + false + + + + + + mdbc-server + + com.datastax.cassandra @@ -126,29 +210,19 @@ org.apache.maven.plugins maven-compiler-plugin - 3.5.1 - - 8 - 8 - - - - maven-assembly-plugin - 3.1.0 + 3.6.1 - - jar-with-dependencies - + true + -Xlint + true + true + true + 1.8 + 1.8 + + -parameters + - - - make-assembly - package - - single - - - @@ -164,11 +238,11 @@ true true - https://docs.oracle.com/javase/7/docs/api/ - https://docs.oracle.com/javaee/7/api/ + https://docs.oracle.com/javase/8/docs/api/ + https://docs.oracle.com/javaee/8/api/ - \ No newline at end of file + diff --git a/src/main/java/org/onap/music/logging/format/ErrorSeverity.java b/src/main/java/org/onap/music/logging/format/ErrorSeverity.java deleted file mode 100644 index 49cc2f4..0000000 --- a/src/main/java/org/onap/music/logging/format/ErrorSeverity.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * ============LICENSE_START========================================== - * org.onap.music - * =================================================================== - * Copyright (c) 2017 AT&T Intellectual Property - * =================================================================== - * 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. - * - * ============LICENSE_END============================================= - * ==================================================================== - */ -package org.onap.music.logging.format; - -/** - * @author inam - * - */ -public enum ErrorSeverity { - INFO, - WARN, - ERROR, - FATAL, - CRITICAL, - MAJOR, - MINOR, - NONE, -} diff --git a/src/main/java/org/onap/music/logging/format/ErrorTypes.java b/src/main/java/org/onap/music/logging/format/ErrorTypes.java deleted file mode 100644 index 89dd5f8..0000000 --- a/src/main/java/org/onap/music/logging/format/ErrorTypes.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * ============LICENSE_START========================================== - * org.onap.music - * =================================================================== - * Copyright (c) 2017 AT&T Intellectual Property - * =================================================================== - * 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. - * - * ============LICENSE_END============================================= - * ==================================================================== - */ -package org.onap.music.logging.format; - -import com.att.eelf.i18n.EELFResolvableErrorEnum; - -/** - * @author inam - * - */ -public enum ErrorTypes implements EELFResolvableErrorEnum { - - - CONNECTIONERROR, - SESSIONEXPIRED, - AUTHENTICATIONERROR, - SERVICEUNAVAILABLE, - QUERYERROR, - DATAERROR, - GENERALSERVICEERROR, - MUSICSERVICEERROR, - LOCKINGERROR, - UNKNOWN, - -} diff --git a/src/main/java/org/onap/music/mdbc/RedoRow.java b/src/main/java/org/onap/music/mdbc/RedoRow.java deleted file mode 100644 index c9c83eb..0000000 --- a/src/main/java/org/onap/music/mdbc/RedoRow.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.onap.music.mdbc; - -import java.util.UUID; - -public class RedoRow { - private String redoTableName; - private UUID redoRowIndex; - - public RedoRow(){} - - public RedoRow(String redoTableName, UUID redoRowIndex){ - this.redoRowIndex = redoRowIndex; - this.redoTableName = redoTableName; - } - - public String getRedoTableName() { - return redoTableName; - } - - public void setRedoTableName(String redoTableName) { - this.redoTableName = redoTableName; - } - - public UUID getRedoRowIndex() { - return redoRowIndex; - } - - public void setRedoRowIndex(UUID redoRowIndex) { - this.redoRowIndex = redoRowIndex; - } -} diff --git a/src/main/java/org/onap/music/mdbc/tables/MriReference.java b/src/main/java/org/onap/music/mdbc/tables/MriReference.java deleted file mode 100644 index 29de8d0..0000000 --- a/src/main/java/org/onap/music/mdbc/tables/MriReference.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.onap.music.mdbc.tables; - -import java.util.UUID; - -public final class MriReference { - public final String table; - public final UUID index; - - public MriReference(String table, UUID index) { - this.table = table; - this.index= index; - } - -} diff --git a/src/main/java/org/onap/music/mdbc/tables/MusicRangeInformationRow.java b/src/main/java/org/onap/music/mdbc/tables/MusicRangeInformationRow.java deleted file mode 100644 index 8a1d2e8..0000000 --- a/src/main/java/org/onap/music/mdbc/tables/MusicRangeInformationRow.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.onap.music.mdbc.tables; - -import java.util.List; -import java.util.UUID; - -public final class MusicRangeInformationRow { - public final UUID index; - public final PartitionInformation partition; - public final List redoLog; - public final String ownerId; - public final String metricProcessId; - - public MusicRangeInformationRow(UUID index, List redoLog, PartitionInformation partition, - String ownerId, String metricProcessId) { - this.index = index; - this.redoLog = redoLog; - this.partition = partition; - this.ownerId = ownerId; - this.metricProcessId = metricProcessId; - } - -} diff --git a/src/main/java/org/onap/music/mdbc/tables/MusicTxDigestId.java b/src/main/java/org/onap/music/mdbc/tables/MusicTxDigestId.java deleted file mode 100644 index 5b8fadd..0000000 --- a/src/main/java/org/onap/music/mdbc/tables/MusicTxDigestId.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.onap.music.mdbc.tables; - -import java.util.UUID; - -public final class MusicTxDigestId { - public final UUID tablePrimaryKey; - - public MusicTxDigestId(UUID primaryKey) { - this.tablePrimaryKey= primaryKey; - } - - public boolean isEmpty() { - return (this.tablePrimaryKey==null); - } -} diff --git a/src/main/java/org/onap/music/mdbc/tables/Operation.java b/src/main/java/org/onap/music/mdbc/tables/Operation.java deleted file mode 100644 index d3aabe0..0000000 --- a/src/main/java/org/onap/music/mdbc/tables/Operation.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.onap.music.mdbc.tables; - -import java.io.Serializable; - -import org.json.JSONObject; -import org.json.JSONTokener; - -public final class Operation implements Serializable{ - - private static final long serialVersionUID = -1215301985078183104L; - - final OperationType TYPE; - final String NEW_VAL; - - public Operation(OperationType type, String newVal) { - TYPE = type; - NEW_VAL = newVal; - } - - public JSONObject getNewVal(){ - JSONObject newRow = new JSONObject(new JSONTokener(NEW_VAL)); - return newRow; - } - - public OperationType getOperationType() { - return this.TYPE; - } - - @Override - public boolean equals(Object o){ - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - Operation r = (Operation) o; - return TYPE.equals(r.TYPE) && NEW_VAL.equals(r.NEW_VAL); - } -} diff --git a/src/main/java/org/onap/music/mdbc/tables/OperationType.java b/src/main/java/org/onap/music/mdbc/tables/OperationType.java deleted file mode 100644 index 1ccd919..0000000 --- a/src/main/java/org/onap/music/mdbc/tables/OperationType.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.onap.music.mdbc.tables; - -public enum OperationType{ - DELETE, UPDATE, INSERT, SELECT -} diff --git a/src/main/java/org/onap/music/mdbc/tables/PartitionInformation.java b/src/main/java/org/onap/music/mdbc/tables/PartitionInformation.java deleted file mode 100644 index 2f048b7..0000000 --- a/src/main/java/org/onap/music/mdbc/tables/PartitionInformation.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.onap.music.mdbc.tables; - -import org.onap.music.mdbc.Range; - -import java.util.List; - -public class PartitionInformation { - public final List ranges; - - public PartitionInformation(List ranges) { - this.ranges=ranges; - } -} diff --git a/src/test/java/org/onap/music/mdbc/test/ALLTESTS.java b/src/test/java/org/onap/music/mdbc/test/ALLTESTS.java deleted file mode 100755 index d4ef4c3..0000000 --- a/src/test/java/org/onap/music/mdbc/test/ALLTESTS.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.onap.music.mdbc.test; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; - -@RunWith(Suite.class) -@Suite.SuiteClasses({ - //BasicTest.class, - //CrossSiteTest.class, - //TransactionTest.class -}) - -public class ALLTESTS { -} diff --git a/src/test/java/org/onap/music/mdbc/test/TestCommon.java b/src/test/java/org/onap/music/mdbc/test/TestCommon.java deleted file mode 100755 index 3067b01..0000000 --- a/src/test/java/org/onap/music/mdbc/test/TestCommon.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.onap.music.mdbc.test; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.SQLException; -import java.util.Properties; - -import org.onap.music.mdbc.mixins.CassandraMixin; - -public class TestCommon { - public static final String DB_DRIVER = "avatica.Driver"; - public static final String DB_USER = ""; - public static final String DB_PASSWORD = ""; - - public Connection getDBConnection(String url, String keyspace, String id) throws SQLException, ClassNotFoundException { - Class.forName(DB_DRIVER); - Properties driver_info = new Properties(); - driver_info.put(CassandraMixin.KEY_MY_ID, id); - driver_info.put(CassandraMixin.KEY_REPLICAS, "0,1,2"); - driver_info.put(CassandraMixin.KEY_MUSIC_ADDRESS, "localhost"); - driver_info.put("user", DB_USER); - driver_info.put("password", DB_PASSWORD); - return DriverManager.getConnection(url, driver_info); - } -} diff --git a/src/test/java/org/openecomp/sdnc/sli/resource/dblib/CachedDataSource.java b/src/test/java/org/openecomp/sdnc/sli/resource/dblib/CachedDataSource.java deleted file mode 100755 index 222dfb2..0000000 --- a/src/test/java/org/openecomp/sdnc/sli/resource/dblib/CachedDataSource.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.openecomp.sdnc.sli.resource.dblib; - -public class CachedDataSource { - public String getDbConnectionName() { - return "name"; - } -}