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
| public void parse( | |
| InputStream stream, ContentHandler handler, | |
| Metadata metadata, ParseContext context) | |
| throws IOException, SAXException, TikaException { | |
| File tmpFile = File.createTempFile("pdfbox-", ".tmp", null); | |
| RandomAccess scratchFile = new RandomAccessFile(tmpFile, "rw"); | |
| PDDocument pdfDocument = | |
| PDDocument.load(new CloseShieldInputStream(stream), scratchFile, true); | |
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
| # | |
| # A fatal error has been detected by the Java Runtime Environment: | |
| # | |
| # SIGBUS (0x7) at pc=0x00002aaaab028f31, pid=6221, tid=1210988864 | |
| # | |
| # JRE version: 6.0_21-b06 | |
| # Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0-b16 mixed mode linux-amd64 ) | |
| # Problematic frame: | |
| # C [libzip.so+0xaf31] | |
| # |
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
| /** | |
| * Iterate over the indexes and automatically set the index.routing.allocation.total_shards_per_node | |
| * based on the total shards for the index and the number of data nodes that we have | |
| */ | |
| public void setTotalShardsPerNode() { | |
| ClusterHealthResponse health = ESIndexer.es.client.admin().cluster().health(new ClusterHealthRequest()).actionGet(); | |
| // These values are used to decide what do do below | |
| int numDataNodes = health.getNumberOfDataNodes(); | |
| int initShards = health.getInitializingShards(); |
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
| curl -XDELETE 'http://localhost:9200/test/' | |
| curl -XPOST localhost:9200/test/ -d '{ | |
| "mappings" : { | |
| "test":{ | |
| "properties" : { | |
| "multi_test" : {"type":"string", "index_name":"multi_test.string"} | |
| } | |
| }} | |
| } |
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
| curl -XDELETE 'http://localhost:9200/test/' | |
| curl -XPOST localhost:9200/test/ -d '{ | |
| "mappings" : { | |
| "test":{ | |
| "properties" : { | |
| "multi_test" : {"type":"string", "index_name":"multi_test.string"} | |
| } | |
| }} | |
| } |
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
| 2014-01-17 15:18:01,404 p=5873 u=ppearcy | | |
| 2014-01-17 15:18:01,404 p=5873 u=ppearcy | /usr/local/Cellar/ansible/1.4.4/libexec/bin/ansible saf-local -vvvv -i ../hosts -m service -a name=isim state=started | |
| 2014-01-17 15:18:01,404 p=5873 u=ppearcy | | |
| 2014-01-17 15:18:01,440 p=5873 u=ppearcy | <192.168.100.10> ESTABLISH CONNECTION FOR USER: ppearcy | |
| 2014-01-17 15:18:01,440 p=5873 u=ppearcy | <192.168.100.10> EXEC ['ssh', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/Users/ppearcy/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'StrictHostKeyChecking=no', '-o', 'Port=22', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'ConnectTimeout=10', '192.168.100.10', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-1389989881.44-54951323270350 && chmod a+rx $HOME/.ansible/tmp/ansible-1389989881.44-54951323270350 && echo $HOME/.ansible/tmp/ansible-1389989881.44-549513 |
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
| { | |
| "query" : { | |
| "filtered": { | |
| "query": { | |
| "match_all": {} | |
| }, | |
| "filter": { | |
| "bool": { | |
| "must": [ | |
| {"term": { |
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
| "aggregations": { | |
| "user_activity": { | |
| "buckets": [ | |
| { | |
| "key": "c2c5b6cb-d33a-4e94-bd6a-982b25c986e0", | |
| "doc_count": 205, | |
| "weekly": { | |
| "buckets": [ | |
| { | |
| "key_as_string": "2014-08-04T00:00:00.000Z", |
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
| val nodeRequest = new NodesInfoRequestBuilder(testCluster.esClient.admin().cluster()).all() | |
| val nodeResponse = nodeRequest.execute().get() | |
| val remoteAddress = nodeResponse.remoteAddress() | |
| val nodesInfo = nodeResponse.getNodes.toList.head | |
| val inetString = nodesInfo.getTransport.address().publishAddress().toString | |
| val pattern = | |
| """ | |
| |inet\[\/\d+\.\d+\.\d+\.\d+\:(\d+)\] | |
| """.stripMargin.r | |
| val finallyPort = pattern.findFirstMatchIn(inetString).get.group(1) |
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
| { | |
| "namespace": "schema.common", | |
| "type": "record", | |
| "name": "Action", | |
| "fields": [ | |
| { | |
| "name": "name", | |
| "type": "string" | |
| }, | |
| { |