Skip to content

Commit

Permalink
Merge pull request #104 from scalar-labs/scalar-schema-tool-version
Browse files Browse the repository at this point in the history
Update version of scalar-schema tool
  • Loading branch information
feeblefakie authored Oct 26, 2020
2 parents 0716662 + b26da0d commit cdad10f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions tools/scalar-schema/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ $ lein uberjar
### Create tables
```console
# For Cosmos DB
$ java -jar target/scalar-schema.jar --cosmos -h <YOUR_ACCOUNT_URI> -p <YOUR_ACCOUNT_PASSWORD> -f schema.json [-r BASE_RESOURCE_UNIT]
$ java -jar target/scalar-schema-standalone-<version>.jar --cosmos -h <YOUR_ACCOUNT_URI> -p <YOUR_ACCOUNT_PASSWORD> -f schema.json [-r BASE_RESOURCE_UNIT]
```
- `-r BASE_RESOURCE_UNIT` is an option. You can specify the RU of each database. The maximum RU in tables in the database will be set. If you don't specify RU of tables, the database RU will be set with this option. When you use transaction function, the RU of the coordinator table of Scalar DB is specified by this option. By default, it's 400.

```console
# For Cassandra
$ java -jar target/scalar-schema.jar --cassandra -h <CASSANDRA_IP> [-P <CASSANDRA_PORT>] [-u <CASSNDRA_USER>] [-p <CASSANDRA_PASSWORD>] -f schema.json [-n <NETWORK_STRATEGY>] [-R <REPLICATION_FACTOR>]
$ java -jar target/scalar-schema-standalone-<version>.jar --cassandra -h <CASSANDRA_IP> [-P <CASSANDRA_PORT>] [-u <CASSNDRA_USER>] [-p <CASSANDRA_PASSWORD>] -f schema.json [-n <NETWORK_STRATEGY>] [-R <REPLICATION_FACTOR>]
```

- If `-P <CASSANDRA_PORT>` is not supplied, it defaults to `9042`.
Expand All @@ -33,17 +33,17 @@ $ java -jar target/scalar-schema.jar --cassandra -h <CASSANDRA_IP> [-P <CASSANDR
### Delete all tables
```console
# For Cosmos DB
$ java -jar target/scalar-schema.jar --cosmos -h <YOUR_ACCOUNT_URI> -p <YOUR_ACCOUNT_PASSWORD> -D
$ java -jar target/scalar-schema-standalone-<version>.jar --cosmos -h <YOUR_ACCOUNT_URI> -p <YOUR_ACCOUNT_PASSWORD> -D
```

```console
# For Cassandra
$ java -jar target/scalar-schema.jar --cassandra -h <CASSANDRA_IP> [-P <CASSANDRA_PORT>] [-u <CASSNDRA_USER>] [-p <CASSANDRA_PASSWORD>] -D
$ java -jar target/scalar-schema-standalone-<version>.jar --cassandra -h <CASSANDRA_IP> [-P <CASSANDRA_PORT>] [-u <CASSNDRA_USER>] [-p <CASSANDRA_PASSWORD>] -D
```

### Show help
```console
$ java -jar target/scalar-schema.jar --help
$ java -jar target/scalar-schema-standalone-<version>.jar --help
```

### Sample schema file
Expand Down
4 changes: 2 additions & 2 deletions tools/scalar-schema/project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject scalar-schema "0.1.0-SNAPSHOT"
(defproject scalar-schema "2.2.2"
:description "Schema tool for Scalar DB"
:url "http://github.com/scalar-labs/scalardb"
:dependencies [[org.clojure/clojure "1.10.1"]
Expand All @@ -17,5 +17,5 @@
:repl-options {:init-ns scalar-schema.cassandra-schema}
:main scalar-schema.core
:profiles {:uberjar {:aot :all
:uberjar-name "scalar-schema.jar"
:uberjar-name "scalar-schema-standalone-%s.jar"
:jvm-opts ["-Dclojure.compiler.direct-linking=true"]}})

0 comments on commit cdad10f

Please sign in to comment.