Notice: This test was done with a fresh install of Solr either 4.4 or 4.5.
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
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
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
import socket | |
if __name__ == "__main__": | |
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
sock.connect(("localhost", 9000)) | |
data = "some data" | |
sock.sendall(data) | |
result = sock.recv(1024) | |
print result | |
sock.close() |
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
import functools | |
class Foo(object): | |
def _cache(func): | |
@wraps(func) | |
def _cache_decorator(self, *args, **kwargs): | |
# Do stuff here | |
return func(self, *args, **kwargs) | |
return _cache_decorator |
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
org.apache.solr.handler.ReplicationHandler$DirectoryFileStream; Exception while writing response for params: file=_h5kd.si&command=filecontent&checksum=true&wt=filestream&qt=/replication&generation=67128 | |
java.io.FileNotFoundException: /ssd/solr/solrcloud-node/collections/collection-13_shard11_replica2/data/index.20131013191448349/_h5kd.si (No such file or directory) |
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
#!/bin/bash | |
for f in *.ready | |
do | |
status=$(curl --write-out %{http_code} --silent --output /dev/null http://192.168.20.101:8983/solr/statistics-$1/update? --data-binary @$f -H 'Content-type:application/json') | |
if [ $status -eq 200 ] | |
then | |
echo "Removing file $f" | |
rm -f $f |
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 | |
/** | |
* Dot notation for access multidimensional arrays. | |
* | |
* $dn = new DotNotation(['bar'=>['baz'=>['foo'=>true]]]); | |
* | |
* $value = $dn->get('bar.baz.foo'); // $value == true | |
* | |
* $dn->set('bar.baz.foo', false); // ['foo'=>false] | |
* |
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 | |
namespace Treffynnon; | |
/** | |
* A PHP class to access a PHP array via dot notation | |
* (Agavi http://www.agavi.org was the inspiration). | |
* | |
* This was hacked in to an existing codebase hence the | |
* global config array variable. |
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
#!/usr/bin/python | |
import time | |
def fib(n): | |
if n < 2: return n | |
else: return fib(n - 1) + fib(n - 2) | |
def fast_fib(n, a, b): | |
if n == 0: return a |
OlderNewer