Introduction

The fedshard definition file is in lineparse format.

A fedshard definition has three sections: fedshard, server and kb.

The fedshard section starts the definition of one fedshard repo that consists of multiple shard repos and possibly knowledgebase (kb) repos.

The fedshard section is followed by server and kb sections.

Another fedshard section starts a new fedshard repo defintion. The server and kb sections that preceeded the fedsdhard definition cannot be referenced.

fedshard

All items in the fedshard section expect exactly one argument. The repo, key and secondary-key items are required. The rest of the items are optional and are used to supply defaults for items of the same name in the server and kb sections.

item meaning
repo The name of this repo in the fedshard catalog
base-name When constructing names for the shards this will be the prefix for those names
key What is used to assign triples to shards. Either part or attribute
secondary-key If key is part then either subject, predicate, object or graph. If key is attribute then the name of an attribute found in every triple
scheme either http or https
host default host for storing shards
port default port on which the server is listening.
user default account used to authenticate with the server
password default password used to authenticate with the server
catalog default catalog in which to store shards
replica-server If using MMR shard replication then the default server onto which to store shard replicas. The value is the name of a server. The servers are named using the name directive in the server declaration. This item can be repeated in order to specify more than one server for replicas
shards-per-server Default number of shards to put on a server
replicas-per-shard default number of replicas of each shard

server

The items here are all optional but if not present then most of them must have been given a value in the fedshard section The items that need not be specified are replicas-per-shard and replica-server as the default is zero replicas-per-shard. Also host defaults to "127.1" and scheme defaults to "http".

name  
host  
port  
user  
password  
catalog  
replica-server  
shards-per-server  
replicas-per-shard  

kb

The repo item is required and the rest, if not present, get their value from the fedshard section.

repo  
scheme  
host  
port  
user  
password  
catalog 

Example

The following example shows the definitions of two fedshard repos which would be referred to as fedshard:myfed and fedshard:secondfed.

In the first definition we specify defaults in the fedshard section and use them in the server sections. In the second definition we do not put defaults in the fedshard section and we then specify all the details in the server sections because in this case the servers are configured differently.

If the following example were in the file example.def then the command

% agtool fedshard define --server mr.small:smallsecret@smallmachine:20035 example.def 

would add these definitions to the AllegroGraph server on smallmachine.

fedshard  
  repo myfed  
  key part  
  secondary-key graph  
  host 127.1 ;  port 10035  
  user test;  password xyzzy  
  shards-per-server 2  
  replicas-per-shard 1  
 
server  
 # this server definition uses all of the defaults from  
 # the fedshard section except that it overrides  
 # the host specification.  
 
server  
  host 127.2  
 
 
 # the kb defintion uses all of the defaults  
 # from the fedshard section  
 
kb  
  repo mykb  
 
# second definition  
 
fedshard  
  repo secondfed  
  key attribute  
  secondary-key classification  
 
server  
  host smallmachine  
  port 20035  
  user mr.small  
  password smallsecret  
  shards-per-server 1  
 
server  
  host bigmachine  
  port 30035  
  user mr.big  
  password bigsecret  
  shards-per-server 4