This is a series of gists documenting testing done with the numeric.mapping option in Kafka Connect.
- Oracle
- MS SQL Server
- Postgres
- MySQL - n/a because of #563
—@rmoff January 9, 2019
This is a series of gists documenting testing done with the numeric.mapping option in Kafka Connect.
—@rmoff January 9, 2019
| events | |
| .groupByKey() | |
| .windowedBy(TimeWindows.of(Duration.ofMinutes(2))) | |
| .count(Materialized.as("count-metric")) | |
| // graph servlet queries "count-metric" |
| events | |
| .groupByKey() | |
| .windowedBy(TimeWindows.of(Duration.ofMinutes(2))) | |
| .count(Materialized.as("count-metric")) | |
| .filter( _ < 4 ) | |
| .toStream() | |
| .foreach( /* Send that email! */) | |
| // graph servlet queries "count-metric" |
| events | |
| .groupByKey() | |
| .windowedBy( | |
| TimeWindows.of(Duration.ofMinutes(2).withGrace(Duration.ofMinutes(2)) | |
| ) | |
| .count(Materialized.as("count-metric")) | |
| .suppress(Suppressed.untilWindowClose(BufferConfig.unbounded())) | |
| .filter( _ < 4 ) | |
| .toStream() | |
| .foreach( /* Send that email! */) |
| driver.pipeInput(recordFactory.create( | |
| /* topic */ "input", | |
| /* key */ "A", | |
| /* value */ "v1", | |
| /* timestamp */ 10L | |
| )); | |
| // Stream time is now 10L | |
| driver.pipeInput(recordFactory.create("input", "A", "v2", 11L)); | |
| // Stream time is now 11L |
| builder | |
| .table("users") | |
| .suppress(Suppressed.untilTimeLimit( | |
| BufferConfig.maxBytes(myConfig.getUsersBufferSize()) | |
| )) | |
| ... |
| /* | |
| * 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 | |
| * |
| /* | |
| * 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 | |
| * |
| /* | |
| * 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 | |
| * |
| /* | |
| * 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 | |
| * |