https://github.com/teragrep/pth_16
DPL Shell Executor for Teragrep
https://github.com/teragrep/pth_16
Last synced: 3 months ago
JSON representation
DPL Shell Executor for Teragrep
- Host: GitHub
- URL: https://github.com/teragrep/pth_16
- Owner: teragrep
- License: agpl-3.0
- Created: 2026-01-27T08:16:14.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-02-17T15:08:10.000Z (4 months ago)
- Last Synced: 2026-02-17T17:54:28.532Z (4 months ago)
- Language: Java
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 0
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= Teragrep DPL Command-Line Executor (pth_16)
Teragrep DPL Command-Line Executor is an utility to run DPL queries from command-line.
== Features
- Allows running Teragrep queries from command-line.
== Documentation
See the official documentation on https://docs.teragrep.com[docs.teragrep.com].
== Limitations
Uses spark-submit.
== How to [compile/use/implement]
=== Usage
Example without arguments
[source,shell]
----
HADOOP_CONF_DIR=/opt/teragrep/hdp_03/etc/hadoop JAVA_HOME=/usr/lib/jvm/java-11 /opt/teragrep/spk_02/bin/spark-submit \
--verbose \
--deploy-mode client \
--master yarn \
--executor-memory 5G \
--total-executor-cores 8 \
--jars /opt/teragrep/pth_10/lib/pth_10-shaded.jar,/opt/teragrep/spk_03/lib/*.jar \
--files interpreter.json pth_16-jar-with-dependencies.jar
----
Results into
[source,json]
----
{"_time":"2026-01-27T13:37:00.000+02:00","_raw":"Welcome to Teragrep®"}
----
Custom query
[source,shell]
----
HADOOP_CONF_DIR=/opt/teragrep/hdp_03/etc/hadoop JAVA_HOME=/usr/lib/jvm/java-11 /opt/teragrep/spk_02/bin/spark-submit \
--verbose \
--deploy-mode client \
--master yarn \
--executor-memory 5G \
--total-executor-cores 8 \
--jars /opt/teragrep/pth_10/lib/pth_10-shaded.jar,/opt/teragrep/spk_03/lib/*.jar \
--files interpreter.json \
pth_16-jar-with-dependencies.jar \
'| makeresults count=1 | eval _raw="this is a custom query"'
----
Results into
[source,json]
----
{"_time":"2026-01-27T13:37:54.000+02:00","_raw":"this is a custom query"}
----
Results can be piped into a file
[source,shell]
----
JAVA_HOME=/usr/lib/jvm/java-11 /opt/teragrep/spk_02/bin/spark-submit \
--verbose \
--deploy-mode client \
--master yarn \
--executor-memory 5G \
--total-executor-cores 8 \
--jars /opt/teragrep/pth_10/lib/pth_10-shaded.jar,/opt/teragrep/spk_03/lib/*.jar \
--files interpreter.json \
pth_16-jar-with-dependencies.jar \
'| makeresults count=1 | eval _raw="this is a custom query"' | tee output.json
----
Results into
[source,json]
----
{
"_time": "2026-01-27T13:54:24.000+02:00",
"_raw": "this is a custom query"
}
----
== Contributing
// Change the repository name in the issues link to match with your project's name
You can involve yourself with our project by https://github.com/teragrep/pth_16/issues/new/choose[opening an issue] or submitting a pull request.
Contribution requirements:
. *All changes must be accompanied by a new or changed test.* If you think testing is not required in your pull request, include a sufficient explanation as why you think so.
. Security checks must pass
. Pull requests must align with the principles and http://www.extremeprogramming.org/values.html[values] of extreme programming.
. Pull requests must follow the principles of Object Thinking and Elegant Objects (EO).
Read more in our https://github.com/teragrep/teragrep/blob/main/contributing.adoc[Contributing Guideline].
=== Contributor License Agreement
Contributors must sign https://github.com/teragrep/teragrep/blob/main/cla.adoc[Teragrep Contributor License Agreement] before a pull request is accepted to organization's repositories.
You need to submit the CLA only once. After submitting the CLA you can contribute to all Teragrep's repositories.