forked from spearce/jgit_cassandra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
52 lines (34 loc) · 1.53 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
org.eclipse.jgit.storage.cassandra
----------------------------------
This package is a trivial implementation of the
org.eclipse.jgit.storage.dht.spi interface, binding
JGit's generic DHT storage onto the Apache Cassandra
NoSQL database.
Install Cassandra 0.7 or later, and start it on at least one node.
The MAX_HEAP_SIZE setting needs to be at least 2G to work with the
400M linux-2.6.git repository:
MAX_HEAP_SIZE=2G cassandra/bin/cassandra -f
Define the keyspace and schema in Cassandra:
cassandra/bin/cassandra-cli --host localhost --file schema.cs
Compile this package, you may need JGit first:
(cd ../jgit && mvn clean install)
mvn clean package
Create a repository:
java -jar ./target/jgit-cs.jar \
cassandra-init \
git+cassandra://localhost/test/git_store/jgit.git
A git+cassandra repository URI has the obvious hostname component
(here "localhost"). The path starts with a cluster name, which is
only used internally for the connection pool (here "test"), and then
has the keyspace name (here "git_store"). The remainder of the URI
path is the repository path name ("jgit.git").
Launch a Git daemon, which needs at least 800M to handle the linux-2.6
repository. Currently JGit's DHT implementation holds onto the entire
pack during receive, to implement delta resolution efficiently.
java -Xmx800m -jar ./target/jgit-cs.jar cassandra-daemon \
--enable receive-pack
git+cassandra://localhost/test/git_store
Push to it:
git push git://localhost/jgit.git master
Clone from it:
git clone git://localhost/jgit.git