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
package com.kiru.flume.sink.splunk; | |
import java.io.IOException; | |
import org.apache.flume.Channel; | |
import org.apache.flume.Context; | |
import org.apache.flume.Event; | |
import org.apache.flume.EventDeliveryException; | |
import org.apache.flume.Transaction; | |
import org.apache.flume.conf.Configurable; | |
import org.apache.flume.sink.AbstractSink; |
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
# Name the components on this agent | |
agent1.sources = source1 | |
agent1.sinks = sink1 hdfssink1 | |
agent1.channels = channel1 channel2 | |
# Describe/configure source1 | |
agent1.sources.source1.type = netcat | |
agent1.sources.source1.bind = localhost | |
agent1.sources.source1.port = 44444 |
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 os | |
import sys | |
sys.path.append('/home/kiru/cloudera-cm_api-cc9eac0/python/dist/cm_api-2.0.0-py2.7.egg') | |
from cm_api.api_client import ApiResource | |
api = ApiResource('localhost', username='admin', password='admin') | |
myclusters = api.get_all_clusters() | |
for cluster in myclusters: | |
thiscluster = api.get_cluster(cluster.name) |
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
[cloudera_mapred_server] | |
definition = index="cmmon_index" TYPE="JOBTRACKER" | stats latest(HOST) as INSTANCE by CLUSTER, SERVICE | table CLUSTER, SERVICE, INSTANCE | |
iseval = 0 | |
[cloudera_hdfs_server] | |
definition = index="cmmon_index" TYPE="NAMENODE" | stats latest(HOST) as INSTANCE by CLUSTER, SERVICE | table CLUSTER, SERVICE,INSTANCE | |
iseval = 0 | |
[cloudera_hue_server] | |
definition = index="cmmon_index" TYPE="HUE_SERVER" | stats latest(HOST) as INSTANCE by CLUSTER, SERVICE | table CLUSTER, SERVICE, INSTANCE |
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
package com.serendio.test; | |
import gnu.trove.map.hash.THashMap; | |
import gnu.trove.map.hash.TIntIntHashMap; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class JavaMapTest { |