cwielenb/CNCF-Dataset huggingface dataset:
Project: Apache Storm (App Definition and Development / Streaming & Messaging)
File: NUMA.md

title: NUMA Support layout: documentation documentation: true 1. 3. <div id='Introduction'/> Non Uniform Memory Access () is a new system architecture where the hosts resources are grouped by cores and memory in NUMA zones. Storm supports isolating/pinning worker processes to specific NUMA zones via the supervisor to take advantage of this resource isolation and avoid the penalty of using cross zone bus transfers <div id='Architecture'/> Once Storm supervisors are configured for NUMA (see the section below) they now heartbeat multiple heartbeats - one for each NUMA zone. Each of these NUMA supervisors has a supervisor id with the same prefixed supervisor id with the NUMA id differentiating them. Nimbus, and by extension the scheduler, see these heartbeats and views the supervisor as multiple supervisors - one per configured NUMA zone. Nimbus schedules topologies and assignments accordingly. The supervisor reads all assignments with the prefixed assignments and then pins each worker to the NUMA zone according to the numa id in the assignment. The pinning depends on the Resource Isolation Interface used and is elaborated on in the following section. <div id='RII-Interaction'/> Each implementation of the Resource Isolation Interface (RII) should now implement NUMA pinning. The following are the current/soon to be available implementations The CgroupManager prefixes the worker launch command with the numactl command for Linux hosts- ``` numactl --cpunodebind=<numaId>> --membind=<numaId> <worker launch command> ``` The worker is then bound to the NUMA zone's CPU cores and memory zone. Will be updated upon adding Docker support Will be updated upon adding Runc support <div id='Configuring NUMA'/> In the Supervisor Config the following settings need to be set ``` supervisor.numa.meta: "0": # Numa zone id numa.cores: # Cores in NUMA zone (can be determined by using the numastat command) 0 1 2 3 4 5 12 13 14 15 16 numa.generic.resources.map: # Generic Resources in the zone to be used for generic resource scheduling (optional) network.resource.units: 50.0 numa.memory.mb: 42461 # Size of memory zone numa.ports: # Ports to be assigned to workers pinned to the NUMA zone (this may include ports not specified in SUPERVISORSLOTSPORTS 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 ```
Project: StarRocks (App Definition and Development / Database)
File: ltrim.md

displayed_sidebar: "English" Removes the leading spaces or specified characters from the beginning (left) of the `str` argument. Removing specified characters are supported from StarRocks 2.5.0. ```Haskell VARCHAR ltrim(VARCHAR str[, VARCHAR characters]) ``` `str`: required, the string to trim, which must evaluate to a VARCHAR value. `characters`: optional, the characters to remove, which must be a VARCHAR value. If this parameter is not specified, spaces are removed from the string by default. If this parameter is set to an empty string, an error is returned. Returns a VARCHAR value. Example 1: Remove spaces from the beginning of the string. ```Plain Text MySQL > SELECT ltrim(' ab d'); ++ | ltrim(' ab d') | ++ | ab d | ++ ``` Example 2: Remove specified characters from the beginning of the string. ```Plain Text MySQL > SELECT ltrim("xxabcdxx", "x"); ++ | ltrim('xxabcdxx', 'x') | ++ | abcdxx | ++ ``` LTRIM
Project: Apache Spark (App Definition and Development / Streaming & Messaging)
File: sql-error-conditions-invalid-conf-value-error-class.md

layout: global title: INVALIDCONFVALUE error class displayTitle: INVALIDCONFVALUE error class license: | 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. <!-- DO NOT EDIT THIS FILE. It was generated automatically by `org.apache.spark.SparkThrowableSuite`. --> The value '`<confValue>`' in the config "`<confName>`" is invalid. This error class has the following derived error classes: Cannot resolve the given default collation. Did you mean '`<proposal>`'? Cannot resolve the given timezone.
Project: YDB (App Definition and Development / Database)
File: session-pool-limit.md

title: "Instructions for setting the session pool size in {{ ydb-short-name }}" description: "The article will tell you how to set the session pool size in different {{ ydb-short-name }} SDKs." {% include %} The client's session pool size affects resource consumption (RAM, CPU) on the server side of {{ ydb-short-name }}. Simple math: if `1000` clients of the same DB have `1000` sessions each, `1000000` actors (workers, session performers) are created on the server side. If you don't limit the number of sessions on the client, this may result in a slow cluster that is close to a failure. By default, the {{ ydb-short-name }} SDK has a limit of `50` sessions when using native drivers. There is no limit for third-party libraries, such as Go database/sql. A good recommendation is to set the limit on the number of client sessions to the minimum required for the normal operation of the client app. Keep in mind that sessions are single-threaded both on the server and client side. So if the application needs to make `1000` simultaneous (`inflight`) requests to {{ ydb-short-name }} for its estimated load, the limit should be set to `1000` sessions. Here it's necessary to distinguish between the estimated `RPS` (requests per second) and `inflight`. In the first case, this is the total number of requests to {{ ydb-short-name }} completed within `1` second. For example, if `RPS`=`10000` and the average `latency` is `100`ms, it's sufficient to set the session limit to `1000`. This means that each session will perform an average of `10` consecutive requests for the estimated second. Below are examples of the code for setting the session pool limit in different {{ ydb-short-name }} SDKs. {% list tabs %} Go (native) ```golang package main import ( "context" "github.com/ydb-platform/ydb-go-sdk/v3" ) func main() { db, err := ydb.Open(ctx, os.Getenv("YDBCONNECTIONSTRING"), ydb.WithSessionPoolSizeLimit(500), ) if err != nil { panic(err) } defer db.Close(ctx) ... } ``` Go (database/sql) The `database/sql` library has its own connection pool. Each `database/sql`connection corresponds to a specific {{ ydb-short-name }} session. A `database/sql` connection pool is managed by the `sql.DB.SetMaxOpenConns` and `sql.DB.SetMaxIdleConns` functions. Learn more in the `database/sql` . Example of the code that uses the size of `database/sql` connection pool: ```golang package main import ( "context" "database/sql" _ "github.com/ydb-platform/ydb-go-sdk/v3" ) func main() { db, err := sql.Open("ydb", os.Getenv("YDBCONNECTIONSTRING")) if err != nil { panic(err) } defer db.Close() db.SetMaxOpenConns(100) db.SetMaxIdleConns(100) db.SetConnMaxIdleTime(time.Second) // workaround for background keep-aliving of YDB sessions ... } ``` Java ```java this.tableClient = TableClient.newClient(transport) // 10 - minimum number of active sessions to keep in the pool during the cleanup // 500 - maximum number of sessions in the pool .sessionPoolSize(10, 500) .build(); ``` {% endlist %}
Project: Chef Infra (Provisioning / Automation & Configuration)
File: event_handler_recipe_dsl.md

Allow cookbook authors to easily add custom logic on Chef events. Chef has an extensive . But incorporating some custom logic against any of the events is an onerous process, which involves subclassing the based event handler and adding it via the config. This RFC proposes a recipe DSL method to ease this. For new Chef users, this will reduce the entry barrier. Currently, `chef-client` sets up couple of default handlers -- e.g. doc, base -- during initialization. An additional empty event handler -- a subclass of the base handler without any custom logic -- can be added alongside the existing handlers, which will used as a placeholder for user-specific hooks. A top level (::Chef) method will be introduced (`event_handler`) to wrap the main event handler DSL (`on`). Users can tap into one of the event types -- as specified in base dispatcher -- using this DSL to execute their custom logic. The additional top level method(`Chef.event_handler`) will allow the handler DSL usage in and outside of recipes, and also ease writing backward-compatible changes for the `on` method if need be. The following is an example of sending hipchat notification on chef run failure. ```ruby Chef.event_handler do on :run_failed do |exception| hipchat_notify exception.message end end ``` The following is another example of taking a distributed lock via `etcd`, to prevent concurrent chef runs in different nodes. ```ruby lockkey = "#{node.chefenvironment}/#{node.name}" Chef.event_handler do on :convergestart do |runcontext| Etcd.lockacquire(lockkey) end end Chef.event_handler do on :converge_complete do Etcd.lockrelease(lockkey) end end ``` The following is another example of sending a hipchat alert on a key config change. ```ruby Chef.event_handler do on :resource_updated do |resource, action| if resource.to_s == 'template[/etc/nginx/nginx.conf]' Helper.hipchat_message("#{resource} was updated by chef") end end end ```
Project: KICS (Provisioning / Security & Compliance)
File: 5527dcfc-94f9-4bf6-b7d4-1b78850cf41f.md

title: ElastiCache Without VPC hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 5527dcfc-94f9-4bf6-b7d4-1b78850cf41f Query name: ElastiCache Without VPC Platform: Ansible Severity: <span style="color:#edd57e">Low</span> Category: Networking and Firewall URL: ElastiCache should be launched in a Virtual Private Cloud (VPC)<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="2" name: Basic example community.aws.elasticache: name: "test-please-delete" state: present engine: memcached cacheengineversion: 1.4.14 node_type: cache.m1.small num_nodes: 1 cache_port: 11211 cachesecuritygroups: default zone: us-east-1d ``` ```yaml title="Negative test num. 1 - yaml file" name: Basic example2 community.aws.elasticache: name: "test-please-delete" state: present engine: memcached cacheengineversion: 1.4.14 node_type: cache.m1.small num_nodes: 1 cache_port: 11211 cachesubnetgroup: default zone: us-east-1d ```
Project: YugabyteDB (App Definition and Development / Database)
File: type_bool.md

title: BOOLEAN data types headerTitle: BOOLEAN data types linkTitle: Boolean description: Use the BOOLEAN data type to represent three different states - TRUE, FALSE, or NULL. menu: v2.18: identifier: api-ysql-datatypes-bool parent: api-ysql-datatypes type: docs The `BOOLEAN` data type represents three different states: `TRUE`, `FALSE`, or `NULL`. ```ebnf type_specification ::= { BOOLEAN | BOOL } literal ::= { TRUE | true | 't' | 'y' | 'yes' | 'on' | 1 | FALSE | false | 'f' | 'n' | 'no' | 'off' | 0 } ```
Project: KICS (Provisioning / Security & Compliance)
File: d8c57c4e-bf6f-4e32-a2bf-8643532de77b.md

title: High Google KMS Crypto Key Rotation Period hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: d8c57c4e-bf6f-4e32-a2bf-8643532de77b Query name: High Google KMS Crypto Key Rotation Period Platform: Terraform Severity: <span style="color:#ff7213">Medium</span> Category: Secret Management URL: KMS encryption keys should be rotated every 90 days or less. A short lifetime of encryption keys reduces the potential blast radius in case of compromise.<br> ```tf title="Positive test num. 1 - tf file" hl_lines="10 4" resource "googlekmscrypto_key" "positive1" { name = "crypto-key-example" keyring = googlekmskeyring.keyring.id rotation_period = "77760009s" lifecycle { prevent_destroy = true } } resource "googlekmscrypto_key" "positive2" { name = "crypto-key-example" keyring = googlekmskeyring.keyring.id lifecycle { prevent_destroy = true } } ``` ```tf title="Negative test num. 1 - tf file" resource "googlekmscrypto_key" "negative1" { name = "crypto-key-example" keyring = googlekmskeyring.keyring.id rotation_period = "100000s" lifecycle { prevent_destroy = true } } ```
Project: RabbitMQ (App Definition and Development / Streaming & Messaging)
File: 3.6.13.md

RabbitMQ `3.6.13` is a maintenance release. See the for general documentation on upgrades. This release has no known incompatibilities with versions 3.6.7 through 3.6.12. See the upgrade and compatibility sections in the if upgrading from an earlier release. Please read this node on . Memory usage monitor uses subprocesses a lot more sparingly. They are started roughly once a second or not started at all, depending on the strategy (e.g. on Windows Erlang VM allocator information is used instead). GitHub issues: , Very busy queues are now more efficient at prioritizing consumers, avoiding consumer delivery blocking when relatively long running operations (e.g. bulk flushing of transient messages to disk) happen. GitHub issues: , queue leader strategies now take additional queue HA arguments into account. GitHub issue: Logging to standard output using `RABBITMQ_LOGS=-` wasn't possible on Windows. GitHub issue: queue leader locator name now can be specified as Erlang strings. GitHub issue: Direct Erlang client connections could fail with obscure messages when target node was still booting. GitHub issue: `supervisor2` now can be used in environments that perform hot code upgrades. GitHub issue: systemd service file now white lists exit code 69. GitHub issue: Example systemd service file now includes service restart settings. GitHub issue: queue leader locator strategy now can be configured using strings. GitHub issue: Plugin activation avoids logs things that can be confusing. GitHub issue: Minor efficiency improvements around stats collection. GitHub issues: jQuery upgraded to 1.12.4. GitHub issue: UI improvements. More detailed memory use breakdown on the node page. GitHub issue: It is now possible to configure an HTTP API path prefix for the plugin. GitHub issue: Queue details page no longer truncates node name. GitHub issue: Policy name in queue and exchange info is now a link. GitHub issue: `DELETE /api/connections/{name}` is now more defensive. GitHub issue: To upgrade a non-clustered RabbitMQ simply install the new version. All configuration and persistent message data are retained. When upgrading using definitions export/import from versions earlier than 3.6.0, see http://rabbitmq.com/passwords.html. To upgrade a RabbitMQ cluster, follow the instructions . Warning: The source code archive provided by GitHub only contains the source of the broker, not the plugins or the client libraries. Please download the archive named `rabbitmq-3.6.13.tar.gz`.
Project: Chef InSpec (Provisioning / Security & Compliance)
File: sybase_session.md

+++ title = "sybase_session resource" draft = false gh_repo = "inspec" platform = "os" [menu] [menu.inspec] title = "sybase_session" identifier = "inspec/resources/os/sybasesession.md sybasesession resource" parent = "inspec/resources/os" +++ Use the `sybase_session` Chef InSpec audit resource to test the SQL commands run against an SAP Adaptive Server Enterprise (ASE) database. {{< readfile file="content/inspec/reusable/md/inspec_installation.md" >}} The `isql` command line tool must be installed on the target system. A `sybase_session` resource block declares the server, database, username and password to use for the session, and then the command to be run: describe sybase_session(database: 'pubs2', server: 'SYBASE', username: 'USERNAME', password: 'PASSWORD').query('QUERY').row(0).column('RESULT') do its('value') { should eq('EXPECTED') } end where `sybase_session` declares a server, database, username, and password with permission to run the query. `query('QUERY')` contains the query to be run. `its('value') { should eq('expected') }` compares the results of the query against the expected result in the test. You may use the `bin` parameter to specify the path to the `isql` cli tool. ```ruby describe sybase_session(database: 'pubs2', server: 'SYBASE', username: 'USERNAME', password: 'PASSWORD', bin: '/opt/sap/OCS-16_0/bin/isql', ).query('QUERY').row(0).column('RESULT') do its('value') { should eq('EXPECTED') } end ``` You may use the `sybase_home` parameter to specify the path to the sybase installation. ```ruby describe sybase_session(database: 'pubs2', server: 'SYBASE', username: 'USERNAME', password: 'PASSWORD', sybase_home: '/opt/sap', ).query('QUERY').row(0).column('RESULT') do its('value') { should eq('EXPECTED') } end ``` The following examples show how to use this Chef InSpec audit resource. ```ruby sql = sybasesession(database: 'pubs2', server: 'SYBASE', username: 'MYUSER', password: 'PASSWORD') describe sql.query("SELECT aulname FROM authors").row(0).column('AULNAME') do its("value") { should eq 'BENNET' } end ``` {{< readfile file="content/inspec/reusable/md/inspecmatcherslink.md" >}}
Project: Couler (Provisioning / Automation & Configuration)
File: TEMPLATE.md

Note to proposers: Please keep this document as brief as possible, preferably not more than two pages. A high level description of the problem or opportunity being addressed. Specific new functionalities or other changes. Issues or changes not being addressed by this proposal. Description of new software design and any major changes to existing software. Should include figures or diagrams where appropriate. Backward compatibility must be considered. Description of possible alternative solutions and the reasons they were not chosen.
Project: StarRocks (App Definition and Development / Database)
File: bit_shift_left.md

displayed_sidebar: "English" Shifts the binary representation of a numeric expression to the left by a specified number of bits. This function performs an arithmetic left shift, during which the bit length does not change, 0 is appended to the end, and the high bit remains unchanged. For example, shifting `10101` to the left by one bit results in `11010`. ```Haskell bitshiftleft(value, shift) ``` `value`: the value or numeric expression to shift. Supported data types are TINYINT, SMALLINT, INT, BIGINT, and LARGEINT. `shift`: the number of bits to shift. The supported data type is BIGINT. Returns a value of the same type as `value`. If any input parameter is NULL, NULL is returned. If `shift` is less than 0, 0 is returned. Shifting a `value` by `0` always results in the original `value`. Shifting `0` by a `shift` always results in `0`. If the data type of `value` is numeric but not an integer, that value will be cast to an integer. See . If the data type of `value` is a string, the value will be cast to an integer if possible. If the value cannot be cast to an integer, it will be processed as NULL. See . Use this function to shift numeric values. ```Plain SELECT bitshiftleft(2, 1); +-+ | bitshiftleft(2, 1) | +-+ | 4 | +-+ SELECT bitshiftleft(2.2, 1); ++ | bitshiftleft(2.2, 1) | ++ | 4 | ++ SELECT bitshiftleft("2", 1); ++ | bitshiftleft('2', 1) | ++ | 4 | ++ SELECT bitshiftleft(-2, 1); +--+ | bitshiftleft(-2, 1) | +--+ | -4 | +--+ ```
Project: StarRocks (App Definition and Development / Database)
File: SHOW_USERS.md

displayed_sidebar: "English" import UserManagementPriv from '../../../assets/commonMarkdown/userManagementPriv.md' Displays all users in the system. Users mentioned here are user identities, not user names. For more information about user identities, see . This command is supported from v3.0. You can use `SHOW GRANTS FOR <user_identity>;` to view the privileges of a specific user. For more information, see . <UserManagementPriv /> ```SQL SHOW USERS ``` Return fields: | Field | Description | | | | | User | The user identity. | Display all users in the system. ```SQL mysql> SHOW USERS; +--+ | User | +--+ | 'wybing5'@'%' | | 'root'@'%' | | 'admin'@'%' | | 'star'@'%' | | 'wybing_30'@'%' | | 'simo'@'%' | | 'wybing1'@'%' | | 'wybing2'@'%' | +--+ ``` , ,
Project: SuperEdge (Provisioning / Automation & Configuration)
File: lite-apiserver.md

`lite-apiserver` is a light-weight version of the kube-apiserver running on the edge nodes. It acts as a proxy for requests from all components and pods on the edge node to the cloud apiserver, and caches the responses to achieve edge autonomy in case of the disconnected cloud -edge network. `lite-apiserver` has the following functionalities: Caches request for all edge components (kubelet, kube-proxy, etc.) and pods running on edge nodes Provides various authentication mechanism for edge components and pods, including X509 Client Certs, Bearer Token, etc. Support X509 Client Certs rotation Caches all kind of Kubernetes resources, including build-in Kubernetes resources and custom resources Support multiple cache storage, including file, kv storage(bolt, badger) <div align="left"> <img src="../img/lite-apiserver.png" width=70% title="lite-apiserver Architecture"> </div> Overall, `lite-apiserver` start a HTTPS Server to accepting the request of all Client (HTTPS request). According to the `Common Name` of TLS certificate, use corresponding ReverseProxy to forwarding the request to kube-apiserver (if not mtls certificate request, using default). When the cloud-edge network is normal, the corresponding https response is returned to the client, and it is asynchronously stored in the cache on demand; when the cloud-edge is disconnected, the request to kube-apiserver times out, `lite-apiserver` query cache and return the cache data to client, to achieve the purpose of edge autonomy. `lite-apiserver` can be run at the edge as Kubernetes pod or systemd service. See to get more detail. Installing `lite-apiserver` applying the following yaml to running echoserver ```yaml apiVersion: apps/v1 kind: Deployment metadata: name: lite-demo namespace: default spec: replicas: 1 selector: matchLabels: app: echo template: metadata: labels: app: echo spec: containers: image: superedge/echoserver:2.2 name: echo ports: containerPort: 8080 protocol: TCP env: name: NODE_NAME valueFrom: fieldRef: fieldPath: spec.nodeName name: POD_NAME valueFrom: fieldRef: fieldPath: metadata.name name: POD_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace name: POD_IP valueFrom: fieldRef: fieldPath: status.podIP ``` Accessing the echoserverthe result is successful ```bash $ kubectl get pods -owide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES lite-demo-c7b458ddc-6lpnx 1/1 Running 0 4m23s 10.0.6.2 ecm-q5hx6hhd <none> <none> $ curl http://10.0.6.2:8080 | grep pod pod name: lite-demo-c7b458ddc-6lpnx pod namespace: default pod IP: 10.0.6.2 ``` Disconnecting the network between the node which echoserver running on and kube-apiserver, the node is autonomous. Accessing the echoserverthe result is successful ```bash $ curl http://10.0.6.2:8080 | grep pod pod name: lite-demo-c7b458ddc-6lpnx pod namespace: default pod IP: 10.0.6.2 ``` Rebooting the node, and then accessing echoserver, the result is successful. ```bash $ curl http://10.0.6.2:8080 | grep pod pod name: lite-demo-c7b458ddc-6lpnx pod namespace: default pod IP: 10.0.6.2 ```
Project: StarRocks (App Definition and Development / Database)
File: bitand.md

displayed_sidebar: "English" Returns the bitwise AND of two numeric expressions. ```Haskell BITAND(x,y); ``` `x`: This expression must evaluate to any of the following data types: TINYINT, SMALLINT, INT, BIGINT, LARGEINT. `y`: This expression must evaluate to any of the following data types: TINYINT, SMALLINT, INT, BIGINT, LARGEINT. `x` and `y` must agree in data type. The return value has the same type as `x`. If any value is NULL, the result is NULL. ```Plain Text mysql> select bitand(3,0); +--+ | bitand(3, 0) | +--+ | 0 | +--+ 1 row in set (0.01 sec) ```