OSS Analysis: Apache Hop
#apache-hop#etl#data-integration#data-pipeline#security-logs#kubernetes
Contents
Apache Hop is an open-source ETL tool redesigned from a fork of Kettle (Pentaho Data Integration). In its GUI, you connect transforms into a pipeline and set the execution order with a workflow. This post examines whether Hop can serve as the integration layer that converts logs from security appliances and SIEMs into a common format.
Hop can handle the following jobs.
- Read a day of firewall log files, map them to common fields and load them into a PostgreSQL table
- Join the source IP of each event with an asset inventory through the Stream lookup transform and add an owner field
- Record Read, Written and Errors counts per transform for every run
Hop cannot take over the following jobs.
- Run itself every 5 minutes (there is no scheduler, so an external runner such as a Kubernetes CronJob is required)
- Keep polling a SIEM API with a per-minute rate limit shared by several jobs (no rate limiter)
- Store the last collection time as a watermark and query only newer data on the next run (no watermark store)
- Keep tenant A’s jobs from reaching tenant B’s credentials and data (single trust domain)
1. Overview
1.1 Streaming scope
Describing Hop as a streaming engine is only partly accurate. All transforms in a pipeline run at the same time, and rows stream from upstream transforms to downstream transforms. The official documentation describes a pipeline as follows.
“A pipeline is an active streaming dataflow network.”
A single pipeline run still ends when its input ends. Kafka consumer and JMS consumer are the sources that keep running, and Kafka consumer runs a sub-pipeline once per message batch.
1.2 Scheduling
Hop has no scheduler, and the documentation states this.
“Hop Server is not a scheduler and Hop has no calendar of its own.”
The repeat option of the workflow Start action is the only loop. The documentation warns that the repeat option does not replace a scheduler and keeps the Java process running. Periodic runs are left to external tools such as cron or a Kubernetes CronJob.
1.3 Hop Server default security
The default Hop Server configuration is not secure.
Basic authentication is enabled by default, but the bundled credentials are the published cluster/cluster.
TLS is disabled, and an authenticated user can call every endpoint.
The repository threat model rates the combination of published default credentials and access to all endpoints as critical.
Depending on the environment, these defaults can be a security risk.
2. Pipelines and workflows
Hop has two execution units.
| Unit | File | Execution |
|---|---|---|
| Pipeline | .hpl (XML) | All transforms run at the same time, and rows pass through buffers to the next transform |
| Workflow | .hwf (XML) | A state machine that runs actions one at a time and follows a success, failure or unconditional path based on the result |
3. Pipeline execution model
The Local Pipeline Engine creates one Java thread per transform copy. Each thread reads rows from the buffer before it, processes them and writes them to the buffer after it. The buffer between transforms (row set) holds 10,000 rows by default.
When a buffer is full, the upstream transform waits, which applies backpressure, so the slowest transform sets the throughput of the whole pipeline. Slow transforms such as REST calls run in parallel by raising the number of copies with Specify copies.
4. Workflows
Workflow actions run one at a time by default. With the Parallel execution option enabled on an action, the next actions start in their own threads. The Pipeline executor and Workflow executor transforms run another pipeline or workflow from inside a pipeline.
There is no automatic resume after a failure.
The action result has a checkpoint field, but no code sets its value.
To restart, pass the start action name with hop-run --startaction.
5. Configuration and secret management
- Pipelines and workflows are XML files. The documentation recommends keeping them in the project folder under git. A
.hplfile also stores canvas coordinates (<xloc>) and modification times, so moving a transform on the canvas produces a diff. - Metadata such as Relational Database Connection and Pipeline Run Configuration is stored as
<folder>/<name>.jsonfiles. A project uses${PROJECT_HOME}/metadataas its default folder, andhop-run -j <project> -e <environment>separates development and production values. - Stored passwords are obfuscated, not encrypted, by default.
“Note that it’s not really encryption, it’s more obfuscation. Passwords are difficult to read, not impossible.”
Real encryption applies only when the AES2 encoder (HOP_PASSWORD_ENCODER_PLUGIN=AES2) is enabled, or when a variable resolver in the #{name:key:element} form reads values from HashiCorp Vault, OpenBao, AWS, Azure or Google secret stores.
6. Execution paths and deployment
6.1 hop-run
hop-run is the command-line runner. Its exit codes are 0 for success, 1 for an execution error, 2 for an unhandled error and 9 for an argument error.
6.2 Docker image and Helm chart
The Docker image is based on Alpine and the OpenJDK 21 JRE.
With HOP_FILE_PATH set, it runs one file with hop-run and exits; without it, it starts Hop Server.
The default heap setting is HOP_OPTIONS=-XX:+AggressiveHeap.
The Helm chart deploys Hop Server and Hop Web as Deployments. There is no run configuration that runs a pipeline as a Kubernetes Job.
6.3 Hop Server
Hop Server provides /hop/* servlets and a /hop/api/v1/ JSON API on Jetty.
With Web service metadata, a single pipeline can be exposed as an HTTP endpoint.
7. Transforms for security log integration
7.1 Coverage
| Need | Hop |
|---|---|
| Read and write databases | Table input/output, Insert/Update, PostgreSQL bulk loader |
| Call REST APIs | REST client, HTTP client, HTTP post |
| Parse JSON | JSON input/output |
| Consume and produce Kafka | Kafka consumer, producer |
| Regex extraction, value validation | Regex evaluation, Data validator |
| Lookup enrichment | Database lookup, Stream lookup |
| Join two inputs | Merge join |
| Receive syslog | None |
| Load into Elasticsearch, OpenSearch | Not in the Local Pipeline Engine, Beam only |
| MQTT | Beam only |
| Rate limit of N calls per minute | None, Delay row only delays each row |
Merge join and Stream lookup join two inputs on a key. Enrichment that joins an asset inventory with detection events in one pipeline can be built with Hop.
7.2 Limits on external API calls
- REST client retries are disabled by default. The default count is 0 and the default delay is 200 ms, and retries apply only to the configured HTTP methods and status codes.
- Kafka consumer’s error hop works only with a batch size of 1. With a larger batch size, errors cannot be isolated per record.
8. Error handling and transactions
When a transform without error handling fails, the whole pipeline stops. The failing thread sets the error count to 1 and stops every transform. With an error hop on a transform, only the failed rows go to another transform and the remaining rows keep being processed.
Data committed before the stop is kept. Table output commits every 1,000 rows by default. With “Make this pipeline transactional” enabled in the Pipeline Run Configuration, the pipeline uses one connection per database and commits or rolls back once at the end.
The transactional option does not guarantee atomicity across databases either.
“This is not a two-phase-commit system.”
There is no store for incremental-load watermarks either. To “advance the watermark only after every page of the time window has arrived”, you have to keep the watermark in a database table yourself, read it at the start of the pipeline and update it at the end. The transactional option can commit both writes together only when the watermark table and the target table are in the same database.
Hop's design does not support distributed transactions. If the watermark and the loaded data live in different databases, or a Kafka offset has to be committed with a database write, only one side may be applied.
Idempotency is not guaranteed by default either. A default Table output leaves a partial commit after a failure, and running the same window again creates duplicate rows.
To make reruns safe, use one of these designs: the upsert of the Insert / Update transform, a primary key with Table output's Ignore insert errors, or deleting the window and inserting it again inside one database transaction.
9. Limitations
- Hop is not a sandbox. It recommends running only pipelines whose authors are trusted.
“Hop runs operator-authored pipelines and workflows with full host capability; it is not a sandbox.”
- Isolation between tenants or users is out of scope. The engine and the server form a single trust domain.
- The default security mode of Hop Web is
NONE. - Unique rows, Group by and Sort rows are not available on the Beam engines. Scaling out to Spark or Flink reduces the set of usable transforms.
- OpenTelemetry is only a pinned dependency version, and no Java code uses it. There is no Prometheus
/metricsendpoint. Execution records go to an Execution Information Location (local folder, database, Neo4j, Elasticsearch).
10. Ingestion layer review
I reviewed introducing Hop into the ingestion layer of a project I work on and concluded that it does not fit. The ingestion layer keeps pulling security events from many sources and has to meet the following requirements.
| Ingestion layer requirement | Hop |
|---|---|
| Periodic runs, only one of several instances runs | No scheduler and no lock against duplicate runs |
| Sources’ rate limits shared across instances | None |
| Advance the watermark after every page arrives | No watermark store |
| Add integrations without a deployment | File deployment (.hpl, metadata JSON) |
| Tenant isolation | Single trust domain |
| Isolate normalization failures | error hop |
The first four requirements are the core of an always-on ingestion layer. Moving to Hop means rebuilding those four outside Hop, and the integration logic ends up duplicated as Hop transform settings.