<commit_before># nomad-java-job

A simple Java application that prints JVM options and application
arguments for testing [HashiCorp's](https://hashicorp.com/)
[Nomad scheduler](https://www.nomadproject.io/).

## Usage

### Development

Run `./gradlew build`.

### Running

```
$ java -Xmx512m -XX:+UseG1GC -Djava.io.tmpdir=/opt/java/tmp -jar build/libs/nomad-java-job.jar arg1 arg2
JVM Options:
  -Xmx512m
  -XX:+UseG1GC
  -Djava.io.tmpdir=/opt/java/tmp
App arguments:
  arg1
  arg2

CTRL+C to quit...
^CShutdown hook completed.
$
```

### Nomad Job Definition

```
job "java" {
  datacenters = ["us-east-1"]

  type = "service"

  constraint {
    attribute = "$attr.kernel.name"
    value = "linux"
  }

  update {
    stagger = "10s"
    max_parallel = 1
  }

  group "java" {
    count = 1

    task "java" {
      driver = "java"

      config {
        jar_source = "https://s3.amazonaws.com/clstokes-public/bin/nomad-java-job.jar"
        args = "-Djava.io.tmpdir=/opt/"
        # JVM Options are not available as of 0.1.2
      }

      resources {
        cpu = 500
        memory = 256
        network {
          mbits = 10
          reserved_ports = [8080]
        }
      }
    }
  }

}

```<commit_msg>remove ports from nomad job configuration<commit_after># nomad-java-job

A simple Java application that prints JVM options and application
arguments for testing [HashiCorp's](https://hashicorp.com/)
[Nomad scheduler](https://www.nomadproject.io/).

## Usage

### Development

Run `./gradlew build`.

### Running

```
$ java -Xmx512m -XX:+UseG1GC -Djava.io.tmpdir=/opt/java/tmp -jar build/libs/nomad-java-job.jar arg1 arg2
JVM Options:
  -Xmx512m
  -XX:+UseG1GC
  -Djava.io.tmpdir=/opt/java/tmp
App arguments:
  arg1
  arg2

CTRL+C to quit...
^CShutdown hook completed.
$
```

### Nomad Job Definition

```
job "java" {
  datacenters = ["us-east-1"]

  type = "service"

  constraint {
    attribute = "$attr.kernel.name"
    value = "linux"
  }

  update {
    stagger = "10s"
    max_parallel = 1
  }

  group "java" {
    count = 1

    task "java" {
      driver = "java"

      config {
        jar_source = "https://s3.amazonaws.com/clstokes-public/bin/nomad-java-job.jar"
        args = "-Djava.io.tmpdir=/opt/"
        # JVM Options are not available as of 0.1.2
      }

      resources {
        cpu = 500
        memory = 256
        network {
          mbits = 10
        }
      }
    }
  }

}

```
{'fraction_non_alphanumeric': 0.14303380049464137, 'fraction_numerical': 0.025556471558120363, 'mean_word_length': 2.2403204272363153, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3329420', 'n_tokens_mistral': 947, 'n_tokens_neox': 875, 'n_words': 197}