http://git-wip-us.apache.org/repos/asf/ignite/blob/c2c03a92/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/shared.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/shared.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/shared.pug new file mode 100644 index 0000000..83e8f2a --- /dev/null +++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/shared.pug @@ -0,0 +1,24 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +include /app/helpers/jade/mixins + +mixin discovery-shared(modelAt = '$ctrl.clonedCluster') + -const model = `${modelAt}.discovery.SharedFs` + + .pc-form-grid-row&attributes(attributes=attributes) + .pc-form-grid-col-60 + +text('File path:', `${model}.path`, '"path"', 'false', 'disco/tcp', 'Shared path')
http://git-wip-us.apache.org/repos/asf/ignite/blob/c2c03a92/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/vm.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/vm.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/vm.pug new file mode 100644 index 0000000..1266f86 --- /dev/null +++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/vm.pug @@ -0,0 +1,55 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +include /app/helpers/jade/mixins + +//- Static discovery +mixin discovery-vm(modelAt = '$ctrl.clonedCluster') + -const model = `${modelAt}.discovery.Vm` + -const addresses = `${model}.addresses` + + .pc-form-grid-row&attributes(attributes=attributes) + .pc-form-grid-col-60 + .ignite-form-field + .ignite-form-field__control + +list-addresses({ + items: addresses, + name: 'vmAddresses', + tip: `Addresses may be represented as follows: + <ul> + <li>IP address (e.g. 127.0.0.1, 9.9.9.9, etc)</li> + <li>IP address and port (e.g. 127.0.0.1:47500, 9.9.9.9:47501, etc)</li> + <li>IP address and port range (e.g. 127.0.0.1:47500..47510, 9.9.9.9:47501..47504, etc)</li> + <li>Hostname (e.g. host1.com, host2, etc)</li> + <li>Hostname and port (e.g. host1.com:47500, host2:47502, etc)</li> + <li>Hostname and port range (e.g. host1.com:47500..47510, host2:47502..47508, etc)</li> + </ul> + If port is 0 or not provided then default port will be used (depends on discovery SPI configuration)<br /> + If port range is provided (e.g. host:port1..port2) the following should be considered: + </ul> + <ul> + <li> port1 < port2 should be true</li> + <li> Both port1 and port2 should be greater than 0</li> + </ul>` + })( + ng-required='true' + expose-ignite-form-field-control='$vmAddresses' + ) + .ignite-form-field__errors( + ng-messages=`$vmAddresses.$error` + ng-show=`$vmAddresses.$invalid` + ) + +form-field-feedback(_, 'required', 'Addresses should be configured') http://git-wip-us.apache.org/repos/asf/ignite/blob/c2c03a92/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper.pug new file mode 100644 index 0000000..826e09b --- /dev/null +++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper.pug @@ -0,0 +1,84 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +include /app/helpers/jade/mixins + +mixin discovery-zookeeper(modelAt = '$ctrl.clonedCluster') + + -var discoveryKind = 'ZooKeeper' + -var required = `${modelAt}.discovery.kind == '${discoveryKind}'` + -var model = `${modelAt}.discovery.ZooKeeper` + -var modelRetryPolicyKind = `${model}.retryPolicy.kind` + + .pc-form-grid-row&attributes(attributes=attributes) + .pc-form-grid-col-60 + +java-class('Curator:', `${model}.curator`, '"curator"', 'true', 'false', + 'The Curator framework in use<br/>\ + By default generates curator of org.apache.curator. framework.imps.CuratorFrameworkImpl\ + class with configured connect string, retry policy, and default session and connection timeouts', required) + .pc-form-grid-col-60 + +text('Connect string:', `${model}.zkConnectionString`, `'${discoveryKind}ConnectionString'`, required, 'host:port[chroot][,host:port[chroot]]', + 'When <b>IGNITE_ZK_CONNECTION_STRING</b> system property is not configured this property will be used.<br><br>This should be a comma separated host:port pairs, each corresponding to a zk server. e.g. "127.0.0.1:3000,127.0.0.1:3001".<br>If the optional chroot suffix is used the example would look like: "127.0.0.1:3000,127.0.0.1:3002/app/a".<br><br>Where the client would be rooted at "/app/a" and all paths would be relative to this root - ie getting/setting/etc... "/foo/bar" would result in operations being run on "/app/a/foo/bar" (from the server perspective).<br><br><a href="https://zookeeper.apache.org/doc/r3.2.2/api/org/apache/zookeeper/ZooKeeper.html#ZooKeeper(java.lang.String,%20int,%20org.apache.zookeeper.Watcher)">Zookeeper docs</a>') + .pc-form-grid-col-60 + +dropdown('Retry policy:', `${model}.retryPolicy.kind`, '"retryPolicy"', 'true', 'Default', + '[\ + {value: "ExponentialBackoff", label: "Exponential backoff"},\ + {value: "BoundedExponentialBackoff", label: "Bounded exponential backoff"},\ + {value: "UntilElapsed", label: "Until elapsed"},\ + {value: "NTimes", label: "Max number of times"},\ + {value: "OneTime", label: "Only once"},\ + {value: "Forever", label: "Always allow retry"},\ + {value: "Custom", label: "Custom"},\ + {value: null, label: "Default"}\ + ]', + 'Available retry policies:\ + <ul>\ + <li>Exponential backoff - retries a set number of times with increasing sleep time between retries</li>\ + <li>Bounded exponential backoff - retries a set number of times with an increasing (up to a maximum bound) sleep time between retries</li>\ + <li>Until elapsed - retries until a given amount of time elapses</li>\ + <li>Max number of times - retries a max number of times</li>\ + <li>Only once - retries only once</li>\ + <li>Always allow retry - retries infinitely</li>\ + <li>Custom - custom retry policy implementation</li>\ + <li>Default - exponential backoff retry policy with configured base sleep time equal to 1000ms and max retry count equal to 10</li>\ + </ul>') + + .pc-form-grid__break + + include ./zookeeper/retrypolicy/exponential-backoff + include ./zookeeper/retrypolicy/bounded-exponential-backoff + include ./zookeeper/retrypolicy/until-elapsed + include ./zookeeper/retrypolicy/n-times + include ./zookeeper/retrypolicy/one-time + include ./zookeeper/retrypolicy/forever + include ./zookeeper/retrypolicy/custom + + .pc-form-grid-col-30 + -var model = `${modelAt}.discovery.ZooKeeper` + + +text('Base path:', `${model}.basePath`, '"basePath"', 'false', '/services', 'Base path for service registration') + .pc-form-grid-col-30 + +text('Service name:', `${model}.serviceName`, '"serviceName"', 'false', 'ignite', + 'Service name to use, as defined by Curator's ServiceDiscovery recipe<br/>\ + In physical ZooKeeper terms, it represents the node under basePath, under which services will be registered') + + .pc-form-grid__break + + .pc-form-grid-col-60 + +checkbox('Allow duplicate registrations', `${model}.allowDuplicateRegistrations`, '"allowDuplicateRegistrations"', + 'Whether to register each node only once, or if duplicate registrations are allowed<br/>\ + Nodes will attempt to register themselves, plus those they know about<br/>\ + By default, duplicate registrations are not allowed, but you might want to set this property to <b>true</b> if you have multiple network interfaces or if you are facing troubles') http://git-wip-us.apache.org/repos/asf/ignite/blob/c2c03a92/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/bounded-exponential-backoff.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/bounded-exponential-backoff.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/bounded-exponential-backoff.pug new file mode 100644 index 0000000..0ddc1e9 --- /dev/null +++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/bounded-exponential-backoff.pug @@ -0,0 +1,26 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +include /app/helpers/jade/mixins + +-var model = `${modelAt}.discovery.ZooKeeper.retryPolicy.BoundedExponentialBackoff` + +.pc-form-grid-col-20(ng-if-start=`${modelRetryPolicyKind} === 'BoundedExponentialBackoff'`) + +number('Base interval:', `${model}.baseSleepTimeMs`, '"beBaseSleepTimeMs"', 'true', '1000', '0', 'Initial amount of time in ms to wait between retries') +.pc-form-grid-col-20 + +number('Max interval:', `${model}.maxSleepTimeMs`, '"beMaxSleepTimeMs"', 'true', 'Integer.MAX_VALUE', '0', 'Max time in ms to sleep on each retry') +.pc-form-grid-col-20(ng-if-end) + +number-min-max('Max retries:', `${model}.maxRetries`, '"beMaxRetries"', 'true', '10', '0', '29', 'Max number of times to retry') http://git-wip-us.apache.org/repos/asf/ignite/blob/c2c03a92/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/custom.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/custom.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/custom.pug new file mode 100644 index 0000000..6a1bcfb --- /dev/null +++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/custom.pug @@ -0,0 +1,25 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +include /app/helpers/jade/mixins + +-var model = `${modelAt}.discovery.ZooKeeper.retryPolicy` +-var retry = `${model}.Custom` +-var required = `${modelAt}.discovery.kind === "ZooKeeper" && ${modelAt}.discovery.ZooKeeper.retryPolicy.kind === "Custom"` + +.pc-form-grid-col-60(ng-if-start=`${modelRetryPolicyKind} === 'Custom'`) + +java-class('Class name:', `${retry}.className`, '"customClassName"', 'true', required, 'Custom retry policy implementation class name', required) +.pc-form-grid__break(ng-if-end) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/c2c03a92/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/exponential-backoff.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/exponential-backoff.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/exponential-backoff.pug new file mode 100644 index 0000000..bfc3c02 --- /dev/null +++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/exponential-backoff.pug @@ -0,0 +1,26 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +include /app/helpers/jade/mixins + +-var model = `${modelAt}.discovery.ZooKeeper.retryPolicy.ExponentialBackoff` + +.pc-form-grid-col-20(ng-if-start=`${modelRetryPolicyKind} === 'ExponentialBackoff'`) + +number('Base interval:', `${model}.baseSleepTimeMs`, '"expBaseSleepTimeMs"', 'true', '1000', '0', 'Initial amount of time in ms to wait between retries') +.pc-form-grid-col-20 + +number-min-max('Max retries:', `${model}.maxRetries`, '"expMaxRetries"', 'true', '10', '0', '29', 'Max number of times to retry') +.pc-form-grid-col-20(ng-if-end) + +number('Max interval:', `${model}.maxSleepMs`, '"expMaxSleepMs"', 'true', 'Integer.MAX_VALUE', '0', 'Max time in ms to sleep on each retry') http://git-wip-us.apache.org/repos/asf/ignite/blob/c2c03a92/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/forever.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/forever.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/forever.pug new file mode 100644 index 0000000..575106b --- /dev/null +++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/forever.pug @@ -0,0 +1,23 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +include /app/helpers/jade/mixins + +-var model = `${modelAt}.discovery.ZooKeeper.retryPolicy.Forever` + +.pc-form-grid-col-30(ng-if-start=`${modelRetryPolicyKind} === 'Forever'`) + +number('Interval:', `${model}.retryIntervalMs`, '"feRetryIntervalMs"', 'true', '1000', '0', 'Time in ms between retry attempts') +.pc-form-grid__break(ng-if-end) http://git-wip-us.apache.org/repos/asf/ignite/blob/c2c03a92/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/n-times.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/n-times.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/n-times.pug new file mode 100644 index 0000000..dbb54e5 --- /dev/null +++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/n-times.pug @@ -0,0 +1,24 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +include /app/helpers/jade/mixins + +-var model = `${modelAt}.discovery.ZooKeeper.retryPolicy.NTimes` + +.pc-form-grid-col-30(ng-if-start=`${modelRetryPolicyKind} === 'NTimes'`) + +number('Retries:', `${model}.n`, '"n"', 'true', '10', '0', 'Number of times to retry') +.pc-form-grid-col-30(ng-if-end) + +number('Interval:', `${model}.sleepMsBetweenRetries`, '"ntSleepMsBetweenRetries"', 'true', '1000', '0', 'Time in ms between retry attempts') http://git-wip-us.apache.org/repos/asf/ignite/blob/c2c03a92/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/one-time.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/one-time.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/one-time.pug new file mode 100644 index 0000000..4ff1644 --- /dev/null +++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/one-time.pug @@ -0,0 +1,23 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +include /app/helpers/jade/mixins + +-var model = `${modelAt}.discovery.ZooKeeper.retryPolicy.OneTime` + +.pc-form-grid-col-30(ng-if-start=`${modelRetryPolicyKind} === 'OneTime'`) + +number('Interval:', `${model}.sleepMsBetweenRetry`, '"oneSleepMsBetweenRetry"', 'true', '1000', '0', 'Time in ms to retry attempt') +.pc-form-grid__break(ng-if-end) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/c2c03a92/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/until-elapsed.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/until-elapsed.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/until-elapsed.pug new file mode 100644 index 0000000..ebde01c --- /dev/null +++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/general/discovery/zookeeper/retrypolicy/until-elapsed.pug @@ -0,0 +1,24 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +include /app/helpers/jade/mixins + +-var model = `${modelAt}.discovery.ZooKeeper.retryPolicy.UntilElapsed` + +.pc-form-grid-col-30(ng-if-start=`${modelRetryPolicyKind} === 'UntilElapsed'`) + +number('Total time:', `${model}.maxElapsedTimeMs`, '"ueMaxElapsedTimeMs"', 'true', '60000', '0', 'Total time in ms for execution of retry attempt') +.pc-form-grid-col-30(ng-if-end) + +number('Interval:', `${model}.sleepMsBetweenRetries`, '"ueSleepMsBetweenRetries"', 'true', '1000', '0', 'Time in ms between retry attempts') http://git-wip-us.apache.org/repos/asf/ignite/blob/c2c03a92/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/hadoop.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/hadoop.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/hadoop.pug new file mode 100644 index 0000000..16a072c --- /dev/null +++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/hadoop.pug @@ -0,0 +1,87 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +include /app/helpers/jade/mixins + +-var form = 'hadoop' +-var model = '$ctrl.clonedCluster.hadoopConfiguration' +-var plannerModel = model + '.mapReducePlanner' +-var weightedModel = plannerModel + '.Weighted' +-var weightedPlanner = plannerModel + '.kind === "Weighted"' +-var customPlanner = plannerModel + '.kind === "Custom"' +-var libs = model + '.nativeLibraryNames' + +panel-collapsible(ng-form=form on-open=`ui.loadPanel('${form}')`) + -var uniqueTip = 'Such native library already exists!' + + panel-title Hadoop configuration + panel-description Hadoop Accelerator configuration. + panel-content.pca-form-row(ng-if=`ui.isPanelLoaded('${form}')`) + .pca-form-column-6.pc-form-grid-row + .pc-form-grid-col-60 + +dropdown('Map reduce planner:', plannerModel + '.kind', '"MapReducePlanner"', 'true', 'Default', '[\ + {value: "Weighted", label: "Weighted"},\ + {value: "Custom", label: "Custom"},\ + {value: null, label: "Default"}\ + ]', 'Implementation of map reduce planner\ + <ul>\ + <li>Weighted - Planner which assigns mappers and reducers based on their "weights"</li>\ + <li>Custom - Custom planner implementation</li>\ + <li>Default - Default planner implementation</li>\ + </ul>') + .pc-form-group.pc-form-grid-row(ng-show=weightedPlanner) + .pc-form-grid-col-20 + +number('Local mapper weight:', weightedModel + '.localMapperWeight', '"LocalMapperWeight"', 'true', 100, '0', + 'This weight is added to a node when a mapper is assigned and it is input split data is located on this node') + .pc-form-grid-col-20 + +number('Remote mapper weight:', weightedModel + '.remoteMapperWeight', '"remoteMapperWeight"', 'true', 100, '0', + 'This weight is added to a node when a mapper is assigned, but it is input split data is not located on this node') + .pc-form-grid-col-20 + +number('Local reducer weight:', weightedModel + '.localReducerWeight', '"localReducerWeight"', 'true', 100, '0', + 'This weight is added to a node when a reducer is assigned and the node have at least one assigned mapper') + .pc-form-grid-col-30 + +number('Remote reducer weight:', weightedModel + '.remoteReducerWeight', '"remoteReducerWeight"', 'true', 100, '0', + 'This weight is added to a node when a reducer is assigned, but the node does not have any assigned mappers') + .pc-form-grid-col-30 + +number('Local mapper weight:', weightedModel + '.preferLocalReducerThresholdWeight', '"preferLocalReducerThresholdWeight"', 'true', 200, '0', + "When threshold is reached, a node with mappers is no longer considered as preferred for further reducer assignments") + .pc-form-group.pc-form-grid-row(ng-show=customPlanner) + .pc-form-grid-col-60 + +java-class('Class name:', plannerModel + '.Custom.className', '"MapReducePlannerCustomClass"', 'true', customPlanner, + 'Custom planner implementation') + .pc-form-grid-col-30 + +number('Finished job info TTL:', model + '.finishedJobInfoTtl', '"finishedJobInfoTtl"', 'true', '30000', '0', + 'Finished job info time-to-live in milliseconds') + .pc-form-grid-col-30 + +number('Max parallel tasks:', model + '.maxParallelTasks', '"maxParallelTasks"', 'true', 'availableProcessors * 2', '1', + 'Max number of local tasks that may be executed in parallel') + .pc-form-grid-col-30 + +number('Max task queue size:', model + '.maxTaskQueueSize', '"maxTaskQueueSize"', 'true', '8192', '1', 'Max task queue size') + .pc-form-grid-col-60 + .ignite-form-field + +list-text-field({ + items: libs, + lbl: 'Library name', + name: 'libraryName', + itemName: 'library name', + itemsName: 'library names' + })( + list-editable-cols=`::[{name: 'Native libraries:'}]` + ) + +unique-feedback(_, `${uniqueTip}`) + + .pca-form-column-6 + +preview-xml-java(model, 'clusterHadoop') http://git-wip-us.apache.org/repos/asf/ignite/blob/c2c03a92/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/igfs.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/igfs.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/igfs.pug new file mode 100644 index 0000000..c1216a2 --- /dev/null +++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/igfs.pug @@ -0,0 +1,34 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +include /app/helpers/jade/mixins + +-var form = 'igfs' +-var model = '$ctrl.clonedCluster' + +panel-collapsible(ng-form=form on-open=`ui.loadPanel('${form}')`) + panel-title IGFS + panel-description + | IGFS (Ignite In-Memory File System) configurations assigned to cluster. + | #[a.link-success(href="https://apacheignite-fs.readme.io/docs/in-memory-file-system" target="_blank") More info] + panel-content.pca-form-row(ng-if=`ui.isPanelLoaded('${form}')`) + .pca-form-column-6 + .settings-row + +dropdown-multiple('<span>IGFS:</span><a ui-sref="base.configuration.edit.advanced.igfs({linkId: linkId()})"> (add)</a>', + `${model}.igfss`, '"igfss"', true, 'Choose IGFS', 'No IGFS configured', 'igfss', + 'Select IGFS to start in cluster or add a new IGFS') + .pca-form-column-6 + +preview-xml-java(model, 'igfss', 'igfss') http://git-wip-us.apache.org/repos/asf/ignite/blob/c2c03a92/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/load-balancing.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/load-balancing.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/load-balancing.pug new file mode 100644 index 0000000..ff817e1 --- /dev/null +++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/load-balancing.pug @@ -0,0 +1,115 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +include /app/helpers/jade/mixins + +-var model = '$ctrl.clonedCluster' +-var form = 'loadBalancing' +-var loadBalancingSpi = model + '.loadBalancingSpi' +-var loadBalancingCustom = '$item.kind === "Custom"' +-var loadProbeCustom = '$item.kind === "Adaptive" && $item.Adaptive.loadProbe.kind === "Custom"' + +panel-collapsible(ng-form=form on-open=`ui.loadPanel('${form}')`) + panel-title Load balancing configuration + panel-description + | Load balancing component balances job distribution among cluster nodes. + | #[a.link-success(href="https://apacheignite.readme.io/docs/load-balancing" target="_blank") More info] + panel-content.pca-form-row(ng-if=`ui.isPanelLoaded('${form}')`) + .pca-form-column-6 + mixin clusters-load-balancing-spi + .ignite-form-field(ng-init='loadBalancingSpiTbl={type: "loadBalancingSpi", model: "loadBalancingSpi", focusId: "kind", ui: "load-balancing-table"}') + +ignite-form-field__label('Load balancing configurations:', '"loadBalancingConfigurations"') + +tooltip(`Load balancing component balances job distribution among cluster nodes`) + .ignite-form-field__control + -let items = loadBalancingSpi + + list-editable(ng-model=items name='loadBalancingConfigurations') + list-editable-item-edit + - form = '$parent.form' + .settings-row + +sane-ignite-form-field-dropdown({ + label: 'Load balancing:', + model: '$item.kind', + name: '"loadBalancingKind"', + required: true, + options: '::$ctrl.Clusters.loadBalancingKinds', + tip: `Provides the next best balanced node for job execution + <ul> + <li>Round-robin - Iterates through nodes in round-robin fashion and pick the next sequential node</li> + <li>Adaptive - Adapts to overall node performance</li> + <li>Random - Picks a random node for job execution</li> + <li>Custom - Custom load balancing implementation</li> + </ul>` + })( + ignite-unique=`${loadBalancingSpi}` + ignite-unique-property='kind' + ) + +unique-feedback('"loadBalancingKind"', 'Load balancing SPI of that type is already configured') + .settings-row(ng-show='$item.kind === "RoundRobin"') + +checkbox('Per task', '$item.RoundRobin.perTask', '"loadBalancingRRPerTask"', 'A new round robin order should be created for every task flag') + .settings-row(ng-show='$item.kind === "Adaptive"') + +dropdown('Load probe:', '$item.Adaptive.loadProbe.kind', '"loadBalancingAdaptiveLoadProbeKind"', 'true', 'Default', '[\ + {value: "Job", label: "Job count"},\ + {value: "CPU", label: "CPU load"},\ + {value: "ProcessingTime", label: "Processing time"},\ + {value: "Custom", label: "Custom"},\ + {value: null, label: "Default"}\ + ]', 'Implementation of node load probing\ + <ul>\ + <li>Job count - Based on active and waiting job count</li>\ + <li>CPU load - Based on CPU load</li>\ + <li>Processing time - Based on total job processing time</li>\ + <li>Custom - Custom load probing implementation</li>\ + <li>Default - Default load probing implementation</li>\ + </ul>') + .settings-row(ng-show='$item.kind === "Adaptive" && $item.Adaptive.loadProbe.kind') + .panel-details(ng-show='$item.Adaptive.loadProbe.kind === "Job"') + .details-row + +checkbox('Use average', '$item.Adaptive.loadProbe.Job.useAverage', '"loadBalancingAdaptiveJobUseAverage"', 'Use average CPU load vs. current') + .panel-details(ng-show='$item.Adaptive.loadProbe.kind === "CPU"') + .details-row + +checkbox('Use average', '$item.Adaptive.loadProbe.CPU.useAverage', '"loadBalancingAdaptiveCPUUseAverage"', 'Use average CPU load vs. current') + .details-row + +checkbox('Use processors', '$item.Adaptive.loadProbe.CPU.useProcessors', '"loadBalancingAdaptiveCPUUseProcessors"', "divide each node's CPU load by the number of processors on that node") + .details-row + +number-min-max-step('Processor coefficient:', '$item.Adaptive.loadProbe.CPU.processorCoefficient', + '"loadBalancingAdaptiveCPUProcessorCoefficient"', 'true', '1', '0.001', '1', '0.05', 'Coefficient of every CPU') + .panel-details(ng-show='$item.Adaptive.loadProbe.kind === "ProcessingTime"') + .details-row + +checkbox('Use average', '$item.Adaptive.loadProbe.ProcessingTime.useAverage', '"loadBalancingAdaptiveJobUseAverage"', 'Use average execution time vs. current') + .panel-details(ng-show=loadProbeCustom) + .details-row + +java-class('Load brobe implementation:', '$item.Adaptive.loadProbe.Custom.className', '"loadBalancingAdaptiveJobUseClass"', 'true', loadProbeCustom, + 'Custom load balancing SPI implementation class name.', loadProbeCustom) + .settings-row(ng-show='$item.kind === "WeightedRandom"') + +number('Node weight:', '$item.WeightedRandom.nodeWeight', '"loadBalancingWRNodeWeight"', 'true', 10, '1', 'Weight of node') + .settings-row(ng-show='$item.kind === "WeightedRandom"') + +checkbox('Use weights', '$item.WeightedRandom.useWeights', '"loadBalancingWRUseWeights"', 'Node weights should be checked when doing random load balancing') + .settings-row(ng-show=loadBalancingCustom) + +java-class('Load balancing SPI implementation:', '$item.Custom.className', '"loadBalancingClass"', 'true', loadBalancingCustom, + 'Custom load balancing SPI implementation class name.', loadBalancingCustom) + + list-editable-no-items + list-editable-add-item-button( + add-item=`$ctrl.Clusters.addLoadBalancingSpi(${model})` + label-single='load balancing configuration' + label-multiple='load balancing configurations' + ) + + +clusters-load-balancing-spi + + .pca-form-column-6 + +preview-xml-java(model, 'clusterLoadBalancing') http://git-wip-us.apache.org/repos/asf/ignite/blob/c2c03a92/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/logger.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/logger.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/logger.pug new file mode 100644 index 0000000..7b4b9aa --- /dev/null +++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/logger.pug @@ -0,0 +1,60 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +include /app/helpers/jade/mixins + +-var form = 'logger' +-var model = '$ctrl.clonedCluster.logger' +-var kind = model + '.kind' + +panel-collapsible(ng-form=form on-open=`ui.loadPanel('${form}')`) + panel-title Logger configuration + panel-description Logging functionality used throughout the system. + panel-content.pca-form-row(ng-if=`ui.isPanelLoaded('${form}')`) + .pca-form-column-6.pc-form-grid-row + .pc-form-grid-col-60 + +dropdown('Logger:', kind, '"logger"', 'true', 'Default', + '[\ + {value: "Log4j", label: "Apache Log4j"},\ + {value: "Log4j2", label: "Apache Log4j 2"},\ + {value: "SLF4J", label: "Simple Logging Facade (SLF4J)"},\ + {value: "Java", label: "Java logger (JUL)"},\ + {value: "JCL", label: "Jakarta Commons Logging (JCL)"},\ + {value: "Null", label: "Null logger"},\ + {value: "Custom", label: "Custom"},\ + {value: null, label: "Default"}\ + ]', + 'Logger implementations\ + <ul>\ + <li>Apache Log4j - log4j-based logger</li>\ + <li>Apache Log4j 2 - Log4j2-based logger</li>\ + <li>Simple Logging Facade (SLF4J) - SLF4j-based logger</li>\ + <li>Java logger (JUL) - built in java logger</li>\ + <li>Jakarta Commons Logging (JCL) - wraps any JCL (Jakarta Commons Logging) loggers</li>\ + <li>Null logger - logger which does not output anything</li>\ + <li>Custom - custom logger implementation</li>\ + <li>Default - Apache Log4j if awailable on classpath or Java logger otherwise</li>\ + </ul>') + .pc-form-group(ng-show=`${kind} && (${kind} === 'Log4j2' || ${kind} === 'Log4j' || ${kind} === 'Custom')`) + .pc-form-grid-row(ng-show=`${kind} === 'Log4j2'`) + include ./logger/log4j2 + .pc-form-grid-row(ng-show=`${kind} === 'Log4j'`) + include ./logger/log4j + .pc-form-grid-row(ng-show=`${kind} === 'Custom'`) + include ./logger/custom + .pca-form-column-6 + -var model = '$ctrl.clonedCluster.logger' + +preview-xml-java(model, 'clusterLogger') http://git-wip-us.apache.org/repos/asf/ignite/blob/c2c03a92/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/logger/custom.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/logger/custom.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/logger/custom.pug new file mode 100644 index 0000000..a717754 --- /dev/null +++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/logger/custom.pug @@ -0,0 +1,24 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +include /app/helpers/jade/mixins + +-var form = 'logger' +-var model = '$ctrl.clonedCluster.logger.Custom' +-var required = '$ctrl.clonedCluster.logger.kind === "Custom"' + +.pc-form-grid-col-60 + +java-class('Class:', `${model}.class`, '"customLogger"', 'true', required, 'Logger implementation class name', required) http://git-wip-us.apache.org/repos/asf/ignite/blob/c2c03a92/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/logger/log4j.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/logger/log4j.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/logger/log4j.pug new file mode 100644 index 0000000..a1cab60 --- /dev/null +++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/logger/log4j.pug @@ -0,0 +1,49 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +include /app/helpers/jade/mixins + +-var form = 'logger' +-var model = '$ctrl.clonedCluster.logger.Log4j' +-var pathRequired = model + '.mode === "Path" && $ctrl.clonedCluster.logger.kind === "Log4j"' + +.pc-form-grid-col-30 + +dropdown('Level:', `${model}.level`, '"log4jLevel"', 'true', 'Default', + '[\ + {value: "OFF", label: "OFF"},\ + {value: "FATAL", label: "FATAL"},\ + {value: "ERROR", label: "ERROR"},\ + {value: "WARN", label: "WARN"},\ + {value: "INFO", label: "INFO"},\ + {value: "DEBUG", label: "DEBUG"},\ + {value: "TRACE", label: "TRACE"},\ + {value: "ALL", label: "ALL"},\ + {value: null, label: "Default"}\ + ]', + 'Level for internal log4j implementation') +.pc-form-grid-col-30 + +dropdown-required('Logger configuration:', `${model}.mode`, '"log4jMode"', 'true', 'true', 'Choose logger mode', + '[\ + {value: "Default", label: "Default"},\ + {value: "Path", label: "Path"}\ + ]', + 'Choose logger configuration\ + <ul>\ + <li>Default - default logger</li>\ + <li>Path - path or URI to XML configuration</li>\ + </ul>') +.pc-form-grid-col-60(ng-show=pathRequired) + +text('Path:', `${model}.path`, '"log4jPath"', pathRequired, 'Input path', 'Path or URI to XML configuration') http://git-wip-us.apache.org/repos/asf/ignite/blob/c2c03a92/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/logger/log4j2.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/logger/log4j2.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/logger/log4j2.pug new file mode 100644 index 0000000..fc94e06 --- /dev/null +++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/logger/log4j2.pug @@ -0,0 +1,38 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +include /app/helpers/jade/mixins + +-var form = 'logger' +-var model = '$ctrl.clonedCluster.logger.Log4j2' +-var log4j2Required = '$ctrl.clonedCluster.logger.kind === "Log4j2"' + +.pc-form-grid-col-60 + +dropdown('Level:', `${model}.level`, '"log4j2Level"', 'true', 'Default', + '[\ + {value: "OFF", label: "OFF"},\ + {value: "FATAL", label: "FATAL"},\ + {value: "ERROR", label: "ERROR"},\ + {value: "WARN", label: "WARN"},\ + {value: "INFO", label: "INFO"},\ + {value: "DEBUG", label: "DEBUG"},\ + {value: "TRACE", label: "TRACE"},\ + {value: "ALL", label: "ALL"},\ + {value: null, label: "Default"}\ + ]', + 'Level for internal log4j2 implementation') +.pc-form-grid-col-60 + +text('Path:', `${model}.path`, '"log4j2Path"', log4j2Required, 'Input path', 'Path or URI to XML configuration') http://git-wip-us.apache.org/repos/asf/ignite/blob/c2c03a92/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/marshaller.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/marshaller.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/marshaller.pug new file mode 100644 index 0000000..baa4956 --- /dev/null +++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/marshaller.pug @@ -0,0 +1,75 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +include /app/helpers/jade/mixins + +-var form = 'marshaller' +-var model = '$ctrl.clonedCluster' +-var marshaller = model + '.marshaller' +-var optMarshaller = marshaller + '.OptimizedMarshaller' + +panel-collapsible(ng-form=form on-open=`ui.loadPanel('${form}')`) + panel-title Marshaller + panel-description + | Marshaller allows to marshal or unmarshal objects in grid. + | It provides serialization/deserialization mechanism for all instances that are sent across networks or are otherwise serialized. + | By default BinaryMarshaller will be used. + | #[a.link-success(href="https://apacheignite.readme.io/docs/binary-marshaller" target="_blank") More info] + panel-content.pca-form-row(ng-if=`ui.isPanelLoaded('${form}')`) + .pca-form-column-6.pc-form-grid-row + .pc-form-grid-col-60(ng-if='$ctrl.available(["1.0.0", "2.0.0"])') + +dropdown('Marshaller:', marshaller + '.kind', '"kind"', 'true', 'Default', '$ctrl.marshallerVariant', + 'Instance of marshaller to use in grid<br/>\ + <ul>\ + <li>OptimizedMarshaller - Optimized implementation of marshaller</li>\ + <li>JdkMarshaller - Marshaller based on JDK serialization mechanism</li>\ + <li>Default - BinaryMarshaller serialize and deserialize all objects in the binary format</li>\ + </ul>') + .pc-form-grid-col-60(ng-if='$ctrl.available(["2.0.0", "2.1.0"])') + +dropdown('Marshaller:', marshaller + '.kind', '"kind"', 'true', 'Default', '$ctrl.marshallerVariant', + 'Instance of marshaller to use in grid<br/>\ + <ul>\ + <li>JdkMarshaller - Marshaller based on JDK serialization mechanism</li>\ + <li>Default - BinaryMarshaller serialize and deserialize all objects in the binary format</li>\ + </ul>') + .pc-form-group.pc-form-grid-row( + ng-show=`${marshaller}.kind === 'OptimizedMarshaller'` + ng-if='$ctrl.available(["1.0.0", "2.1.0"])' + ) + .pc-form-grid-col-60 + +number('Streams pool size:', `${optMarshaller}.poolSize`, '"poolSize"', 'true', '0', '0', + 'Specifies size of cached object streams used by marshaller<br/>\ + Object streams are cached for performance reason to avoid costly recreation for every serialization routine<br/>\ + If 0 (default), pool is not used and each thread has its own cached object stream which it keeps reusing<br/>\ + Since each stream has an internal buffer, creating a stream for each thread can lead to high memory consumption if many large messages are marshalled or unmarshalled concurrently<br/>\ + Consider using pool in this case. This will limit number of streams that can be created and, therefore, decrease memory consumption<br/>\ + NOTE: Using streams pool can decrease performance since streams will be shared between different threads which will lead to more frequent context switching') + .pc-form-grid-col-60 + +checkbox('Require serializable', `${optMarshaller}.requireSerializable`, '"requireSerializable"', + 'Whether marshaller should require Serializable interface or not') + .pc-form-grid-col-60 + +checkbox('Marshal local jobs', `${model}.marshalLocalJobs`, '"marshalLocalJobs"', 'If this flag is enabled, jobs mapped to local node will be marshalled as if it was remote node') + + //- Removed in ignite 2.0 + .pc-form-grid-col-30(ng-if-start='$ctrl.available(["1.0.0", "2.0.0"])') + +number('Keep alive time:', `${model}.marshallerCacheKeepAliveTime`, '"marshallerCacheKeepAliveTime"', 'true', '10000', '0', + 'Keep alive time of thread pool that is in charge of processing marshaller messages') + .pc-form-grid-col-30(ng-if-end) + +number('Pool size:', `${model}.marshallerCacheThreadPoolSize`, '"marshallerCacheThreadPoolSize"', 'true', 'max(8, availableProcessors) * 2', '1', + 'Default size of thread pool that is in charge of processing marshaller messages') + + .pca-form-column-6 + +preview-xml-java(model, 'clusterMarshaller') http://git-wip-us.apache.org/repos/asf/ignite/blob/c2c03a92/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/memory.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/memory.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/memory.pug new file mode 100644 index 0000000..831adea --- /dev/null +++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/memory.pug @@ -0,0 +1,195 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +include /app/helpers/jade/mixins + +-var form = 'memoryConfiguration' +-var model = '$ctrl.clonedCluster.memoryConfiguration' +-var memoryPolicies = model + '.memoryPolicies' + +panel-collapsible( + ng-form=form + on-open=`ui.loadPanel('${form}')` + ng-show='$ctrl.available(["2.0.0", "2.3.0"])' +) + panel-title Memory configuration + panel-description + | Page memory is a manageable off-heap based memory architecture that is split into pages of fixed size. + | #[a.link-success(href="https://apacheignite.readme.io/docs/durable-memory" target="_blank") More info] + panel-content.pca-form-row(ng-if=`$ctrl.available(["2.0.0", "2.3.0"]) && ui.isPanelLoaded('${form}')`) + .pca-form-column-6.pc-form-grid-row + .pc-form-grid-col-60 + +sane-ignite-form-field-dropdown({ + label: 'Page size:', + model: `${model}.pageSize`, + name: '"MemoryConfigurationPageSize"', + options: `$ctrl.Clusters.memoryConfiguration.pageSize.values`, + tip: 'Every memory region is split on pages of fixed size' + }) + .pc-form-grid-col-60 + +number('Concurrency level:', model + '.concurrencyLevel', '"MemoryConfigurationConcurrencyLevel"', + 'true', 'availableProcessors', '2', 'The number of concurrent segments in Ignite internal page mapping tables') + .pc-form-grid-col-60.pc-form-group__text-title + span System cache + .pc-form-group.pc-form-grid-row + .pc-form-grid-col-30 + pc-form-field-size( + label='Initial size:' + ng-model=`${model}.systemCacheInitialSize` + name='systemCacheInitialSize' + placeholder='{{ $ctrl.Clusters.memoryConfiguration.systemCacheInitialSize.default / systemCacheInitialSizeScale.value }}' + min='{{ ::$ctrl.Clusters.memoryConfiguration.systemCacheInitialSize.min }}' + tip='Initial size of a memory region reserved for system cache' + on-scale-change='systemCacheInitialSizeScale = $event' + ) + .pc-form-grid-col-30 + pc-form-field-size( + label='Max size:' + ng-model=`${model}.systemCacheMaxSize` + name='systemCacheMaxSize' + placeholder='{{ $ctrl.Clusters.memoryConfiguration.systemCacheMaxSize.default / systemCacheMaxSizeScale.value }}' + min='{{ $ctrl.Clusters.memoryConfiguration.systemCacheMaxSize.min($ctrl.clonedCluster) }}' + tip='Maximum size of a memory region reserved for system cache' + on-scale-change='systemCacheMaxSizeScale = $event' + ) + .pc-form-grid-col-60.pc-form-group__text-title + span Memory policies + .pc-form-group.pc-form-grid-row + .pc-form-grid-col-60 + +sane-ignite-form-field-text({ + label: 'Default memory policy name:', + model: `${model}.defaultMemoryPolicyName`, + name: '"defaultMemoryPolicyName"', + placeholder: '{{ ::$ctrl.Clusters.memoryPolicy.name.default }}', + tip: 'Name of a memory policy to be used as default one' + })( + pc-not-in-collection='::$ctrl.Clusters.memoryPolicy.name.invalidValues' + ui-validate=`{ + defaultMemoryPolicyExists: '$ctrl.Clusters.memoryPolicy.customValidators.defaultMemoryPolicyExists($value, ${memoryPolicies})' + }` + ui-validate-watch=`"${memoryPolicies}"` + ui-validate-watch-object-equality='true' + ng-model-options='{allowInvalid: true}' + ) + +form-field-feedback('"MemoryPolicyName"', 'notInCollection', '{{::$ctrl.Clusters.memoryPolicy.name.invalidValues[0]}} is reserved for internal use') + +form-field-feedback('"MemoryPolicyName"', 'defaultMemoryPolicyExists', 'Memory policy with that name should be configured') + .pc-form-grid-col-60(ng-hide='(' + model + '.defaultMemoryPolicyName || "default") !== "default"') + +number('Default memory policy size:', model + '.defaultMemoryPolicySize', '"defaultMemoryPolicySize"', + 'true', '0.8 * totalMemoryAvailable', '10485760', + 'Specify desired size of default memory policy without having to use more verbose syntax of MemoryPolicyConfiguration elements') + .pc-form-grid-col-60 + mixin clusters-memory-policies + .ignite-form-field(ng-init='memoryPoliciesTbl={type: "memoryPolicies", model: "memoryPolicies", focusId: "name", ui: "memory-policies-table"}') + +ignite-form-field__label('Configured policies:', '"configuredPolicies"') + +tooltip(`List of configured policies`) + .ignite-form-field__control + -let items = memoryPolicies + + list-editable(ng-model=items name='memoryPolicies') + list-editable-item-edit.pc-form-grid-row + - form = '$parent.form' + .pc-form-grid-col-60 + +sane-ignite-form-field-text({ + label: 'Name:', + model: '$item.name', + name: '"MemoryPolicyName"', + placeholder: '{{ ::$ctrl.Clusters.memoryPolicy.name.default }}', + tip: 'Memory policy name' + })( + ui-validate=`{ + uniqueMemoryPolicyName: '$ctrl.Clusters.memoryPolicy.customValidators.uniqueMemoryPolicyName($item, ${items})' + }` + ui-validate-watch=`"${items}"` + ui-validate-watch-object-equality='true' + pc-not-in-collection='::$ctrl.Clusters.memoryPolicy.name.invalidValues' + ng-model-options='{allowInvalid: true}' + ) + +form-field-feedback('"MemoryPolicyName', 'uniqueMemoryPolicyName', 'Memory policy with that name is already configured') + +form-field-feedback('"MemoryPolicyName', 'notInCollection', '{{::$ctrl.Clusters.memoryPolicy.name.invalidValues[0]}} is reserved for internal use') + .pc-form-grid-col-60 + pc-form-field-size( + label='Initial size:' + ng-model='$item.initialSize' + ng-model-options='{allowInvalid: true}' + name='MemoryPolicyInitialSize' + placeholder='{{ $ctrl.Clusters.memoryPolicy.initialSize.default / scale.value }}' + min='{{ ::$ctrl.Clusters.memoryPolicy.initialSize.min }}' + tip='Initial memory region size defined by this memory policy' + on-scale-change='scale = $event' + ) + .pc-form-grid-col-60 + pc-form-field-size( + ng-model='$item.maxSize' + ng-model-options='{allowInvalid: true}' + name='MemoryPolicyMaxSize' + label='Maximum size:' + placeholder='{{ ::$ctrl.Clusters.memoryPolicy.maxSize.default }}' + min='{{ $ctrl.Clusters.memoryPolicy.maxSize.min($item) }}' + tip='Maximum memory region size defined by this memory policy' + ) + .pc-form-grid-col-60 + +text('Swap file path:', '$item.swapFilePath', '"MemoryPolicySwapFilePath"', 'false', + 'Input swap file path', 'An optional path to a memory mapped file for this memory policy') + .pc-form-grid-col-60 + +dropdown('Eviction mode:', '$item.pageEvictionMode', '"MemoryPolicyPageEvictionMode"', 'true', 'DISABLED', + '[\ + {value: "DISABLED", label: "DISABLED"},\ + {value: "RANDOM_LRU", label: "RANDOM_LRU"},\ + {value: "RANDOM_2_LRU", label: "RANDOM_2_LRU"}\ + ]', + 'An algorithm for memory pages eviction\ + <ul>\ + <li>DISABLED - Eviction is disabled</li>\ + <li>RANDOM_LRU - Once a memory region defined by a memory policy is configured, an off - heap array is allocated to track last usage timestamp for every individual data page</li>\ + <li>RANDOM_2_LRU - Differs from Random - LRU only in a way that two latest access timestamps are stored for every data page</li>\ + </ul>') + .pc-form-grid-col-30 + +number-min-max-step('Eviction threshold:', '$item.evictionThreshold', '"MemoryPolicyEvictionThreshold"', + 'true', '0.9', '0.5', '0.999', '0.05', 'A threshold for memory pages eviction initiation') + .pc-form-grid-col-30 + +sane-ignite-form-field-number({ + label: 'Empty pages pool size:', + model: '$item.emptyPagesPoolSize', + name: '"MemoryPolicyEmptyPagesPoolSize"', + placeholder: '{{ ::$ctrl.Clusters.memoryPolicy.emptyPagesPoolSize.default }}', + min: '{{ ::$ctrl.Clusters.memoryPolicy.emptyPagesPoolSize.min }}', + max: '{{ $ctrl.Clusters.memoryPolicy.emptyPagesPoolSize.max($ctrl.clonedCluster, $item) }}', + tip: 'The minimal number of empty pages to be present in reuse lists for this memory policy' + }) + + //- Since ignite 2.1 + .pc-form-grid-col-30(ng-if-start='$ctrl.available("2.1.0")') + +number('Sub intervals:', '$item.subIntervals', '"MemoryPolicySubIntervals"', + 'true', '5', '1', 'A number of sub-intervals the whole rate time interval will be split into to calculate allocation and eviction rates') + .pc-form-grid-col-30(ng-if-end) + +number('Rate time interval:', '$item.rateTimeInterval', '"MemoryPolicyRateTimeInterval"', + 'true', '60000', '1000', 'Time interval for allocation rate and eviction rate monitoring purposes') + + .pc-form-grid-col-60 + +checkbox('Metrics enabled', '$item.metricsEnabled', '"MemoryPolicyMetricsEnabled"', + 'Whether memory metrics are enabled by default on node startup') + + list-editable-no-items + list-editable-add-item-button( + add-item=`$ctrl.Clusters.addMemoryPolicy($ctrl.clonedCluster)` + label-single='memory policy configuration' + label-multiple='memory policy configurations' + ) + + +clusters-memory-policies + + .pca-form-column-6 + +preview-xml-java(model, 'clusterMemory') http://git-wip-us.apache.org/repos/asf/ignite/blob/c2c03a92/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/metrics.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/metrics.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/metrics.pug new file mode 100644 index 0000000..c4c9260 --- /dev/null +++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/metrics.pug @@ -0,0 +1,46 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +include /app/helpers/jade/mixins + +-var form = 'metrics' +-var model = '$ctrl.clonedCluster' + +panel-collapsible(ng-form=form on-open=`ui.loadPanel('${form}')`) + panel-title Metrics + panel-description Cluster runtime metrics settings. + panel-content.pca-form-row(ng-if=`ui.isPanelLoaded('${form}')`) + .pca-form-column-6.pc-form-grid-row + .pc-form-grid-col-30 + +number('Expire time:', `${model}.metricsExpireTime`, '"metricsExpireTime"', 'true', 'Long.MAX_VALUE', '1', + 'Time in milliseconds after which a certain metric value is considered expired') + .pc-form-grid-col-30 + +number('History size:', `${model}.metricsHistorySize`, '"metricsHistorySize"', 'true', '10000', '1', + 'Number of metrics kept in history to compute totals and averages') + .pc-form-grid-col-30 + +number('Log frequency:', `${model}.metricsLogFrequency`, '"metricsLogFrequency"', 'true', '60000', '0', + 'Frequency of metrics log print out<br/>\ ' + + 'When <b>0</b> log print of metrics is disabled') + .pc-form-grid-col-30 + +number('Update frequency:', `${model}.metricsUpdateFrequency`, '"metricsUpdateFrequency"', 'true', '2000', '-1', + 'Job metrics update frequency in milliseconds\ + <ul>\ + <li>If set to -1 job metrics are never updated</li>\ + <li>If set to 0 job metrics are updated on each job start and finish</li>\ + <li>Positive value defines the actual update frequency</li>\ + </ul>') + .pca-form-column-6 + +preview-xml-java(model, 'clusterMetrics') http://git-wip-us.apache.org/repos/asf/ignite/blob/c2c03a92/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/misc.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/misc.pug b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/misc.pug new file mode 100644 index 0000000..cdc7258 --- /dev/null +++ b/modules/web-console/frontend/app/components/page-configure-advanced/components/cluster-edit-form/templates/misc.pug @@ -0,0 +1,58 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +include /app/helpers/jade/mixins + +-var form = 'misc' +-var model = '$ctrl.clonedCluster' + +panel-collapsible(ng-form=form on-open=`ui.loadPanel('${form}')`) + panel-title Miscellaneous + panel-description Various miscellaneous cluster settings. + panel-content.pca-form-row(ng-if=`ui.isPanelLoaded('${form}')`) + .pca-form-column-6.pc-form-grid-row + .pc-form-grid-col-60 + +text('Work directory:', model + '.workDirectory', '"workDirectory"', 'false', 'Input work directory', + 'Ignite work directory.<br/>\ + If not provided, the method will use work directory under IGNITE_HOME specified by IgniteConfiguration#setIgniteHome(String)\ + or IGNITE_HOME environment variable or system property.') + + //- Since ignite 2.0 + .pc-form-grid-col-60(ng-if-start='$ctrl.available("2.0.0")') + +text('Consistent ID:', model + '.consistentId', '"ConsistentId"', 'false', 'Input consistent ID', 'Consistent globally unique node ID which survives node restarts') + .pc-form-grid-col-60 + +java-class('Warmup closure:', model + '.warmupClosure', '"warmupClosure"', 'true', 'false', 'This closure will be executed before actual grid instance start') + .pc-form-grid-col-60 + +checkbox('Active on start', model + '.activeOnStart', '"activeOnStart"', + 'If cluster is not active on start, there will be no cache partition map exchanges performed until the cluster is activated') + .pc-form-grid-col-60(ng-if-end) + +checkbox('Cache sanity check enabled', model + '.cacheSanityCheckEnabled', '"cacheSanityCheckEnabled"', + 'If enabled, then Ignite will perform the following checks and throw an exception if check fails<br/>\ + <ul>\ + <li>Cache entry is not externally locked with lock or lockAsync methods when entry is enlisted to transaction</li>\ + <li>Each entry in affinity group - lock transaction has the same affinity key as was specified on affinity transaction start</li>\ + <li>Each entry in partition group - lock transaction belongs to the same partition as was specified on partition transaction start</li>\ + </ul>') + + .pc-form-grid-col-60(ng-if='$ctrl.available(["1.0.0", "2.1.0"])') + +checkbox('Late affinity assignment', model + '.lateAffinityAssignment', '"lateAffinityAssignment"', + 'With late affinity assignment mode if primary node was changed for some partition this nodes becomes primary only when rebalancing for all assigned primary partitions is finished') + + .pc-form-grid-col-60(ng-if='$ctrl.available("2.1.0")') + +number('Long query timeout:', `${model}.longQueryWarningTimeout`, '"LongQueryWarningTimeout"', 'true', '3000', '0', + 'Timeout in milliseconds after which long query warning will be printed') + .pca-form-column-6 + +preview-xml-java(model, 'clusterMisc', 'caches')