锘??xml version="1.0" encoding="utf-8" standalone="yes"?>C++鍗氬-++wythern++http://www.9087120.com/wythern/X presents Y for a better Zzh-cnTue, 26 Mar 2019 14:29:55 GMTTue, 26 Mar 2019 14:29:55 GMT60How to shuffle arrays and slices in Gohttp://www.9087120.com/wythern/archive/2019/01/17/216208.htmlwythernwythernThu, 17 Jan 2019 12:27:00 GMThttp://www.9087120.com/wythern/archive/2019/01/17/216208.htmlhttp://www.9087120.com/wythern/comments/216208.htmlhttp://www.9087120.com/wythern/archive/2019/01/17/216208.html#Feedback0http://www.9087120.com/wythern/comments/commentRss/216208.htmlhttp://www.9087120.com/wythern/services/trackbacks/216208.html鍦此

鐢变簬Go娌湁涓簊lice鎻愪緵shuffle鍑芥暟锛屾墍浠渶瑕佽嚜宸辨兂鍔炴硶銆?#37922;变簬?#22428;鍙渶瑕侀殢鏈?#28051;娆亶鍘? -> N锛屾墍浠繖娈礳ode?#28214;鍖归厤銆?br />
func main() {
  vals := []int{10, 12, 14, 16, 18, 20}
  r := rand.New(rand.NewSource(time.Now().Unix()))
  for _, i := range r.Perm(len(vals)) {
    val := vals[i]
    fmt.Println(val)
  }
}

浼间箮go涓嶅儚scala?#28225;?#20549;绉嶆儼鎬眰鍊肩殑鐗?#37804;?#38171;屾墍浠繖閲岀殑r.Perm()杩樻槸浜?#37922;?#27996;?#28051;涓猻lice锛屽鏋淣寰堝鍙?#38003;芥槸涓?#38338;?#26864;?#37510;?br />




wythern 2019-01-17 20:27 鍙戣璇勮
]]>
go test 鐢args甯?#37721;傛暟http://www.9087120.com/wythern/archive/2018/08/14/215845.htmlwythernwythernTue, 14 Aug 2018 09:04:00 GMThttp://www.9087120.com/wythern/archive/2018/08/14/215845.htmlhttp://www.9087120.com/wythern/comments/215845.htmlhttp://www.9087120.com/wythern/archive/2018/08/14/215845.html#Feedback0http://www.9087120.com/wythern/comments/commentRss/215845.htmlhttp://www.9087120.com/wythern/services/trackbacks/215845.html娴?#29831;?#28051;兂閫?#26473;?#37723;?#28000;?#29723;?#28028;?#38315;?#28051;浜?#37721;傛暟?#31920;test func锛岀綉涓?#37813;?#27996;?#28051;浜涜祫鏂欎絾杩囩涓嶆槸寰堥鍒?#38171;岃繖閲?#29825;板綍涓涓?#37510;?/div>
棣栧厛go test?#28225;涓涓?args?#27537;鍙傛暟璇?#37721;?#28000;?#26440;?#37714;拌繖涓?#37929;殑锛屼絾瀹炴祴涓嬫潵鍙戠幇?#28225;娌湁娌?#37718;?#37714;?#37510;?#37510;?#37510;?/div>
google鏌?#37714;扮殑澶?#38318;?#37714;嗕?#29112;槸鐢?#37714;?#27996;唂lag绫诲瀷銆?/div>
flag.go?#27537;?#25950;閲婂啓?#27537;?#30254;杈冩竻妤?/div>
/*
    Package flag implements command-line flag parsing.

    Usage:

    Define flags using flag.String(), Bool(), Int(), etc.

    This declares an integer flag, -flagname, stored in the pointer ip, with type *int.
        import "flag"
        var ip = flag.Int("flagname", 1234, "help message for flagname")
    If you like, you can bind the flag to a variable using the Var() functions.
        var flagvar int
        func init() {
            flag.IntVar(&flagvar, "flagname", 1234, "help message for flagname")
        }
    Or you can create custom flags that satisfy the Value interface (with
    pointer receivers) and couple them to flag parsing by
        flag.Var(&flagVal, "name", "help message for flagname")
    For such flags, the default value is just the initial value of the variable.

    After all flags are defined, call
        flag.Parse()
    to parse the command line into the defined flags.

*/
鍥犳?#28214;瑕佸仛?#27537;浜嬫?#21613;?#36776;槸锛?/div>
1. 瀹?#28052;flag锛岃繖涓渶瑕?#37734;main()鎵?#29723;屼?#23338;?#23941;?#23678;垚锛屾垜?#32342;閲?#37734;test?#26499;浠?#38322;岄潰鐢叏灞鍙?#38322;?#28729;屾垚锛屼絾a鍙?#28000;?#37824;?#37734;?#37713;芥暟閲岄潰銆?/div>
var (
    
// Define global args flags.
    pA = flag.Int("a"0,  "a.")
    a 
= 0
)
2. parse flag锛岃繖涓?#29781;?#37734;test func鎵?#29723;屼?#23338;墠锛屾墍浠?#37721;?#28000;?#38000;冭檻鍔犲叆涓涓猧nit()鍦test?#26499;浠?#38322;?#37510;?/div>
func init() {
    flag.Parse()
    a 
= *pA
}
鍚庨潰浣?#37922;繖浜?#37721;?#38322;忓氨娌湁闂?#26864;?#27996;?#38171;屾瘮濡傝繖鏍?/div>
func TestInit(t *testing.T) {
    flag.Parse()
    t.Log(
"a = ", a)
}
?#32342;閲?#37922;?#37714;扮殑涓?#29781;佹槸flag?#27537;鍔兘锛屾祴璇?#37922;?#37721;戠幇?#28225;娌湁-args闂?#26864;?#28051;嶅锛屾墍浠繖涓?#37922;硶鍙兘涓嶆槸寰?#32471;?#37722;go test?#27537;瑕佹眰锛屽厛鐢?#29863;锋潵鍐?#29831;?#27996;?#37510;?/div>
REF
1. https://www.golangtc.com/t/584cbd16b09ecc2e1800000b
2. https://stackoverflow.com/.../process-command-line-arguments-in-go-test
3. https://hsulei.com/2017/08/23/gotest濡備綍浣?#37922;嚜瀹?#28052;?#37721;傛暟/



wythern 2018-08-14 17:04 鍙戣璇勮
]]>[杞琞shell涓璱f鏉?#28000;?#28699;?#32471;?#28051;?#37510;佹暟瀛楁瘮瀵?#38171;孾[ ]]鍜孾 ]鍖?#37714;?/title><link>http://www.9087120.com/wythern/archive/2018/08/14/215844.html</link><dc:creator>wythern</dc:creator><author>wythern</author><pubDate>Tue, 14 Aug 2018 08:44:00 GMT</pubDate><guid>http://www.9087120.com/wythern/archive/2018/08/14/215844.html</guid><wfw:comment>http://www.9087120.com/wythern/comments/215844.html</wfw:comment><comments>http://www.9087120.com/wythern/archive/2018/08/14/215844.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.9087120.com/wythern/comments/commentRss/215844.html</wfw:commentRss><trackback:ping>http://www.9087120.com/wythern/services/trackbacks/215844.html</trackback:ping><description><![CDATA[<p style="margin: 10px auto; line-height: 1.5; text-indent: 0px; caret-color: #000000; color: #000000; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 14.399999618530273px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">鍘熸枃<a href="https://www.cnblogs.com/include/archive/2011/12/09/2307905.html">鍦此</a><br /></p><p style="margin: 10px auto; line-height: 1.5; text-indent: 0px; caret-color: #000000; color: #000000; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 14.399999618530273px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">瀛?#28052;shell?#27537;?#26882;鍊?#37804;绘槸琚玸hell閲岀殑鏉?#28000;?#37714;?#37826;?#37826;瑰紡鎼?#23536;?#28598;寸柤锛岀粡甯?#28051;?#37933;亾鏀?鐢[],[[]],(())杩樻槸test,let锛岃屽?#22557;?#25118;湁涔妸瀹?#28000;殑鍏?#32495;?#29825;?#29785;殑寰堟竻妤?搴?#29831;槸?#22428;鎮熸?#23480;?#37812;栨槸鐪?#28052;?#28598;?#28751;?锛?#28000;婂鎬荤粨涓涓?#38171;屽?#34425;?#27537;涓?#29783;?#28641;?#28729;?#28000;??#27537;浣?#37922;?#37826;规硶涓嶅璧?#26473;?#38171;?#38322;嶇偣璇?#29831;?#28729;?#28000;殑鍖?#37714;殑浣?#37922;椂搴?#29831;敞鎰忕殑鍦?#37826;?#37510;?br /><br />?#21403;璇[]鍜宼est锛?#28051;?#38000;呮槸涓鏍风殑锛?#37734;?#37723;?#28000;?#29723;?#38322;宼est expr鍜孾 expr ]?#27537;鏁?#37835;?#37929;?#37722;?#37510;倀est?#27537;涓?#28051;?#37737;?#37832;?#28003;?#37922;槸鍒?#37826;枃浠?#37510;?#37714;?#37826;?#28699;?#32471;?#28051;?#37510;?#37714;?#37826;?#37825;存暟銆?#37824;?#37816;?#28003;?#37922;?#28051;庢?#26669;潪灏?#29723;?#26440;惧紡杩炴帴璧锋潵銆?#29781;佹敞鎰忕殑?#28225;锛?br /><br />1.test涓?#37721;?#37922;殑?#30254;杈?#26473;愮畻绗?#37721;湁==鍜?=锛?#28051;?#38000;?#38318;芥槸鐢簬瀛?#32471;?#28051;叉瘮杈冪殑锛?#28051;?#37721;?#37922;簬鏁存暟?#30254;杈?#38171;屾暣?#26271;?#30254;杈?#37721;兘浣?#37922;?eq, -gt?#32342;绉嶅舰?#32033;銆?#37827;?#29825;烘槸瀛?#32471;?#28051;叉瘮杈?#26473;樻槸鏁存暟?#30254;杈冮兘鍗?#28051;?#28051;?#29781;?#28003;?#37922;?#28598;簬鍙?#28751;忎簬鍙?#37510;?#35120;?#37906;?#38171;屽鏋?#28003;?#28729;?#37734;兂鐢?#28052;熸槸鍙?#28000;殑锛屽?#36891;簬瀛?#32471;?#28051;叉瘮杈?#37721;?#28000;?#28003;?#37922;?#28751;栨嫭鍙风殑杞?#28052;夊舰?#32033;锛?濡?#37835;瘮杈?ab"鍜?bc"锛歔 ab \< bc ]锛岀粨鏋?#28051;?#37930;?#38171;屼篃灏辨槸杩?#37733;炵姸鎬?#28051;?.<br /><br />鐒?#37722;庢槸[[ ]]锛岃繖?#27128;鍐?#32515;?#37734;shell涓殑涓涓?#37723;?#28000;?#38171;屽灏辨瘮鍒?#37813;?#29831;寸殑test寮哄?#27537;澶?#27996;?#37510;?#37824;?#37816;佸瓧绗?#28051;殑模紡鍖归厤锛?#28003;?#37922;?~鎿?#28003;?#32471;椂鐢氳嚦鏀?#37816;shell?#27537;?#37714;?#29723;?#26440;??#32033;锛?#37510;傜畝鐩?#23534;哄?#27537;浠?#27996;?#37721;戞寚锛侀?#26440;戠?#21227;悎鍙?#28000;?#28051;?#28003;?#37922;test?#27537;-a,-o鑰屼娇鐢?amp;&,||?#32342;鏍锋洿浜?#37714;囩殑褰紡(閽堝c銆丣ava绋嬪簭鍛?銆?#35120;?鐒?#38171;屼篃涓?#37922;兂?#27537;澶?#28598;嶆潅锛屽熀鏈?#37721;?#29781;佽浣?br />1.瀛?#32471;?#28051;叉瘮杈冩椂鍙?#28000;妸鍙?#26440;圭殑浣?#28051;?#28051;涓模?#32033;锛堣繖?#27128;鍙?#26440;圭殑瀛?#32471;?#28051;?#28051;?#37716;?#37721;屽紩鍙风殑鎯呭喌涓?#37510;?#28641;?#37835;?#37721;?#26440;圭殑瀛?#32471;?#28051;?#37716;?#27996;?#37721;屽紩鍙?#38171;屽垯璁?#28051;烘槸涓涓枃鏈?#28699;?#32471;?#28051;?#37510;?#38171;?#38171;岃?#28051;?#28000;?#28000;呮槸涓涓?#28699;?#32471;?#28051;?#38171;屾瘮濡俒[ hello == hell? ]]锛岀粨鏋?#28051;?#37930;?#37510;?/p><p style="margin: 10px auto; line-height: 1.5; text-indent: 0px; caret-color: #000000; color: #000000; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 14.399999618530273px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">鍙?#28598;?#29781;佹敞鎰忕殑?#27128;锛屼娇鐢[]鍜孾[]]?#27537;?#26882;鍊?#28051;?#29781;佸悵鍟?#32460;?#37837;?#38171;屾涓椤?#28051;?#26440;归兘瑕佹湁绌?#37837;?#38171;孾[ 1 == 2 ]]?#27537;?#31912;鏋?#28051;?#8220;鍋?#8221;锛屼絾[[ 1==2 ]]?#27537;?#31912;鏋?#28051;?#8220;鐪?#8221;锛佸悗涓绉嶆樉鐒舵槸閿欑殑</p><p style="margin: 10px auto; line-height: 1.5; text-indent: 0px; caret-color: #000000; color: #000000; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 14.399999618530273px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><br />3.?#28214;鍚?#28751;辨槸let鍜?())锛?#28051;?#38000;?#28052;熸槸涓鏍风殑(鎴?#38000;?#29831;?#37737;?#37832;?#28051;婃槸涓鏍风殑锛?#37721;屾嫭鍙锋瘮let绋嶅?#21464;竴浜?銆?#28051;?#29781;佽繘琛岀畻鏈?#26473;愮畻(涓婇潰?#27537;涓?#28051;兘涓?#29723;?锛屼?#29112;瘮杈?#38315;?#37722;?#26473;?琛屾暣?#26271;?#30254;杈?#38171;?#37721;?#28000;?#37929;存帴浣?#37922;?#37908;熸倝?#27537;<,>绛夋瘮杈?#26473;愮畻绗?#37510;?#37721;?#28000;?#37929;存帴浣?#37922;?#37721;?#38322;?#37722;嶅?#20482;ar鑰?#28051;渶瑕?var?#32342;鏍风殑褰紡銆?#37824;?#37816;?#37714;?#37721;烽?#26047;?#27537;澶?#28051;?#29723;?#26440;惧紡</p><img src ="http://www.9087120.com/wythern/aggbug/215844.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.9087120.com/wythern/" target="_blank">wythern</a> 2018-08-14 16:44 <a href="http://www.9087120.com/wythern/archive/2018/08/14/215844.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣璇勮</a></div>]]></description></item><item><title>涓?#32054;鍥?#27996;?#29785;?#37711;?#38334;惧绉侀摼http://www.9087120.com/wythern/archive/2018/08/01/215813.htmlwythernwythernWed, 01 Aug 2018 06:05:00 GMThttp://www.9087120.com/wythern/archive/2018/08/01/215813.htmlhttp://www.9087120.com/wythern/comments/215813.htmlhttp://www.9087120.com/wythern/archive/2018/08/01/215813.html#Feedback0http://www.9087120.com/wythern/comments/commentRss/215813.htmlhttp://www.9087120.com/wythern/services/trackbacks/215813.html
鍥?#37911;潵?#31790;锛歨ttps://blog.slock.it/public-vs-private-chain-7b7ca45044f


wythern 2018-08-01 14:05 鍙戣璇勮
]]>Full go tool list (keep constructing)http://www.9087120.com/wythern/archive/2018/07/21/215794.htmlwythernwythernSat, 21 Jul 2018 06:09:00 GMThttp://www.9087120.com/wythern/archive/2018/07/21/215794.htmlhttp://www.9087120.com/wythern/comments/215794.htmlhttp://www.9087120.com/wythern/archive/2018/07/21/215794.html#Feedback0http://www.9087120.com/wythern/comments/commentRss/215794.htmlhttp://www.9087120.com/wythern/services/trackbacks/215794.html
go get github.com/golang/lint/golint
go get github.com/kisielk/errcheck
go get golang.org/x/tools/cmd/benchcmp
go get github.com/cespare/prettybench
go get github.com/ajstarks/svgo/benchviz
go get golang.org/x/tools/cmd/stringer
go get github.com/josharian/impl
go get golang.org/x/tools/cmd/goimports
go get sourcegraph.com/sqs/goreturns
go get code.google.com/p/rog-go/exp/cmd/godef
go get github.com/nsf/gocode
go get golang.org/x/tools/cmd/oracle
go get golang.org/x/tools/cmd/gorename
go get github.com/kisielk/godepgraph


wythern 2018-07-21 14:09 鍙戣璇勮
]]>
Some materials about RPC transaction call.http://www.9087120.com/wythern/archive/2018/07/14/215784.htmlwythernwythernSat, 14 Jul 2018 09:00:00 GMThttp://www.9087120.com/wythern/archive/2018/07/14/215784.htmlhttp://www.9087120.com/wythern/comments/215784.htmlhttp://www.9087120.com/wythern/archive/2018/07/14/215784.html#Feedback0http://www.9087120.com/wythern/comments/commentRss/215784.htmlhttp://www.9087120.com/wythern/services/trackbacks/215784.html

Introduction

Solidiay doc about ABI and contract access.
https://solidity.readthedocs.io/en/develop/abi-spec.html</div><div>https://solidity.readthedocs.io/en/latest/introduction-to-smart-contracts.html?highlight=selfdestruct</div><div>http://www.ethdocs.org/en/latest/contracts-and-transactions/accessing-contracts-and-transactions.html</div><div>http://ethdocs.org/en/latest/contracts-and-transactions/contracts.html#testing-contracts-and-transactions</div><div>https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=suicide [global variables like msg.sender]
ABI intro in Ethereum Wiki.
https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI#argument-encoding
https://github.com/ethereum/go-ethereum/wiki/Contract-Tutorial
JAON rpc api of Eth.
https://github.com/ethereum/wiki/wiki/JSON-RPC#json-rpc-api
https://github.com/ethereum/wiki/wiki/JavaScript-API#contract-methods
Deploy a contract using RPC.
https://github.com/rsksmart/rskj/wiki/Deploying-contracts-using-RPC-calls
A tool to generate the grpc server code for a contract
https://github.com/getamis/grpc-contract

How to test.

http://ethereum-tests.readthedocs.io/en/latest/test_types/transaction_tests.html
https://github.com/ethereum/cpp-ethereum/blob/develop/doc/generating_tests.rst
go-ethereum閲岄潰?#28225;涓鎵箆m鍜宑ontract鐩?#37711;殑tests锛岀粨鍚圓BI鍜宑ontract?#27537;瀹?#28052;?#38171;?#37721;?#28000;?#23536;堝?#35268;?#25782;殑?#21843;涓鎵硅嚜宸?#28729;氬?#21057;殑娴?#29831;?#38171;?#28000;web3js鎴?#38000;?#37929;存帴鍦go project閲岄潰璋?#37922;兘鍙?#28000;?#37510;?/div>



wythern 2018-07-14 17:00 鍙戣璇勮
]]>What is shade jar, and what is its purpose.http://www.9087120.com/wythern/archive/2017/06/19/215009.htmlwythernwythernMon, 19 Jun 2017 03:23:00 GMThttp://www.9087120.com/wythern/archive/2017/06/19/215009.htmlhttp://www.9087120.com/wythern/comments/215009.htmlhttp://www.9087120.com/wythern/archive/2017/06/19/215009.html#Feedback0http://www.9087120.com/wythern/comments/commentRss/215009.htmlhttp://www.9087120.com/wythern/services/trackbacks/215009.html

https://stackoverflow.com/questions/13620281/what-is-the-maven-shade-plugin-used-for-and-why-would-you-want-to-relocate-java


Uber JAR, in short, is a JAR containing everything.

Normally in Maven, we rely on dependency management. An artifact contains only the classes/resources of itself. Maven will be responsible to find out all artifacts (JARs etc) that the project depending on when the project is built.

An uber-jar is something that take all dependencies, and extract the content of the dependencies and put them with the classes/resources of the project itself, in one big JAR. By having such uber-jar, it is easy for execution, because you will need only one big JAR instead of tons of small JARs to run your app. It also ease distribution in some case.

Just a side-note. Avoid using uber-jar as Maven dependency, as it is ruining the dependency resolution feature of Maven. Normally we create uber-jar only for the final artifact for actual deployment or for manual distribution, but not for putting to Maven repository.


Update: I have just discovered I haven't answered one part of the question : "What's the point of renaming the packages of the dependencies?". Here is some brief updates and hopefully will help people having similar question.

Creating uber-jar for ease of deployment is one use case of shade plugin. There are also other common use cases which involve package renaming.

For example, I am developing Foo library, which depends on a specific version (e.g. 1.0) of Bar library. Assuming I cannot make use of other version of Bar lib (because API change, or other technical issues, etc). If I simply declare Bar:1.0 as Foo's dependency in Maven, it is possible to fall into a problem: A Qux project is depending on Foo, and also Bar:2.0 (and it cannot use Bar:1.0 because Qux needs to use new feature in Bar:2.0). Here is the dilemma: should Qux use Bar:1.0 (which Qux's code will not work) or Bar:2.0 (which Foo's code will not work)?

In order to solve this problem, developer of Foo can choose to use shade plugin to rename its usage of Bar, so that all classes in Bar:1.0 jar are embedded in Foo jar, and the package of the embedded Bar classes is changed from com.bar to com.foo.bar. By doing so, Qux can safely depends on Bar:2.0 because now Foo is no longer depending on Bar, and it is using is own copy of "altered" Bar located in another package.



wythern 2017-06-19 11:23 鍙戣璇勮
]]>[Collection] Spark partition related things.http://www.9087120.com/wythern/archive/2017/05/18/214946.htmlwythernwythernThu, 18 May 2017 06:29:00 GMThttp://www.9087120.com/wythern/archive/2017/05/18/214946.htmlhttp://www.9087120.com/wythern/comments/214946.htmlhttp://www.9087120.com/wythern/archive/2017/05/18/214946.html#Feedback0http://www.9087120.com/wythern/comments/commentRss/214946.htmlhttp://www.9087120.com/wythern/services/trackbacks/214946.htmlUnderstanding:
1. https://www.dezyre.com/article/how-data-partitioning-in-spark-helps-achieve-more-parallelism/297
2. http://dev.sortable.com/spark-repartition/ -- example of partition & repartition to avoid data-imbalance.
3. https://acadgild.com/blog/partitioning-in-spark/ -- real case on existing partitioner & self-created partitioner.

Programming guidence.
Avoid using GroupByKey https://databricks.gitbooks.io/databricks-spark-knowledge-base/content/best_practices/prefer_reducebykey_over_groupbykey.html

Reference 1 says: Applying transformations that return RDDs with specific partitioners. Some operation on RDDs that hold to and propagate a partitioner are-
  • Join
  • LeftOuterJoin
  • RightOuterJoin
  • groupByKey
  • reduceByKey
  • foldByKey
  • sort
  • partitionBy
  • foldByKey
groupByKey is one of them, My understanding is such operations may cause extra shuffle, but repartition also helps relieve data imbalance if well considered, so use head please! :)


wythern 2017-05-18 14:29 鍙戣璇勮
]]>
ubuntu switch window in current workspace.http://www.9087120.com/wythern/archive/2017/04/17/214859.htmlwythernwythernMon, 17 Apr 2017 02:21:00 GMThttp://www.9087120.com/wythern/archive/2017/04/17/214859.htmlhttp://www.9087120.com/wythern/comments/214859.htmlhttp://www.9087120.com/wythern/archive/2017/04/17/214859.html#Feedback0http://www.9087120.com/wythern/comments/commentRss/214859.htmlhttp://www.9087120.com/wythern/services/trackbacks/214859.html
[ref]https://unix.stackexchange.com/questions/171964/restrict-alttab-to-the-current-workspace-in-gnome-3

wythern 2017-04-17 10:21 鍙戣璇勮
]]>
Smb 杩?#28051;?#28051;婄殑涓涓?#37721;兘http://www.9087120.com/wythern/archive/2017/02/22/214691.htmlwythernwythernWed, 22 Feb 2017 01:46:00 GMThttp://www.9087120.com/wythern/archive/2017/02/22/214691.htmlhttp://www.9087120.com/wythern/comments/214691.htmlhttp://www.9087120.com/wythern/archive/2017/02/22/214691.html#Feedback0http://www.9087120.com/wythern/comments/commentRss/214691.htmlhttp://www.9087120.com/wythern/services/trackbacks/214691.html鍋?#28751;?#37721;戠幇涓娆兘杩涘埌share folder锛屼絾?#27128;鐪嬭?#38155;潵windows涓鐩?#37734;?#38322;嶆柊load璇folder銆?br />娌湁浠涔堝埆?#27537;鍔炴硶浜?#38171;屾煡鏃織:/var/log/samba/log.$ConnectionName.鍙戠幇鏌?#28051;lib鎸?#27996;?#37510;?br />
[2017/02/22 17:16:29.389531,  0] ../source3/param/loadparm.c:4412(widelinks_warning)
  Share 'ubuntu-share' has wide links and unix extensions enabled. These parameters are incompatible. Wide links will be disabled for this share.
[2017/02/22 17:16:29.392626,  0] ../source3/lib/popt_common.c:68(popt_s3_talloc_log_fn)
  Bad talloc magic value - unknown value
[2017/02/22 17:16:29.392669,  0] ../source3/lib/util.c:789(smb_panic_s3)
  PANIC (pid 9408): Bad talloc magic value - unknown value
[2017/02/22 17:16:29.393497,  0] ../source3/lib/util.c:900(log_stack_trace)
  BACKTRACE: 28 stack frames:
   #0 /usr/lib/x86_64-linux-gnu/samba/libsmbregistry.so.0(log_stack_trace+0x1a) [0x7f21ca87514a]
   #1 /usr/lib/x86_64-linux-gnu/samba/libsmbregistry.so.0(smb_panic_s3+0x20) [0x7f21ca875220]
   #2 /usr/lib/x86_64-linux-gnu/libsamba-util.so.0(smb_panic+0x2f) [0x7f21cb5ec8df]
   #3 /usr/lib/x86_64-linux-gnu/libtalloc.so.2(_talloc_free+0x4de) [0x7f21c83742fe]
   #4 /usr/lib/x86_64-linux-gnu/libsamba-util.so.0(+0x1246c) [0x7f21cb5e346c]

鐪媗og濂藉儚?#27128;?#32342;涓猼alloc lib鍜屾湰鍦扮殑smb lib 涓峬atch銆?br />閲嶈涔?sudo apt-get install libtalloc2
鎼?#28729;?#38171;?/div>BTW: 鏈?#37832;虹殑Samba?#27537;鐗?#37832;槸Samba 4.3.9-Ubuntu銆?#28052;嬪墠?#27537;talloc?#32341;璁扮湅鐗?#37832;?#37510;?#37510;?#37510;?#37827;犳墍璋?#27996;?#37510;?br />
?#32342;閲屾湁浜?#38316;?#37714;?#28051;鏍风殑闂?#26864;?https://answers.launchpad.net/ubuntu/+question/291448



wythern 2017-02-22 09:46 鍙戣璇勮
]]> տ3
<center id="iceyg"><tr id="iceyg"></tr></center>
<noscript id="iceyg"></noscript>
<center id="iceyg"></center>
<noscript id="iceyg"></noscript>
<noscript id="iceyg"></noscript>
<center id="iceyg"><tr id="iceyg"></tr></center>
<noscript id="iceyg"></noscript>
<center id="iceyg"></center>
<noscript id="iceyg"></noscript>
<noscript id="iceyg"></noscript>