diff options
Diffstat (limited to 'client/go/internal/admin/jvm')
22 files changed, 40 insertions, 28 deletions
diff --git a/client/go/internal/admin/jvm/application_container.go b/client/go/internal/admin/jvm/application_container.go index 59e87d22ead..c525ea77949 100644 --- a/client/go/internal/admin/jvm/application_container.go +++ b/client/go/internal/admin/jvm/application_container.go @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Author: arnej package jvm diff --git a/client/go/internal/admin/jvm/configproxy_jvm.go b/client/go/internal/admin/jvm/configproxy_jvm.go index 1c274d8b889..e8d8d41e129 100644 --- a/client/go/internal/admin/jvm/configproxy_jvm.go +++ b/client/go/internal/admin/jvm/configproxy_jvm.go @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Author: arnej package jvm diff --git a/client/go/internal/admin/jvm/container.go b/client/go/internal/admin/jvm/container.go index 32110c5e1bc..086ca8dde25 100644 --- a/client/go/internal/admin/jvm/container.go +++ b/client/go/internal/admin/jvm/container.go @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Author: arnej package jvm diff --git a/client/go/internal/admin/jvm/env.go b/client/go/internal/admin/jvm/env.go index 1cbdb46648f..5c1e938d46b 100644 --- a/client/go/internal/admin/jvm/env.go +++ b/client/go/internal/admin/jvm/env.go @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Author: arnej package jvm diff --git a/client/go/internal/admin/jvm/jdisc_options.go b/client/go/internal/admin/jvm/jdisc_options.go index 3e6c5b6003d..bd8ba4cf0d1 100644 --- a/client/go/internal/admin/jvm/jdisc_options.go +++ b/client/go/internal/admin/jvm/jdisc_options.go @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Author: arnej package jvm diff --git a/client/go/internal/admin/jvm/jdk_properties.go b/client/go/internal/admin/jvm/jdk_properties.go index 120771234de..8dc81ef26f7 100644 --- a/client/go/internal/admin/jvm/jdk_properties.go +++ b/client/go/internal/admin/jvm/jdk_properties.go @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Author: arnej package jvm diff --git a/client/go/internal/admin/jvm/mem_avail.go b/client/go/internal/admin/jvm/mem_avail.go index 11203b9aecf..bcc475e8ba8 100644 --- a/client/go/internal/admin/jvm/mem_avail.go +++ b/client/go/internal/admin/jvm/mem_avail.go @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Author: arnej package jvm diff --git a/client/go/internal/admin/jvm/mem_avail_test.go b/client/go/internal/admin/jvm/mem_avail_test.go index ea92fbfa858..640fbe2bff8 100644 --- a/client/go/internal/admin/jvm/mem_avail_test.go +++ b/client/go/internal/admin/jvm/mem_avail_test.go @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package jvm import ( diff --git a/client/go/internal/admin/jvm/mem_options.go b/client/go/internal/admin/jvm/mem_options.go index f58bb141587..d3b0d44c677 100644 --- a/client/go/internal/admin/jvm/mem_options.go +++ b/client/go/internal/admin/jvm/mem_options.go @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Author: arnej package jvm @@ -14,7 +14,9 @@ func (opts *Options) getOrSetHeapSize(prefix string, heapSize AmountOfMemory) Am var missing bool = true for _, x := range opts.jvmArgs { if strings.HasPrefix(x, prefix) { - val, err := ParseJvmMemorySpec(strings.TrimPrefix(x, prefix)) + x = strings.TrimPrefix(x, prefix) + x = strings.TrimPrefix(x, ":") + val, err := ParseJvmMemorySpec(x) if err == nil { missing = false heapSize = val diff --git a/client/go/internal/admin/jvm/mem_options_test.go b/client/go/internal/admin/jvm/mem_options_test.go index c15143d4758..3501e44c723 100644 --- a/client/go/internal/admin/jvm/mem_options_test.go +++ b/client/go/internal/admin/jvm/mem_options_test.go @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package jvm import ( diff --git a/client/go/internal/admin/jvm/memory.go b/client/go/internal/admin/jvm/memory.go index 2ace1f4ac88..8a51b1087ff 100644 --- a/client/go/internal/admin/jvm/memory.go +++ b/client/go/internal/admin/jvm/memory.go @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Author: arnej package jvm @@ -56,6 +56,7 @@ func (v AmountOfMemory) AsJvmSpec() string { } return fmt.Sprintf("%d%s", val, suffix) } + func (v AmountOfMemory) String() string { val := v.numBytes idx := 0 diff --git a/client/go/internal/admin/jvm/memory_test.go b/client/go/internal/admin/jvm/memory_test.go index c898606a2db..4a23ecedc18 100644 --- a/client/go/internal/admin/jvm/memory_test.go +++ b/client/go/internal/admin/jvm/memory_test.go @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package jvm @@ -41,10 +41,19 @@ func TestConversion(t *testing.T) { result, err = ParseJvmMemorySpec("17g") assert.Nil(t, err) assert.Equal(t, v1, result) + result, err = ParseJvmMemorySpec("17G") + assert.Nil(t, err) + assert.Equal(t, v1, result) result, err = ParseJvmMemorySpec("17000m") assert.Nil(t, err) assert.Equal(t, v2, result) + result, err = ParseJvmMemorySpec("17000M") + assert.Nil(t, err) + assert.Equal(t, v2, result) result, err = ParseJvmMemorySpec("17000000k") assert.Nil(t, err) assert.Equal(t, v3, result) + result, err = ParseJvmMemorySpec("17000000K") + assert.Nil(t, err) + assert.Equal(t, v3, result) } diff --git a/client/go/internal/admin/jvm/opens_options.go b/client/go/internal/admin/jvm/opens_options.go index bfc4e519787..02c87a802b1 100644 --- a/client/go/internal/admin/jvm/opens_options.go +++ b/client/go/internal/admin/jvm/opens_options.go @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Author: arnej package jvm diff --git a/client/go/internal/admin/jvm/options.go b/client/go/internal/admin/jvm/options.go index f509b4d44d1..a788fb0cca9 100644 --- a/client/go/internal/admin/jvm/options.go +++ b/client/go/internal/admin/jvm/options.go @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Author: arnej package jvm diff --git a/client/go/internal/admin/jvm/options_test.go b/client/go/internal/admin/jvm/options_test.go index 0f781756dde..064784efb5a 100644 --- a/client/go/internal/admin/jvm/options_test.go +++ b/client/go/internal/admin/jvm/options_test.go @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package jvm import ( @@ -43,18 +43,18 @@ func TestHeapSizeMulti(t *testing.T) { assert.Equal(t, aa, o.CurMinHeapSize(aa)) assert.Equal(t, aa, o.CurMaxHeapSize(aa)) assert.Equal(t, 2, len(o.jvmArgs)) - o.AppendOption("-Xms234m") - o.AppendOption("-Xmx456m") + o.AppendOption("-Xms:234m") + o.AppendOption("-Xmx:456M") assert.Equal(t, 4, len(o.jvmArgs)) assert.Equal(t, bb, o.CurMinHeapSize(aa)) assert.Equal(t, bb, o.CurMinHeapSize(dd)) assert.Equal(t, cc, o.CurMaxHeapSize(aa)) assert.Equal(t, cc, o.CurMaxHeapSize(dd)) - o.AppendOption("-Xms1g") - o.AppendOption("-Xmx2g") + o.AppendOption("-Xms1G") + o.AppendOption("-Xmx:2g") assert.Equal(t, GigaBytesOfMemory(1), o.CurMinHeapSize(aa)) assert.Equal(t, GigaBytesOfMemory(2), o.CurMaxHeapSize(aa)) - o.AppendOption("-Xms16777216k") + o.AppendOption("-Xms:16777216K") o.AppendOption("-Xmx32505856k") assert.Equal(t, KiloBytesOfMemory(16777216), o.CurMinHeapSize(aa)) assert.Equal(t, KiloBytesOfMemory(32505856), o.CurMaxHeapSize(aa)) diff --git a/client/go/internal/admin/jvm/properties.go b/client/go/internal/admin/jvm/properties.go index 9aae550b10a..446f218a2ad 100644 --- a/client/go/internal/admin/jvm/properties.go +++ b/client/go/internal/admin/jvm/properties.go @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Author: arnej package jvm diff --git a/client/go/internal/admin/jvm/properties_test.go b/client/go/internal/admin/jvm/properties_test.go index c417319a51e..f57ecf573d2 100644 --- a/client/go/internal/admin/jvm/properties_test.go +++ b/client/go/internal/admin/jvm/properties_test.go @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package jvm import ( diff --git a/client/go/internal/admin/jvm/qr_start_cfg.go b/client/go/internal/admin/jvm/qr_start_cfg.go index 59c72fab3a0..4edb02b2a84 100644 --- a/client/go/internal/admin/jvm/qr_start_cfg.go +++ b/client/go/internal/admin/jvm/qr_start_cfg.go @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Author: arnej package jvm diff --git a/client/go/internal/admin/jvm/run.go b/client/go/internal/admin/jvm/run.go index 30d5b61a063..e0b6c6f69c4 100644 --- a/client/go/internal/admin/jvm/run.go +++ b/client/go/internal/admin/jvm/run.go @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Author: arnej package jvm diff --git a/client/go/internal/admin/jvm/standalone_container.go b/client/go/internal/admin/jvm/standalone_container.go index 7bbf03e83e8..859aea9157d 100644 --- a/client/go/internal/admin/jvm/standalone_container.go +++ b/client/go/internal/admin/jvm/standalone_container.go @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Author: arnej package jvm diff --git a/client/go/internal/admin/jvm/xx_options.go b/client/go/internal/admin/jvm/xx_options.go index ea984df1dfe..857ec2e8b69 100644 --- a/client/go/internal/admin/jvm/xx_options.go +++ b/client/go/internal/admin/jvm/xx_options.go @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Author: arnej package jvm diff --git a/client/go/internal/admin/jvm/zk_locks.go b/client/go/internal/admin/jvm/zk_locks.go index 39b8dd0c64b..90a05f94905 100644 --- a/client/go/internal/admin/jvm/zk_locks.go +++ b/client/go/internal/admin/jvm/zk_locks.go @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Author: arnej package jvm |