Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ contact_links:
url: https://github.com/teragrep/doc_01/issues/new?template=doc-issue-report.md
about: Problems with Teragrep documentation
- name: Ask a question or get support
url: https://github.com/teragrep/repo-template/discussions
url: https://github.com/teragrep/pth_16/discussions
about: Ask a question or request support
- name: Report vulnerability
url: https://github.com/teragrep/teragrep/security/advisories/new
Expand Down
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/.settings/*
/.vscode/*
/.flattened-pom.xml
/target/*
/.classpath
/.factorypath
/.project
/.idea/
/*.iml
87 changes: 75 additions & 12 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,35 +1,98 @@
// Before publishing your new repository:
// 1. Write the readme file
// 2. Update the issues link in Contributing section in the readme file
// 3. Update the discussion link in config.yml file in .github/ISSUE_TEMPLATE directory

= repo-template
= Teragrep DPL Command-Line Executor (pth_16)

// Add a short description of your project. Tell what your project does and what it's used for.

This is a template repository for Teragrep organization.
Teragrep DPL Command-Line Executor is an utility to run DPL queries from command-line.

== Features

// List your project's features
- Allows running Teragrep queries from command-line.

== Documentation

See the official documentation on https://docs.teragrep.com[docs.teragrep.com].

== Limitations

// If your project has limitations, please list them. Otherwise remove this section.
Uses spark-submit.

== How to [compile/use/implement]

// add instructions how people can start to use your project
=== Usage

Example without arguments

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

Results into

[source,json]
----
{"_time":"2026-01-27T13:37:00.000+02:00","_raw":"Welcome to Teragrep®"}
----

Custom query

[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"'

----

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/repo-template/issues/new/choose[opening an issue] or submitting a pull request.
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:

Expand Down
450 changes: 450 additions & 0 deletions eclipse-java-formatter.xml

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions license-header
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Teragrep DPL Command-Line Executor (pth_16)
* Copyright (C) 2026 Suomen Kanuuna Oy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*
* Additional permission under GNU Affero General Public License version 3
* section 7
*
* If you modify this Program, or any covered work, by linking or combining it
* with other code, such other code is not for that reason alone subject to any
* of the requirements of the GNU Affero GPL version 3 as long as this Program
* is the same Program as licensed from Suomen Kanuuna Oy without any additional
* modifications.
*
* Supplemented terms under GNU Affero General Public License version 3
* section 7
*
* Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
* versions must be marked as "Modified version of" The Program.
*
* Names of the licensors and authors may not be used for publicity purposes.
*
* No rights are granted for use of trade names, trademarks, or service marks
* which are in The Program if any.
*
* Licensee must indemnify licensors and authors for any liability that these
* contractual assumptions impose on licensors and authors.
*
* To the extent this program is licensed as part of the Commercial versions of
* Teragrep, the applicable Commercial License may apply to this file if you as
* a licensee so wish it.
*/
Loading