-
Create a custom reassignment plan (see attached file
inc-replication-factor.json
). In this case we are going from replication factor of 1 to 3. -
Run Kafka partition reassignment script:
kafka-reassign-partitions --zookeeper $ZOOKEEPER_CONNECT \ --reassignment-json-file /home/liquidnt/inc-replication-factor.json \ --execute
-
Verify if the assignment was successful
go mod edit -module {NEW_MODULE_NAME} | |
-- rename all imported module | |
find . -type f -name '*.go' \ | |
-exec sed -i -e 's,{OLD_MODULE},{NEW_MODULE},g' {} \; |
If you hate git submodule
, then you may want to give git subtree
a try.
When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another repository url and branch/tag. This add
command adds all the code and files into the main repository locally; it's not just a reference to a remote repo.
When you stage and commit files for the main repo, it will add all of the remote files in the same operation. The subtree checkout will pull all the files in one pass, so there is no need to try and connect to another repo to get the portion of subtree files, because they were already included in the main repo.
Let's say you already have a git repository with at least one commit. You can add another repository into this respository like this:
package main | |
import ( | |
"fmt" | |
"gopkg.in/olivere/elastic.v2" | |
"strconv" | |
) | |
type Tweet struct { | |
User string `json:"user"` |
<?php | |
// I made this array by joining all the following lists + .php extension which is missing in all of them. | |
// please contribute to this list to make it as accurate and complete as possible. | |
// https://gist.github.com/plasticbrain/3887245 | |
// http://pastie.org/5668002 | |
// http://pastebin.com/iuTy6K6d | |
// total: 1223 extensions as of 16 November 2015 | |
$mime_types = array( | |
'3dm' => array('x-world/x-3dmf'), | |
'3dmf' => array('x-world/x-3dmf'), |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
func boring(msg string) <-chan Message { | |
c := make(chan Message) |
// keepDoingSomething will keep trying to doSomething() until either | |
// we get a result from doSomething() or the timeout expires | |
func keepDoingSomething() (bool, error) { | |
timeout := time.After(5 * time.Second) | |
tick := time.Tick(500 * time.Millisecond) | |
// Keep trying until we're timed out or got a result or got an error | |
for { | |
select { | |
// Got a timeout! fail with a timeout error | |
case <-timeout: |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// Original idea: | |
// http://commandcenter.blogspot.nl/2014/01/self-referential-functions-and-design.html | |
package main | |
import "fmt" | |
type Cat struct { | |
Name string | |
} |