Ingestion under fcdev
fcdev start runs the ingestor runtime (the Java program built from ./ingestor) beside the dev platform,
with no setup. fcdev ingest manages ingestions through the API. This page covers both. For the concepts see
Ingestion; for everyday fcdev see fcdev day to day.
What happens on fcdev start
Section titled “What happens on fcdev start”It happens only when ingestion is enabled (FC_INGESTION_ENABLED, on under fcdev) and the ingestor is
(--ingestor / FC_INGESTOR_ENABLED, on by default).
- Credential. fcdev creates the OAuth client
fcdev-ingestorif it is missing, holding exactly the rolesplatform:ingestion-runtimeandplatform:function-runner(the runtime also hostsjvmfunctions). On every start its secret is re-minted, kept only in the child’s environment, never logged or written to disk, and its roles are reconciled to those two. - Jar. In order:
FC_INGESTOR_JAR; a built jar in the checkout fcdev runs from (ingestor/ingestor-runtime/target/ingestor-runtime-*-all.jar, the newest); the pinned release, downloaded and SHA-256 checked. When none is found fcdev logs one INFO line and starts without the ingestor. - Java. fcdev never uses the machine’s Java. It installs its own Eclipse Temurin JRE of the major the runtime
needs on first use (a one-time download of about 55 MB from
api.adoptium.net, checksum verified, installed atomically). - Working directory. fcdev writes
config/application.yaml(the jar will not start without it) in the per-instance state directory and startsjava -jarthere with the credential and ports in the environment. - Ready. When
/health/readyanswers, fcdev logsingestor runtime ready on :8091. The runtime then polls the platform every 15 seconds (the dev setting) and shows as a live runtime.
The runtime’s output goes to ingestor.log in the state directory. If the JVM exits unexpectedly fcdev restarts
it, waiting 2 s, 4 s, 8 s and so on (up to a minute), and gives up after 5 consecutive failures (a run of 5
minutes or more resets the count). A missing ingestor never stops fcdev: offline, no jar, port taken, or a Java
that cannot be installed each log one INFO/WARN line and fcdev carries on.
fcdev ingestor status [--api-port N] [--ingestor-port N]prints the Java, the jar, the process and the health.
Where things are
Section titled “Where things are”| What | Where |
|---|---|
| fcdev’s Java | <user-cache-dir>/flowcatalyst/fcdev-jre/jre-<major>/ (macOS ~/Library/Caches/..., Linux ~/.cache/..., Windows %LocalAppData%). Override the root with FC_INGESTOR_JRE_DIR |
| Downloaded release jars | <user-cache-dir>/flowcatalyst/fcdev-ingestor/<version>/ |
| Working directory, log, pid | <user-data-dir>/flowcatalyst/fcdev-ingestor/api-<api-port>/ (override FC_INGESTOR_STATE_DIR) |
| Extension jars | ~/.flowcatalyst/ingestor-extensions (override FC_INGESTOR_EXTENSIONS_DIR) |
When a new fcdev raises the required Java major, the next start logs one line, installs the new major beside the
old and uses it. Old installs are never deleted; remove them yourself. A JRE is not updated within a major: delete
jre-<major>/ and restart to pick up a newer patch release.
Using a local jar or an extension
Section titled “Using a local jar or an extension”From a checkout, stop fcdev, build and start it again:
make ingestor-build # needs a JDK to build; running needs noneThe target refuses while a running ingestor holds the jar. make ingestor-test runs the ingestor’s tests (about
5 minutes). fcdev finds the jar from its working directory or the directory of the fcdev binary upward; to use a
jar from anywhere: FC_INGESTOR_JAR=/path/to/jar fcdev start.
An extension’s build drops its jar in the extensions folder. The runtime reads the folder at start, so restart fcdev after rebuilding. See Write an extension.
JVM functions
Section titled “JVM functions”The runtime also hosts jvm functions. When the ingestor child runs, fcdev points the platform’s
FC_FUNCTIONS_RUNNER_URL_JVM at it (unless you set that variable) and gives the child
INGEST_FUNCTIONS_ENABLED=true and INGEST_FUNCTIONS_POOL (the pool the local Go runner serves).
fcdev fn deploy <address> app.jar publishes a jar (the runtime jvm is picked from the .jar extension; a
function’s runtime is fixed by its first version). A jar cannot be run with fcdev fn run or fn dev: deploy
it. For the walkthrough with a real jar see ingestor/examples/function-hello and
Deploy and promote.
| Make target | Does |
|---|---|
make build |
The frontend, the Go binaries, the ingestor jar and the function API |
make ingestor-build |
Only the ingestor jar |
make function-api-install |
Installs the function API into ~/.m2, which a JVM function compiles against |
make function-hello |
Builds ingestor/examples/function-hello |
fcdev ingest
Section titled “fcdev ingest”The commands use fcdev profiles (--profile, or FC_PROFILE) and print the connection banner on stderr first.
Every command that changes something asks for confirmation on a prod profile; in CI it needs --yes and
allow_noninteractive = true in the profile. --json prints one JSON object on stdout and moves the human text
to stderr. An error is exit code 1. Refer to an ingestion as application/client/code or by id.
| Command | Does |
|---|---|
list [--application A] [--client C] [--q text] [--json] |
List ingestions |
get <ref> [--json] |
Show one |
apply <folder | file...> [--set name] [--dry-run] [--json] |
Apply the files as a set |
export <ref>... | --all [--out dir] [--application A] [--client C] |
Write definition files to <dir>/<application>/<client>/<code>.yaml |
versions <ref> |
List versions, the live one marked |
live <ref> <version> |
Make a version live |
pause <ref>, resume <ref> |
Stop or start an ingestion. Resume is refused (409) while the settings entry is not set or a secret has no value |
test <ref | file> [--wait] [--timeout d] |
Queue a test; --wait polls and prints the steps |
config get | set | delete <ref> |
The settings entry the source names. set takes <file.json | ->, --secrets (prompt for secret values) or --secrets-file (references) |
trace on | off | status | log <ref> |
Tracing. See Troubleshoot ingestion |
sets list | applies <set> | reapply <set> <apply-id> | release <set> |
Manage sets |
apply prints the plan, one line per ingestion with the fields that change. A definition that names a settings
entry which is not set yet is saved and the plan prints its CONFIG_MISSING warning under its line. test
exits 1 when the source failed, was refused, is not supported, or no runtime answered; NO_RESULTS is not a
failure. The full reference is fcdev CLI.
A quick loop against your local platform:
fcdev startfcdev ingest apply ./ingestions --dry-run --set localfcdev ingest apply ./ingestions --set localfcdev ingest config set ingest/acme/orders-feed orders-feed.json --secretsfcdev ingest test ingest/acme/orders-feed --waitfcdev ingest resume ingest/acme/orders-feedLoopback addresses are allowed under fcdev (the runtime’s APP_ENV is local), so a source can point at a
service on your machine. Do not rely on that anywhere else.
Turning it off
Section titled “Turning it off”fcdev start --ingestor=false, or FC_INGESTOR_ENABLED=false. FC_INGESTION_ENABLED=false turns off the
platform’s ingestion API as well. The fcdev-ingestor credential is then not touched.
Stopping and crashes
Section titled “Stopping and crashes”On a normal stop (fcdev stop, Ctrl-C, SIGTERM) fcdev sends the JVM SIGTERM and kills it after 15 s if it has
not exited. The config fcdev writes sets the drain to 10 s, so the runtime stops its routes and gives its
leases back before the 15 s are up. On Linux the kernel also kills the JVM if fcdev dies without cleanup. On
macOS there is no such facility: if fcdev is killed with SIGKILL the runtime keeps running and holds its port;
the next start logs that the port is in use and skips the ingestor. Stop the leftover (its pid is in
ingestor.pid) and restart. On Windows the JVM is ended outright on a normal stop.
Isolated instances
Section titled “Isolated instances”An isolated fcdev needs its own --ingestor-port, FC_INGESTOR_STATE_DIR and FC_INGESTOR_JRE_DIR. Sharing
the Java cache is safe; the port and state collide if left at the defaults of the same API port.