This is the repository for common java utilities of Sunbird. Utilities include date/string/json utils, request validators and generic database access utilities for Cassandra and ElasticSearch databases.
The code in this repository is licensed under MIT License unless otherwise noted. Please see the LICENSE file for details.
Fork the below projects and clone it from git,
git clone https://github.com/Sunbird-Lern/sunbird-utils/<latest-branch>
Open a new Terminal In the path,
Run the below command,
mvn clean install -DskipTests
Make sure the build is success and then, open a new Terminal In the path,
Run below command,
mvn clean install -DskipTests
java -jar \
-Dcassandra.migration.scripts.locations=filesystem:<absolute or relative path>/db/migration/cassandra/<keyspace_name> \
-Dcassandra.migration.cluster.contactpoints=localhost \
-Dcassandra.migration.cluster.port=9042 \
-Dcassandra.migration.cluster.username=username \
-Dcassandra.migration.cluster.password=password \
-Dcassandra.migration.keyspace.name=keyspace_name \
target/*-jar-with-dependencies.jar migrate
cluster.port - specify the port number where cassandra is running cluster.username - specify username of your cassandra cluster cluster.password - specify password of your cassandra cluster keyspace.name - specify keyspace for which you have to perform migration
java -jar \
-Dcassandra.migration.scripts.locations=filesystem:src/main/resources/db/migration/cassandra/sunbird_groups \
-Dcassandra.migration.cluster.contactpoints=localhost \
-Dcassandra.migration.cluster.port=9042 \
-Dcassandra.migration.cluster.username=cassandra \
-Dcassandra.migration.cluster.password=cassandra \
-Dcassandra.migration.keyspace.name=sunbird_groups \
target/*-jar-with-dependencies.jar migrate
java -cp "cassandra-migration-0.0.1-SNAPSHOT-jar-with-dependencies.jar" com.contrastsecurity.cassandra.migration.utils.MigrationScriptEntryPoint
The system environment listed below is required for command 2.
sunbird_cassandra_keyspace=<keyspace_name>
sunbird_cassandra_migration_location="filesystem:<absolute or relative path>/db/migration/cassandra"