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
### Keybase proof | |
I hereby claim: | |
* I am svzdvd on github. | |
* I am svzdvd (https://keybase.io/svzdvd) on keybase. | |
* I have a public key whose fingerprint is E3D3 35F7 4083 DB9E BA44 833D E53E 6E5D AD22 AE53 | |
To claim this, I am signing this object: |
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
import java.util.LinkedList; | |
import java.util.concurrent.TimeUnit; | |
public class StopWatchTree | |
{ | |
private final String name; | |
private final long startNanoTime; | |
private final LinkedList<StopWatchTree> children; | |
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
// create a column store instance in a new empty directory: | |
ColumnStore columnStore = new ColumnStore("/path/to/mycstore"); | |
// get the column store table you want to use | |
TableDefinition tableDef = columnStore.getTableDefinition("udr"); | |
if (tableDef == null) { | |
// if the table doesn't exists create a new table using a configuration file: | |
tableDef = new TableDefinition("udr", new File("udr.cfg"), 5000000); | |
tableDef = columnStore.addTableDefinition(tableDef); | |
} |
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
// create a column store instance in a new empty directory: | |
ColumnStore columnStore = new ColumnStore("/path/to/mycstore"); | |
// get the column store table you want to use | |
TableDefinition tableDef = columnStore.getTableDefinition("udr"); | |
if (tableDef == null) { | |
// if the table doesn't exists create a new table using a configuration file: | |
tableDef = new TableDefinition("udr", new File("udr.cfg"), 5000000); | |
tableDef = columnStore.addTableDefinition(tableDef); | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Context docBase="/data/solr/solr.war" debug="0" privileged="true" allowLinking="true" crossContext="true"> | |
<Environment name="solr/home" type="java.lang.String" value="/data/solr" override="true" /> | |
</Context> |
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
yum install -y sudo | |
yum groupinstall -y "Development Tools" | |
yum install -y kernel-devel | |
yum install -y java-1.6.0-openjdk | |
yum install -y java-1.6.0-openjdk-devel | |
yum install -y tomcat6 | |
yum install -y xalan-j2 | |
yum install -y postgresql postgresql-server postgresql-devel | |
yum install -y mercurial git subversion |
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
cd /usr/src | |
curl http://archive.apache.org/dist/lucene/solr/1.4.1/apache-solr-1.4.1.tgz | tar xfz - | |
mkdir -p /data/solr | |
cp -Rv apache-solr-1.4.1/example/solr/* /data/solr | |
cp apache-solr-1.4.1/dist/apache-solr-1.4.1.war /data/solr/solr.war | |
chown -Rc tomcat /data/solr/ | |
cd /etc/tomcat6/Catalina/localhost/ | |
wget https://gist.github.com/svzdvd/5081810/raw/20785988538479906a584037a2839aba6e3382ba/solr.xml |
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
wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F" "http://download.oracle.com/otn-pub/java/jdk/7u21-b11/jdk-7u21-linux-x64.tar.gz" |
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
wget --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz" | |
tar xzf jdk-7u51-linux-x64.tar.gz | |
sudo mv jdk1.7.0_51 /usr/lib/jvm/ | |
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0_51/bin/java" 1 | |
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0_51/bin/javac" 1 | |
# interactive selection | |
sudo update-alternatives --config java | |
# interactive selection |
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
import java.lang.management.LockInfo; | |
import java.lang.management.ManagementFactory; | |
import java.lang.management.ThreadInfo; | |
import java.lang.management.ThreadMXBean; | |
import java.util.HashMap; | |
import java.util.Map; | |
/** | |
* http://stackoverflow.com/a/2362939 | |
*/ |
OlderNewer