diff options
author | 2018-11-05 10:23:04 -0500 | |
---|---|---|
committer | 2018-11-05 10:33:13 -0500 | |
commit | 95d22d7491ea365fdc4525e44d484c73c33e16a1 (patch) | |
tree | a5fdb7de3f14b345db760463cec8cee130b5b116 | |
parent | 8dca3aebe55502ab35402da6ec7123bd3de7694d (diff) |
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 <rd472p@att.com>
97 files changed, 1770 insertions, 365 deletions
@@ -1,3 +1,7 @@ .idea target mdbc.iml +.project +.settings +.classpath +.checkstyle @@ -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 @@ +<?xml version="1.0"?> +<!-- + ============LICENSE_START========================================== + org.onap.music + =================================================================== + Copyright (c) 2018 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============================================= +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.onap.music.mdbc</groupId> + <artifactId>mdbc-server</artifactId> + <version>0.0.1-SNAPSHOT</version> + <name>mdbc-server</name> + <description>MDBC Server</description> + <packaging>jar</packaging> + + <parent> + <groupId>org.onap.music.mdbc</groupId> + <artifactId>mdbc</artifactId> + <version>0.0.1-SNAPSHOT</version> + </parent> + + <dependencies> + <dependency> + <groupId>com.datastax.cassandra</groupId> + <artifactId>cassandra-driver-core</artifactId> + <version>3.3.0</version> + </dependency> + <dependency> + <!-- The oparent dependency managed version 26.0-jre will not work --> + <!-- 19.0 is needed by cassandra-driver-core 3.3.0 --> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + <version>19.0</version> + </dependency> + <dependency> + <!-- The oparent dependency managed version 9.4.12.v20180830 will not work --> + <!-- 9.2.19.v20160908 is needed by avatica-server 1.12.0 --> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-http</artifactId> + <version>9.2.19.v20160908</version> + </dependency> + <dependency> + <!-- The oparent dependency managed version 9.4.12.v20180830 will not work --> + <!-- 9.2.19.v20160908 is needed by avatica-server 1.12.0 --> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-server</artifactId> + <version>9.2.19.v20160908</version> + </dependency> + <dependency> + <!-- 9.2.19.v20160908 is needed by avatica-server 1.12.0 --> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-security</artifactId> + <version>9.2.19.v20160908</version> + </dependency> + <dependency> + <!-- 9.2.19.v20160908 is needed by avatica-server 1.12.0 --> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-util</artifactId> + <version>9.2.19.v20160908</version> + </dependency> + <dependency> + <groupId>com.h2database</groupId> + <artifactId>h2</artifactId> + <version>1.4.195</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.6.1</version> + </dependency> + <dependency> + <groupId>org.json</groupId> + <artifactId>json</artifactId> + <version>20160810</version> + </dependency> + <dependency> + <groupId>mysql</groupId> + <artifactId>mysql-connector-java</artifactId> + <version>5.1.32</version> + </dependency> + <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 --> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + <version>3.7</version> + </dependency> + <!-- These two dependencies pull in optional libraries for Cassandra --> + <dependency> + <groupId>net.jpountz.lz4</groupId> + <artifactId>lz4</artifactId> + <version>1.3.0</version> + </dependency> + <dependency> + <groupId>org.xerial.snappy</groupId> + <artifactId>snappy-java</artifactId> + <version>1.1.2.6</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.vmlens</groupId> + <artifactId>concurrent-junit</artifactId> + <version>1.0.0</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.github.jsqlparser</groupId> + <artifactId>jsqlparser</artifactId> + <version>1.1</version> + </dependency> + <dependency> + <groupId>com.att.eelf</groupId> + <artifactId>eelf-core</artifactId> + <version>1.0.0</version> + </dependency> + + <!-- https://mvnrepository.com/artifact/javax.servlet/servlet-api --> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> + <!-- https://mvnrepository.com/artifact/org.apache.calcite.avatica/avatica-server --> + <dependency> + <groupId>org.apache.calcite.avatica</groupId> + <artifactId>avatica-server</artifactId> + <version>1.12.0</version> + </dependency> + <!-- https://mvnrepository.com/artifact/org.apache.calcite/calcite-plus --> + <dependency> + <groupId>org.apache.calcite</groupId> + <artifactId>calcite-plus</artifactId> + <version>1.12.0</version> + </dependency> + <dependency> + <groupId>com.beust</groupId> + <artifactId>jcommander</artifactId> + <version>1.72</version> + </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.8.5</version> + </dependency> + <dependency> + <groupId>org.mariadb.jdbc</groupId> + <artifactId>mariadb-java-client</artifactId> + <version>1.1.7</version> + </dependency> + <dependency> + <groupId>org.onap.music</groupId> + <artifactId>MUSIC</artifactId> + <version>3.2.0</version> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <version>3.1.0</version> + <configuration> + <descriptorRefs> + <descriptorRef>jar-with-dependencies</descriptorRef> + </descriptorRefs> + </configuration> + <executions> + <execution> + <id>make-assembly</id> <!-- this is used for inheritance merges --> + <phase>package</phase> <!-- bind to the packaging phase --> + <goals> + <goal>single</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> diff --git a/src/main/java/org/onap/music/exceptions/MDBCServiceException.java b/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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 index 2207a52..2207a52 100644 --- 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 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 index 2a792e8..2a792e8 100644 --- a/src/main/java/org/onap/music/mdbc/configurations/ranges.json +++ b/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 index 383593a..383593a 100644 --- a/src/main/java/org/onap/music/mdbc/configurations/tableConfiguration.json +++ b/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 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 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 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 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 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 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 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 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 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 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 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====================================================== + */ + /** * <p> * 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 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====================================================== + */ + /** * <p> * 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<MusicTxDigestId> redoLog; + public final String ownerId; + public final String metricProcessId; + + public MusicRangeInformationRow(UUID index, List<MusicTxDigestId> 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<Range> ranges; + + public PartitionInformation(List<Range> 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 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 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 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 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 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 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 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 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 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====================================================== + */ + /** * <p> * 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 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 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 index 0be8c38..0be8c38 100755 --- a/src/main/javadoc/overview.html +++ b/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 index a135284..a135284 100755 --- a/src/main/resources/META-INF/services/java.sql.Driver +++ b/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 index 88ee415..88ee415 100755 --- a/src/main/resources/log4j.properties +++ b/mdbc-server/src/main/resources/log4j.properties diff --git a/src/main/resources/logback.xml b/mdbc-server/src/main/resources/logback.xml index df02405..df02405 100644 --- a/src/main/resources/logback.xml +++ b/mdbc-server/src/main/resources/logback.xml diff --git a/src/main/resources/mdbc.properties b/mdbc-server/src/main/resources/mdbc.properties index 3e207aa..3e207aa 100755 --- a/src/main/resources/mdbc.properties +++ b/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 index 487feb3..487feb3 100644 --- a/src/main/resources/mdbc_driver.properties +++ b/mdbc-server/src/main/resources/mdbc_driver.properties diff --git a/src/main/resources/music.properties b/mdbc-server/src/main/resources/music.properties index 204e3f6..204e3f6 100644 --- a/src/main/resources/music.properties +++ b/mdbc-server/src/main/resources/music.properties diff --git a/src/main/resources/tests.json b/mdbc-server/src/main/resources/tests.json index 8df9f34..8df9f34 100755 --- a/src/main/resources/tests.json +++ b/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 index 7bbb8d9..7bbb8d9 100755 --- a/src/main/shell/mk_jboss_module +++ b/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 index 9b14e63..9b14e63 100755 --- a/src/main/shell/run_h2_server +++ b/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 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 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 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 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 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 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 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 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 index 2fe520e..2fe520e 100755 --- a/src/test/resources/dblib.properties +++ b/mdbc-server/src/test/resources/dblib.properties diff --git a/src/test/resources/simplelogger.properties b/mdbc-server/src/test/resources/simplelogger.properties index 384f97b..384f97b 100755 --- a/src/test/resources/simplelogger.properties +++ b/mdbc-server/src/test/resources/simplelogger.properties @@ -1,3 +1,23 @@ +<?xml version="1.0"?> +<!-- + ============LICENSE_START========================================== + org.onap.music + =================================================================== + Copyright (c) 2018 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============================================= +--> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.onap.music.mdbc</groupId> @@ -10,10 +30,74 @@ The primary database is normally H2, and MUSIC is normally Cassandra. </description> + <packaging>pom</packaging> + + <parent> + <groupId>org.onap.oparent</groupId> + <artifactId>oparent</artifactId> + <version>1.2.1</version> + </parent> + <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format> </properties> + <pluginRepositories> + <pluginRepository> + <id>central</id> + <url>http://repo1.maven.org/maven2</url> + </pluginRepository> + <pluginRepository> + <id>ecomp-public</id> + <url>${onap.nexus.url}/${publicNexusPath}</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </pluginRepository> + <pluginRepository> + <id>ecomp-release</id> + <url>${onap.nexus.url}/${releaseNexusPath}</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </pluginRepository> + <pluginRepository> + <id>ecomp-snapshots</id> + <url>${onap.nexus.url}/${snapshotNexusPath}</url> + <releases> + <enabled>false</enabled> + </releases> + </pluginRepository> + </pluginRepositories> + <repositories> + <repository> + <id>ecomp-public</id> + <url>${onap.nexus.url}/content/repositories/public/</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>ecomp-releases</id> + <url>${onap.nexus.url}/content/repositories/releases/</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>ecomp-snapshots</id> + <url>${onap.nexus.url}/content/repositories/snapshots/</url> + <releases> + <enabled>false</enabled> + </releases> + </repository> + </repositories> + + <modules> + <module>mdbc-server</module> + </modules> + <dependencies> <dependency> <groupId>com.datastax.cassandra</groupId> @@ -126,29 +210,19 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.5.1</version> - <configuration> - <source>8</source> - <target>8</target> - </configuration> - </plugin> - <plugin> - <artifactId>maven-assembly-plugin</artifactId> - <version>3.1.0</version> + <version>3.6.1</version> <configuration> - <descriptorRefs> - <descriptorRef>jar-with-dependencies</descriptorRef> - </descriptorRefs> + <debug>true</debug> + <compilerArgument>-Xlint</compilerArgument> + <verbose>true</verbose> + <showDeprecation>true</showDeprecation> + <showWarnings>true</showWarnings> + <source>1.8</source> + <target>1.8</target> + <compilerArgs> + <arg>-parameters</arg> + </compilerArgs> </configuration> - <executions> - <execution> - <id>make-assembly</id> <!-- this is used for inheritance merges --> - <phase>package</phase> <!-- bind to the packaging phase --> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> </plugin> </plugins> </build> @@ -164,11 +238,11 @@ <breakiterator>true</breakiterator> <version>true</version> <links> - <link>https://docs.oracle.com/javase/7/docs/api/</link> - <link>https://docs.oracle.com/javaee/7/api/</link> + <link>https://docs.oracle.com/javase/8/docs/api/</link> + <link>https://docs.oracle.com/javaee/8/api/</link> </links> </configuration> </plugin> </plugins> </reporting> -</project>
\ No newline at end of file +</project> 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<MusicTxDigestId> redoLog; - public final String ownerId; - public final String metricProcessId; - - public MusicRangeInformationRow(UUID index, List<MusicTxDigestId> 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<Range> ranges; - - public PartitionInformation(List<Range> 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"; - } -} |