Package com.splunk

Examples of com.splunk.Service


        lastSuccessfulReadTime = startTime;
        return data;
    }

    private List<SplunkEvent> runQuery(JobArgs queryArgs, boolean realtime, SplunkResultProcessor callback) throws Exception {
        Service service = endpoint.getService();
        Job job = service.getJobs().create(getSearch(), queryArgs);
        LOG.debug("Running search : {} with queryArgs : {}", getSearch(), queryArgs);
        if (realtime) {
            while (!job.isReady()) {
                Thread.sleep(500);
            }
View Full Code Here


    return create(new GetRequestProvider(endpoint, index, from, to));
  }

  private static RequestOnSearchPeers create(
      ShuttlEndpointRequestProvider requestProvider) {
    Service splunkService = SplunkIndexedLayerFactory
        .getLoggedInSplunkService();
    return new RequestOnSearchPeers(splunkService, new RequestOnSearchPeer(
        requestProvider, SplunkConfiguration.create()));
  }
View Full Code Here

    this.requestProvider = requestProvider;
    this.splunkConf = splunkConfiguration;
  }

  public JSONObject executeRequest(DistributedPeer dp) {
    Service dpService = getDistributedPeerService(dp);
    int shuttlPort = ShuttlPortEndpoint.create(dpService).getShuttlPort();
    return JsonRestEndpointCaller.create().getJson(
        requestProvider.createRequest(dpService.getHost(), shuttlPort));
  }
View Full Code Here

    return JsonRestEndpointCaller.create().getJson(
        requestProvider.createRequest(dpService.getHost(), shuttlPort));
  }

  private Service getDistributedPeerService(DistributedPeer dp) {
    Service dpService = createService(dp);
    authenticateService(dpService);
    return dpService;
  }
View Full Code Here

  }

  private Service createService(DistributedPeer dp) {
    String nameThatIsThePeersIpAndPortPair = dp.getName();
    String[] hostPortPair = nameThatIsThePeersIpAndPortPair.split(":");
    return new Service(hostPortPair[0], Integer.parseInt(hostPortPair[1]));
  }
View Full Code Here

  }

  public static void main(String... args) {
    registerMBeans();

    Service service = SplunkIndexedLayerFactory.getLoggedInSplunkService();
    new WarmToColdRetrier(service).run();
  }
View Full Code Here

  /**
   * @return configured {@link SplunkIndexesLayer}
   */
  public static SplunkIndexesLayer create() {
    Service splunkService = getLoggedInSplunkService();
    return new SplunkIndexesLayer(splunkService);
  }
View Full Code Here

    return new SplunkIndexesLayer(splunkService);
  }

  public static Service getLoggedInSplunkService() {
    SplunkConfiguration splunkConf = SplunkConfiguration.create();
    Service splunkService = new Service(splunkConf.getHost(),
        splunkConf.getPort());
    splunkService.login(splunkConf.getUsername(), splunkConf.getPassword());
    return splunkService;
  }
View Full Code Here

  public ClusterPeersProvider(JMXSplunkMBean mBeanProxy) {
    this.mBeanProxy = mBeanProxy;
  }

  public ClusterPeers getClusterPeers(URI masterUri) {
    Service service = new Service(masterUri.getHost(), masterUri.getPort());
    service.login(mBeanProxy.getUsername(), mBeanProxy.getPassword());
    return new ClusterPeers(service);
  }
View Full Code Here

* Provides {@link ShuttlPortEndpoint}s
*/
public class ShuttlPortEndpointProvider {

  public ShuttlPortEndpoint getForIndexerInfo(IndexerInfo indexer) {
    Service splunkService = new Service(indexer.getHost(), indexer.getPort());
    return ShuttlPortEndpoint.create(splunkService);
  }
View Full Code Here

TOP

Related Classes of com.splunk.Service

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.