2014-06-18 23:05:19,250 WARN org.apache.hadoop.util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2014-06-18 23:05:19,264 WARN org.apache.hadoop.security.authentication.server.AuthenticationFilter: 'signature.secret' configuration not set, using a random value as secret
2014-06-18 23:05:20,756 WARN org.apache.solr.core.SolrResourceLoader: Can't find (or read) directory to add to classloader: ../../../contrib/extraction/lib (resolved as: /var/lib/solr/collection-log_shard2_replica1/../../../contrib/extraction/lib).
2014-06-18 23:05:20,756 WARN org.apache.solr.core.SolrResourceLoader: Can't find (or read) directory to add to classloader: ../../../dist/ (resolved as: /var/lib/solr/collection-log_shard2_replica1/../../../dist).
2014-06-18 23:05:20,756 WARN org.apache.solr.core.SolrResourceLoader: Can't find (or read) directory to add to classloader: ../../../contrib/clustering/lib/ (resolved as: /var/lib/solr/collection-log_shard2_replica1/../../../contrib/clustering/lib).
2014-06-18 23:05:20,756 WARN org.apache.solr.core.SolrResourceLoader: Can't find (or read) directory to add to classloader: ../../../dist/ (resolved as: /var/lib/solr/collection-log_shard2_replica1/../../../dist).
2014-06-18 23:05:20,756 WARN org.apache.solr.core.SolrResourceLoader: Can't find (or read) directory to add to classloader: ../../../contrib/langid/lib/ (resolved as: /var/lib/solr/collection-log_shard2_replica1/../../../contrib/langid/lib).
2014-06-18 23:05:20,757 WARN org.apache.solr.core.SolrResourceLoader: Can't find (or read) directory to add to classloader: ../../../dist/ (resolved as: /var/lib/solr/collection-log_shard2_replica1/../../../dist).
2014-06-18 23:05:20,757 WARN org.apache.solr.core.SolrResourceLoader: Can't find (or read) directory to add to classloader: ../../../contrib/velocity/lib (resolved as: /var/lib/solr/collection-log_shard2_replica1/../../../contrib/velocity/lib).
2014-06-18 23:05:20,757 WARN org.apache.solr.core.SolrResourceLoader: Can't find (or read) directory to add to classloader: ../../../dist/ (resolved as: /var/lib/solr/collection-log_shard2_replica1/../../../dist).
2014년 6월 18일 수요일
2014년 6월 4일 수요일
redis,jedis / zip stream
https://gist.github.com/allwefantasy/3615650public class RedisClient {private JedisPool pool;@Injectpublic RedisClient(Settings settings) {try {pool = new JedisPool(new JedisPoolConfig(), settings.get("redis.host"), settings.getAsInt("redis.port", 6379));} catch (SettingsException e) {// ignore}}public interface Callback {public void execute(Jedis jedis);}public void operate(Callback callback) {Jedis jedis = borrow();try {callback.execute(jedis);} finally {revert(jedis);}}public String get(String key) {Jedis jedis = borrow();try {return jedis.get(key);} finally {revert(jedis);}}public String bGet(String key) {Jedis jedis = borrow();try {byte[] value = jedis.get(key.getBytes());if (value != null) return GZip.decodeWithGZip(value);return null;} finally {revert(jedis);}}public String set(String key, String value) {Jedis jedis = borrow();try {return jedis.set(key, value);} finally {revert(jedis);}}public void del(String key) {Jedis jedis = borrow();try {jedis.del(key);} finally {revert(jedis);}}public String bSet(String key, String value) {Jedis jedis = borrow();try {return jedis.set(key.getBytes(), GZip.encodeWithGZip(value));} finally {revert(jedis);}}public byte[] bGetJ(String key) {Jedis jedis = borrow();try {byte[] value = jedis.get(key.getBytes());if (value != null) return value;return null;} finally {revert(jedis);}}public String bSetJ(String key, byte[] value) {Jedis jedis = borrow();try {return jedis.set(key.getBytes(), value);} finally {revert(jedis);}}public boolean exits(String key) {Jedis jedis = borrow();try {return jedis.exists(key);} finally {revert(jedis);}}public List<String> mget(String[] keys) {Jedis jedis = borrow();try {return jedis.mget(keys);} finally {revert(jedis);}}public String info() {Jedis jedis = borrow();try {return jedis.info();} finally {revert(jedis);}}public List<String> bMget(String[] keys) {Jedis jedis = borrow();int len = keys.length;byte[][] bkeys = new byte[len][];for (int i = 0; i < keys.length; i++) {bkeys[i] = keys[i].getBytes();}try {List<byte[]> list = jedis.mget(bkeys);List<String> temp_list = new ArrayList<String>(list.size());for (byte[] temp : list) {temp_list.add(GZip.decodeWithGZip(temp));}return temp_list;} finally {revert(jedis);}}public Set<String> sCopy(String key, String new_key) {Jedis jedis = borrow();try {Set<String> oldSets = jedis.smembers(key);for (String str : oldSets) {jedis.sadd(new_key, str);}return oldSets;} finally {revert(jedis);}}public void sClear(String key, String oldKey) {Jedis jedis = borrow();try {Set<String> oldSets = jedis.smembers(key);for (String str : oldSets) {jedis.del(oldKey + ":" + str);}jedis.del(key);} finally {revert(jedis);}}public Set<String> sMove(String key, String new_key) {Jedis jedis = borrow();try {Set<String> oldSets = jedis.smembers(key);for (String str : oldSets) {jedis.smove(key, new_key, str);}return oldSets;} finally {revert(jedis);}}public void destory() {pool.destroy();}public Jedis borrow() {return pool.getResource();}public void revert(Jedis jedis) {pool.returnResource(jedis);}}
2014년 6월 1일 일요일
hbase solr morphlines - multi type
<?xml version="1.0"?>
<indexer table="log" mapper="com.ngdata.hbaseindexer.morphline.MorphlineResultToSolrMapper">
<param name="morphlineFile" value="morphlines.conf"/>
<param name="morphlineId" value="log"/>
</indexer>
<?xml version="1.0"?>
<indexer table="dlog" mapper="com.ngdata.hbaseindexer.morphline.MorphlineResultToSolrMapper">
<param name="morphlineFile" value="morphlines.conf"/>
<param name="morphlineId" value="dlog"/>
</indexer>
------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
hbase-indexer-site.xml에 대한 Lily HBase Indexer 고급 구성 스니펫(안전 밸브)
<property>
<name>hbase.zookeeper.quorum</name>
<value>host00.sylee.com,host01.sylee.com</value>
</property>
<property>
<name>hbaseindexer.zookeeper.connectstring</name>
<value>host00.sylee.com:2181</value>
</property>
---------------------------------------------------------------------------------------------------
Lily HBase Indexer 로깅 고급 구성 스니펫(안전 밸브)
log4j.logger.org.kitesdk.morphline=TRACE
log4j.logger.com.ngdata=TRACE
---------------------------------------------------------------------------------------------------
#SOLR_LOCATOR : {
# # Name of solr collection
# collection : hbase-dlog
#
# # ZooKeeper ensemble ($ZK_HOST)
# , zkHost : "host00.sylee.com,host01.sylee.com"
#}
morphlines : [
{
id : log
importCommands : ["org.kitesdk.**", "com.ngdata.**"]
commands : [
{
extractHBaseCells {
mappings : [
{
inputColumn : "cf:rowkey"
outputField : "rowkey"
type : string
source : value
}
, {
inputColumn : "cf:utc"
outputField : "utc"
type : string
source : value
}
, {
inputColumn : "cf:eqp"
outputField : "eqp"
type : string
source : value
}
]
}
}
{ logDebug { format : "output record: {}", args : ["@{}"] } }
]
}
,{
id : dlog
importCommands : ["org.kitesdk.**", "com.ngdata.**"]
commands : [
{
extractHBaseCells {
mappings : [
{
inputColumn : "cf:rowkey1"
outputField : "rowkey"
type : string
source : value
}
, {
inputColumn : "cf:eqp"
outputField : "status"
type : string
source : value
}
]
}
}
{ logDebug { format : "output record: {}", args : ["@{}"] } }
]
}
]
<indexer table="log" mapper="com.ngdata.hbaseindexer.morphline.MorphlineResultToSolrMapper">
<param name="morphlineFile" value="morphlines.conf"/>
<param name="morphlineId" value="log"/>
</indexer>
<?xml version="1.0"?>
<indexer table="dlog" mapper="com.ngdata.hbaseindexer.morphline.MorphlineResultToSolrMapper">
<param name="morphlineFile" value="morphlines.conf"/>
<param name="morphlineId" value="dlog"/>
</indexer>
------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
hbase-indexer-site.xml에 대한 Lily HBase Indexer 고급 구성 스니펫(안전 밸브)
<property>
<name>hbase.zookeeper.quorum</name>
<value>host00.sylee.com,host01.sylee.com</value>
</property>
<property>
<name>hbaseindexer.zookeeper.connectstring</name>
<value>host00.sylee.com:2181</value>
</property>
---------------------------------------------------------------------------------------------------
Lily HBase Indexer 로깅 고급 구성 스니펫(안전 밸브)
log4j.logger.org.kitesdk.morphline=TRACE
log4j.logger.com.ngdata=TRACE
---------------------------------------------------------------------------------------------------
#SOLR_LOCATOR : {
# # Name of solr collection
# collection : hbase-dlog
#
# # ZooKeeper ensemble ($ZK_HOST)
# , zkHost : "host00.sylee.com,host01.sylee.com"
#}
morphlines : [
{
id : log
importCommands : ["org.kitesdk.**", "com.ngdata.**"]
commands : [
{
extractHBaseCells {
mappings : [
{
inputColumn : "cf:rowkey"
outputField : "rowkey"
type : string
source : value
}
, {
inputColumn : "cf:utc"
outputField : "utc"
type : string
source : value
}
, {
inputColumn : "cf:eqp"
outputField : "eqp"
type : string
source : value
}
]
}
}
{ logDebug { format : "output record: {}", args : ["@{}"] } }
]
}
,{
id : dlog
importCommands : ["org.kitesdk.**", "com.ngdata.**"]
commands : [
{
extractHBaseCells {
mappings : [
{
inputColumn : "cf:rowkey1"
outputField : "rowkey"
type : string
source : value
}
, {
inputColumn : "cf:eqp"
outputField : "status"
type : string
source : value
}
]
}
}
{ logDebug { format : "output record: {}", args : ["@{}"] } }
]
}
]
피드 구독하기:
글 (Atom)