This file contains 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
#!/usr/bin/perl -w | |
use strict; | |
use lib ('../lib','./lib'); | |
use Test::More tests => 1; | |
use AnyEvent::Redis::Federated; | |
my %config = ( | |
'nodes' => { | |
redis_0 => { address => 'localhost:63790' }, |
This file contains 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
#!/usr/bin/perl -w | |
use strict; | |
use lib ('../lib','./lib'); | |
use Test::More tests => 1; | |
use AnyEvent; | |
use AnyEvent::Redis::Federated; | |
my %config = ( | |
'nodes' => { |
This file contains 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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
my $h; | |
my $i = 0; | |
while (1) { | |
$h->{$i} = 1; |
This file contains 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
--- searchd.cpp.orig 2012-04-16 15:23:46.000000000 -0700 | |
+++ searchd.cpp 2012-04-18 17:05:29.000000000 -0700 | |
@@ -1298,6 +1298,10 @@ | |
#endif | |
const int iShutWaitPeriod = 3000000; | |
+ | |
+ ARRAY_FOREACH ( i, g_dListeners ) | |
+ if ( g_dListeners[i].m_iSock>=0 ) | |
+ sphSockClose ( g_dListeners[i].m_iSock ); |
This file contains 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
--- searchd.cpp.orig 2012-04-16 15:23:46.000000000 -0700 | |
+++ searchd.cpp 2012-04-16 15:24:45.000000000 -0700 | |
@@ -1398,6 +1398,13 @@ | |
ARRAY_FOREACH ( i, g_dListeners ) | |
if ( g_dListeners[i].m_iSock>=0 ) | |
sphSockClose ( g_dListeners[i].m_iSock ); | |
+ | |
+ // remove pid | |
+ if ( g_bHeadDaemon && g_sPidFile ) | |
+ { |
This file contains 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
#!/usr/bin/perl | |
# Demonstrate handling of waiting for the exit values from multiple | |
# forked child processes. Code based on that in the perlipc man page. | |
use strict; | |
use warnings; | |
use feature "say"; | |
use POSIX ":sys_wait_h"; # for waitpid |
This file contains 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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Getopt::Long; | |
# This script will generate the commands used to preshard a collection | |
# in mongodb. | |
# | |
# See: | |
# http://www.mongodb.org/display/DOCS/Splitting+Chunks |
This file contains 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
#!/usr/bin/perl -w | |
$|=1; | |
use strict; | |
use lib '/home/jzawodn/code/AnyEvent-Redis/lib'; | |
use AnyEvent::Redis; | |
my $host = 'localhost'; | |
my $port = 6379; | |
my @chan = 'a'..'z'; # which queues/channels to check | |
my $command_timeout = 1; # how long to wait for a response |
This file contains 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
#!/usr/bin/perl -w | |
$|=1; | |
use strict; | |
use lib '/home/jzawodn/code/AnyEvent-Redis/lib'; | |
use AnyEvent::Redis; | |
my $host = 'localhost'; | |
my $port = 6379; | |
my $key = 'foo'; |
This file contains 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
#!/usr/bin/perl -w | |
$|++; | |
use strict; | |
use lib 'perl-Redis/lib'; | |
use Redis; | |
my $r = Redis->new(server => 'localhost:63790') or die "$!"; | |
## 2.5B values |