Fedshard definition | AllegroGraph 9.0.1
Author: Franz Incorporated

Copyright (c) 2005 - 2026 Franz, Incorporated
Last updated 27 May 2026 at 10:34

# AllegroGraph 9.0.1 Fedshard Definition

- Documentation Index
  - Release Notes
  - Quick Start
  - SSL/TLS Quick Start
  - Introduction
  - Setup and Configuration
    - Download
    - Server Installation
    - Server Configuration and Control
    - WebView
    - Database Upgrading
    - Managing Users
  - Server Management
    - Performance Tuning
    - Deleting Duplicate Triples
    - Purging Deleted Triples
    - Auditing
    - Managing Users
    - Replication
    - Point-in-Time Recovery
    - Transaction Log Archiving
    - Security Overview
    - Security Implementation
  - Tools
    - agtool
    - Data Loading
    - Data Export
    - Backup and Restore
    - Querying
    - RDFS++
    - Materializer
    - Event Scheduler
    - SHACL
  - Details
    - Triple Indices
    - Freetext Indices
    - Encoded IDs
    - Connection Pooling
    - N-dimensional Geospatial Overview
    - 2-D Geospatial
    - Temporal
    - Social Network
    - JavaScript
    - Datatypes
    - Data Conversion (Rapper)
    - Stored Procedures
    - Triple Attributes
    - Lineparse Format
  - Querying
    - SPARQL documentation summary
    - SPARQL Reference
    - SPIN
    - SPARQL Magic Properties
    - Prolog
  - 3rd-party tools
    - Solr text Indices
    - MongoDB integration
    - TopBraid Composer Plugin
    - Cloudera
  - Client APIs
    - Gruff
    - GraphTalker
    - REST/HTTP interface
    - HTTP reference
    - Javadocs (Sesame and Jena)
    - Python API
    - Lisp Reference
    - JavaScript
  - Tutorials
    - N-dimensional Geospatial
    - SPARQL Tutorial
    - Java Sesame
    - Java Jena
    - Python Sesame
    - Lisp
    - Prolog
    - More...
  - Other
    - Conferences and Seminars
    - Source Code on Github
    - Amazon EC2
    - Copyrights
  - Franz, Inc.

- Introduction
- fedshard
- server
- kb
- Example

Documentation Index

## 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