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
zookeeper@server:/var/lib/zookeeper/version-2# ls -lah | |
total 9.2G | |
drwxr-xr-x 2 zookeeper zookeeper 4.0K Jun 30 16:56 . | |
drwxr-xr-x 4 zookeeper zookeeper 4.0K May 8 17:24 .. | |
-rw-r--r-- 1 zookeeper zookeeper 65M Jun 30 15:02 log.10f2546e2 | |
-rw-r--r-- 1 zookeeper zookeeper 65M Jun 30 15:25 log.10f26c9f6 | |
-rw-r--r-- 1 zookeeper zookeeper 65M Jun 30 15:46 log.10f27ea66 | |
-rw-r--r-- 1 zookeeper zookeeper 65M Jun 30 16:03 log.10f29064d | |
-rw-r--r-- 1 zookeeper zookeeper 65M Jun 30 16:03 log.10f2a6949 | |
-rw-r--r-- 1 zookeeper zookeeper 65M Jun 30 16:28 log.10f2aaf90 |
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
package my.project.common.concurrency; | |
import com.google.common.base.Preconditions; | |
import java.util.AbstractQueue; | |
import java.util.Collection; | |
import java.util.Iterator; | |
import java.util.concurrent.BlockingQueue; | |
import java.util.concurrent.PriorityBlockingQueue; | |
import java.util.concurrent.TimeUnit; |
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
WARN 14:55:36,093 At level 1, SSTableReader(path='/var/lib/cassandra/data/XXX/YYY/XXX-YYY-jb-13742-Data.db') [DecoratedKey(-9222888731763965546, 71855c01897f456bb39064fbb422b2a5), DecoratedKey(-6917488716996414524, 311af6e84b9b4245bb8f30cbe0426711)] overlaps SSTableReader(path='/var/lib/cassandra/data/XXX/YYY/XXX-YYY-jb-13436-Data.db') [DecoratedKey(-9222888731763965546, 71855c01897f456bb39064fbb422b2a5), DecoratedKey(-6880442365347943082, 9eab2913983541fb93f6ab8bb88938af)]. This could be caused by a bug in Cassandra 1.1.0 .. 1.1.3 or due to the fact that you have dropped sstables from another node into the data directory. Sending back to L0. If you didn't drop in sstables, and have not yet run scrub, you should do so since you may also have rows out-of-order within an sstable |
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
Sep 10 10:02:18 10.11.1.42 myproc[17660]: [my-thread-8] org.apache.curator.ConnectionState Connection timed out for connection string (X.X.X.2:2181,X.X.X.3:2181,X.X.X.4:2181) and timeout (15000) / elapsed (15521) | |
Sep 10 10:02:18 10.11.1.42 org.apache.curator.CuratorConnectionLossException: KeeperErrorCode = ConnectionLoss | |
Sep 10 10:02:18 10.11.1.42 at org.apache.curator.ConnectionState.checkTimeouts(ConnectionState.java:197) | |
Sep 10 10:02:18 10.11.1.42 at org.apache.curator.ConnectionState.getZooKeeper(ConnectionState.java:87) | |
Sep 10 10:02:18 10.11.1.42 at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:115) | |
Sep 10 10:02:18 10.11.1.42 at org.apache.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:492) | |
Sep 10 10:02:18 10.11.1.42 at org.apache.curator.framework.imps.DeleteBuilderImpl$5.call(DeleteBuilderImpl.java:238) | |
Sep 10 10:02:18 10.11.1.42 at org.apache.curator.framework.imps.DeleteBuilderImpl$5.call(Dele |
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
#!/bin/bash | |
read -p "Enter username: " username | |
read -s -p "Enter password: " mypassword | |
echo | |
echo -n $username:$mypassword | chpasswd -S -c SHA512 |
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
/** | |
* Get a local cache manager. It's not replicated nor distributed in any | |
* way. | |
* @return | |
*/ | |
public static BasicCacheHandler getCacheManager(){ | |
//We jump through these hoops so we don't have to deploy a ehcache.xml | |
if (cache_manager==null) { | |
// Trying not to make the lock | |
synchronized (CacheHandler.class) { |
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
Hi again, | |
I stumbled across you "Forwarded http Extension" (http://tools.ietf.org/html/draft-petersson-forwarded-for-02) a week ago and have been thinking about it a bit more; One thing that I think the draft currently is missing is a way to disclose to the backend the full URL that was used for the original request. | |
There are two things missing: | |
Which resource was requested in the original request. If a request to http://myserver.com/hello/index.jsp is proxied to http://myserver.com/hello2/index.jsp it would be highly useful for the backend to know that the original request was /hello/index.jsp and not /hello2/index.jsp. While a frontend webserver could potentially correct redirects (301s and 302s, example: http://wiki.nginx.org/HttpProxyModule#proxy_redirect) there are also occasions when the backend would like to know about the original request being made. Examples are to have correct links/URLs to media files (images, CSS, JavaScript etc.). | |
Which port that was used on the original request. While I hav |
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
# 'check_https_hostname_on_port' command definition | |
define command{ | |
command_name check_https_hostname_on_port | |
command_line /usr/lib/nagios/plugins/check_http --ssl -H '$HOSTNAME$' -I '$HOSTADDRESS$' -p '$ARG1$' | |
} |
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 mock | |
files_opened = [] | |
real_open = open # Needed since I will wrap open | |
def open_wrapper(*args, **kw): | |
opened_file = mock.MagicMock(wraps=real_open(*args, **kw)) | |
files_opened.append(opened_file) | |
return opened_file | |
open_mock = mock.MagicMock(side_effect=open_wrapper) | |
open_mock.__enter__.side_effect = open_wrapper |
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
"{\"coordinates\":null,\"in_reply_to_user_id\":159938854,\"truncated\":false,\"text\":\"@dstorna \\n\\u0627\\u062e\\u0648\\u064a \\u0639\\u0628\\u062f\\u0627\\u0644\\u0644\\u0647 \\u0627\\u0644\\u0631\\u0624\\u064a\\u0629 \\u062d\\u0642 \\u0648\\u0627\\u0644\\u062a\\u0641\\u0633\\u064a\\u0631 \\u0627\\u0644\\u0627\\u0648\\u0644 \\u0644\\u0647\\u0627 \\u064a\\u0642\\u0639 \\u0642\\u062f \\u064a\\u0636\\u062d\\u0643 \\u0627\\u062d\\u062f \\u0645\\u0639\\u0643 \\u0648\\u064a\\u0641\\u0633\\u0631\\u0647\\u0627 \\u0628\\u0633\\u0648\\u0621\",\"id_str\":\"234786337595727874\",\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[{\"indices\":[0,8],\"id_str\":\"159938854\",\"name\":\"\\u0639\\u0628\\u062f\\u0627\\u0644\\u0644\\u0647 \\u0627\\u0644\\u0634\\u0644\\u0627\\u062d\\u064a\",\"screen_name\":\"dstorna\",\"id\":159938854}]},\"place\":null,\"retweet_count\":0,\"favorited\":false,\"geo\":null,\"source\":\"\\u003Ca href=\\\"http:\\/\\/twitter.com\\/download\\/iphone\\\" rel=\\\"nofollow\\\"\\u003ETwitter |