Package org.apache.thrift.transport

Examples of org.apache.thrift.transport.TSocket.open()


    TSocket transport = new TSocket(host, port);
    TProtocol protocol = new TBinaryProtocol(transport);
    Indexer.Client client = new Indexer.Client(protocol);
   
    try {
      transport.open();
      Map<Integer,String> retValue = client.listScoreFunctions();
      transport.close();
            return retValue;
    } catch (IndextankException e) {
      throw new RuntimeException(e);
View Full Code Here


        TSocket transport = new TSocket(host, port);
        TProtocol protocol = new TBinaryProtocol(transport);
        Indexer.Client client = new Indexer.Client(protocol);
       
        try {
            transport.open();
            Map<String,String> retValue = client.get_stats();
            transport.close();
            return retValue;
        } catch (IndextankException e) {
            throw new RuntimeException(e);
View Full Code Here

    TSocket transport = new TSocket(host, port);
    TProtocol protocol = new TBinaryProtocol(transport);
    FrontendManager.Client client = new FrontendManager.Client(protocol);
   
    try {
      transport.open();
      client.save_insight(indexCode, insightCode, jsonValue);
      transport.close();
    } catch (TTransportException e) {
      throw new RuntimeException(e);
    } catch (TException e) {
View Full Code Here

      TSocket transport = new TSocket(host, port);
      TProtocol protocol = new TBinaryProtocol(transport);
      FrontendManager.Client client = new FrontendManager.Client(protocol);
     
      try {
          transport.open();
          List<IndexInfo> indexes = client.list_indexes();
          transport.close();
          return indexes;
      } catch (TTransportException e) {
          throw new RuntimeException(e);
View Full Code Here

        Map<Integer, Double> doubleBoosts = Maps.newHashMapWithExpectedSize(boosts.size());
        for (Entry<Integer, Float> entry : boosts.entrySet()) {
        doubleBoosts.put(entry.getKey(), entry.getValue().doubleValue());
      }
     
      transport.open();
      client.enqueueAddStore(indexId, sourceDocId, new Document(document.asMap()), timestamp, doubleBoosts);
      transport.close();
    } catch (IndextankException e) {
      throw new RuntimeException(e);
    } catch (TTransportException e) {
View Full Code Here

    TSocket transport = new TSocket(host, port);
    TProtocol protocol = new TBinaryProtocol(transport);
    Storage.Client client = new Storage.Client(protocol);
   
    try {
      transport.open();
      client.enqueueRemoveStore(indexId, sourceDocId);
      transport.close();
    } catch (IndextankException e) {
      throw new RuntimeException(e);
    } catch (TTransportException e) {
View Full Code Here

    TSocket transport = new TSocket(host, port);
    TProtocol protocol = new TBinaryProtocol(transport);
    Storage.Client client = new Storage.Client(protocol);
   
    try {
      transport.open();
      Map<Integer, Double> doubleBoosts = Maps.newHashMapWithExpectedSize(boosts.size());
        for (Entry<Integer, Float> entry : boosts.entrySet()) {
        doubleBoosts.put(entry.getKey(), entry.getValue().doubleValue());
      }
     
View Full Code Here

    TSocket transport = new TSocket(host, port);
    TProtocol protocol = new TBinaryProtocol(transport);
    Storage.Client client = new Storage.Client(protocol);

    try {
      transport.open();
      client.enqueueUpdateCategories(indexId, sourceDocId, categories);
      transport.close();
    } catch (IndextankException e) {
      throw new RuntimeException(e);
    } catch (TTransportException e) {
View Full Code Here

    TSocket transport = new TSocket(host, port);
    TProtocol protocol = new TBinaryProtocol(transport);
    Storage.Client client = new Storage.Client(protocol);
   
    try {
      transport.open();
      client.enqueueUpdateTimestamp(indexId, sourceDocId, timestamp);
      transport.close();
    } catch (IndextankException e) {
      throw new RuntimeException(e);
    } catch (TTransportException e) {
View Full Code Here

    TSocket transport = new TSocket(host, port);
    TProtocol protocol = new TBinaryProtocol(transport);
    Indexer.Client client = new Indexer.Client(protocol);
   
    try {
      transport.open();
      client.promoteResult(docid, query);
      transport.close();
    } catch (IndextankException e) {
      throw new RuntimeException(e);
    } catch (TTransportException e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.