This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type MultiError struct { | |
slc []error | |
} | |
func NewMultiError() *MultiError { | |
return &MultiError{make([]error, 0)} | |
} | |
func (errs *MultiError) Add(err error) { | |
errs.slc = append(errs.slc, err) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import( | |
"github.com/carloscm/gossie/src/gossie" | |
) | |
/* | |
CREATE TABLE test2 ( | |
id varchar, | |
service_name varchar, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import( | |
"github.com/carloscm/gossie/src/gossie" | |
) | |
func main() { | |
pool, err := gossie.NewConnectionPool([]string{"localhost:19160"}, "test", gossie.PoolOptions{Size: 50, Timeout: 3000}) | |
if err != nil { | |
panic(err) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ERROR [Thrift:6672] 2013-02-13 17:29:31,715 Cassandra.java (line 3462) Internal error processing batch_mutate | |
java.lang.NullPointerException | |
at org.apache.cassandra.locator.NetworkTopologyStrategy.getReplicationFactor(NetworkTopologyStrategy.java:142) | |
at org.apache.cassandra.service.DatacenterWriteResponseHandler.determineBlockFor(DatacenterWriteResponseHandler.java:68) | |
at org.apache.cassandra.service.WriteResponseHandler.<init>(WriteResponseHandler.java:48) | |
at org.apache.cassandra.service.DatacenterWriteResponseHandler.<init>(DatacenterWriteResponseHandler.java:55) | |
at org.apache.cassandra.service.DatacenterWriteResponseHandler.create(DatacenterWriteResponseHandler.java:61) | |
at org.apache.cassandra.locator.AbstractReplicationStrategy.getWriteResponseHandler(AbstractReplicationStrategy.java:122) | |
at org.apache.cassandra.service.StorageProxy.performWrite(StorageProxy.java:250) | |
at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:194) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
gossie "github.com/carloscm/gossie/src/gossie" | |
"log" | |
) | |
func main() { | |
pool, err := gossie.NewConnectionPool([]string{"cassandra.devel:9160"}, "trace", gossie.PoolOptions{Size: 50, Timeout: 3000}) | |
if err != nil { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Daves-MacBook-Air:goose davegardner$ ./gossietest | |
2013/01/31 08:38:59 Established C* pool... | |
2013/01/31 08:38:59 &gossie.Row{Key:[]byte{0x66, 0x6f, 0x6f}, Columns:[]*gossie.Column{(*gossie.Column)(0xf8400c8b70)}} | |
panic: runtime error: invalid memory address or nil pointer dereference | |
[signal 0xb code=0x1 addr=0x50 pc=0x273e] | |
goroutine 1 [running]: | |
main.main() | |
/Users/davegardner/goose/gossietest.go:36 +0x73e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
gossie "github.com/carloscm/gossie/src/gossie" | |
"log" | |
) | |
func main() { | |
pool, _ := gossie.NewConnectionPool([]string{"cassandra.devel:9160"}, "trace", gossie.PoolOptions{Size: 50, Timeout: 3000}) | |
log.Println("Established C* pool...") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"tour/wc" | |
"strings" | |
) | |
func WordCount(s string) map[string]int { | |
list := strings.Fields(s) | |
wc := map[string]int{} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class PhpUnitTest extends \PHPUnit_Framework_TestCase | |
{ | |
public function testNotEquals() | |
{ | |
$this->assertNotEquals('9223372036854771713', '9223372036854771712'); | |
} | |
public function testPhpNotEqualsEquals() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try | |
{ | |
$diContainer = new diContainer(); | |
$cassandra = $diContainer->getInstance('vdna_service_cassandra'); | |
$locksmith = $diContainer->getInstance('vdna_service_locksmith'); | |
$userDao = $diContainer->getInstance('vdna_dao_user_interface'); | |
// --- | |
$finished = FALSE; |
NewerOlder